feat(codechef): implement login and submit

Problem: CodeChef login and submit were stub-only. Language IDs were
also missing for USACO, Kattis, and CodeChef.

Solution: Add StealthySession browser-based login (checks `__NEXT_DATA__`
for current user, fills email/password form) and submit (navigates to
`/{contest_id}/submit/{problem_id}`, selects language via select element
or custom dropdown fallback, sets code via Monaco/CodeMirror/textarea JS,
clicks submit). Cookie cache at `~/.cache/cp-nvim/codechef-cookies.json`.
Add language IDs for all three new platforms to `language_ids.py`.
This commit is contained in:
Barrett Ruth 2026-03-06 00:05:17 -05:00
parent 80bc9a7a23
commit caf4a2e026
2 changed files with 286 additions and 7 deletions

View file

@ -11,6 +11,18 @@ LANGUAGE_IDS = {
"cpp": "C++17",
"python": "Python3",
},
"usaco": {
"cpp": "cpp",
"python": "python",
},
"kattis": {
"cpp": "C++17",
"python": "Python 3",
},
"codechef": {
"cpp": "C++ 17",
"python": "Python 3",
},
}