Problem: AtCoder submit used a cookie fast-path that silently failed on stale sessions; `_LANGUAGE_ID_EXTENSION` only covered 2 of 116 languages; `LANGUAGE_VERSIONS` was incomplete for AtCoder, CF, and Kattis; AtCoder `prolog` and `racket` entries had wrong IDs. Raw `vim.notify` calls throughout bypassed `logger.log`, producing inconsistent or missing `[cp.nvim]:` prefixes. Solution: Remove cookie persistence from AtCoder login/submit — always use a fresh login within a single session. Increase `BROWSER_SUBMIT_NAV_TIMEOUT["atcoder"]` to 40s and switch to in-memory buffer upload with the correct per-language extension. Expand `LANGUAGE_VERSIONS` with all 116 AtCoder languages, 15 new CF languages with full version variants (java8/21, kotlin 1.7/1.9/2.2, rust 2021/2024, etc.), and 50+ Kattis languages. Fix AtCoder `prolog` ID (`6079`→`6081`, was Pony) and remove non-existent `racket` entry. Replace all raw `vim.notify` calls with `logger.log`.
16 lines
462 B
Python
16 lines
462 B
Python
from collections import defaultdict
|
|
|
|
HTTP_TIMEOUT = 15.0
|
|
|
|
BROWSER_SESSION_TIMEOUT = 15000
|
|
BROWSER_NAV_TIMEOUT = 10000
|
|
BROWSER_SUBMIT_NAV_TIMEOUT: defaultdict[str, int] = defaultdict(
|
|
lambda: BROWSER_NAV_TIMEOUT
|
|
)
|
|
BROWSER_SUBMIT_NAV_TIMEOUT["atcoder"] = BROWSER_NAV_TIMEOUT * 4
|
|
BROWSER_SUBMIT_NAV_TIMEOUT["codeforces"] = BROWSER_NAV_TIMEOUT * 2
|
|
BROWSER_TURNSTILE_POLL = 5000
|
|
BROWSER_ELEMENT_WAIT = 10000
|
|
BROWSER_SETTLE_DELAY = 500
|
|
|
|
SUBMIT_POLL_TIMEOUT = 30.0
|