How much foreign language should a high schooler focusing on Computer Science take?

Check the web sites of colleges of interest to see what level they prefer to see. Many of the more selective colleges prefer to see foreign language up to level 4 or AP level.

But also check the graduation requirements of your colleges of interest. Completing a higher level in high school may mean needing fewer or no college courses to complete the college’s foreign language graduation requirement.

https://www.cs.princeton.edu/courses/catalog and https://www.princeton.edu/pub/ap/table/ indicate that AP CS scores are not listed as prerequisites or substitutions for any Princeton CS course.