Skip to main content

atomcode_core/
lib.rs

1pub mod agent;
2pub mod atomgit;
3pub mod auth;
4pub mod process_utils;
5pub mod coding_plan;
6pub mod commands;
7pub mod config;
8pub mod conversation;
9pub mod ctx;
10pub mod git;
11pub mod graph;
12pub mod hook;
13pub mod i18n;
14pub mod init;
15pub mod input_history;
16pub mod locale;
17pub mod lsp;
18pub mod mcp;
19pub mod notify;
20pub mod pricing;
21pub mod provider;
22pub mod self_update;
23pub mod semantic;
24pub mod session;
25pub mod plugin;
26pub mod setup;
27pub mod skill;
28pub mod stream;
29pub mod telemetry_bootstrap;
30pub mod tool;
31pub mod turn;
32pub mod uninstall;
33pub mod version_check;
34pub mod vision_preprocessor;
35
36/// User-Agent identifier for every outbound HTTP request the app makes.
37///
38/// Lowercase `atomcode/<version>` is deliberate. The LLM gateway at
39/// `api-ai.gitcode.com` has a UA filter that silently hijacks any
40/// request whose UA starts with capital-A `AtomCode` and replies
41/// with a 200 + single SSE chunk containing the literal string
42/// "参数错误", no `[DONE]` frame — which surfaces in the TUI as a
43/// 4-token assistant reply rather than an error. The other
44/// atomgit.com / gitcode.com endpoints (CodingPlan, user REST,
45/// self-update) accept either case, so normalising to lowercase
46/// avoids the LLM-path hijack without breaking the rest. Revisit
47/// once the gateway filter is removed upstream.
48pub const ATOMCODE_USER_AGENT: &str = concat!("atomcode/", env!("CARGO_PKG_VERSION"));