# TUI Context Help Upstream Inventory

This table records upstream UI hints that are hard to show inline in the terminal UI. The TUI `?` help should show the entry that matches the current focus. If no focused item-specific entry applies, it should show global help when global shortcuts are still useful, or the empty-help fallback when the focused pane has no useful hint.

| Upstream source | Field/control | Upstream copy | Behavior notes | TUI help target |
|---|---|---|---|---|
| `.upstream/src/components/providers/forms/CodexFormFields.tsx` | Codex local routing switch | `需要本地路由映射` / `Needs Local Routing`; explains Codex natively supports OpenAI Responses API and GPT models, while Chat Completions or non-GPT providers need local routing kept on. | Upstream toggles between `openai_chat` and `openai_responses`. TUI currently infers this through Codex provider config rather than exposing the switch. | Codex provider form, Base URL/Model/API Key fields and Codex config preview. |
| `.upstream/src/components/providers/forms/CodexFormFields.tsx` | Reasoning capability | `思考能力（高级·通常自动识别）`; preset providers are configured automatically, custom providers are inferred from name/URL, override only when detection is wrong. | Visible only when local routing is enabled and reasoning config is editable. | Codex config preview help. |
| `.upstream/src/components/providers/forms/CodexFormFields.tsx` | Supports Thinking Mode | Enable when upstream Chat Completions supports toggling thinking on/off; Kimi, GLM, Qwen usually fit. | Turning off clears effort support. | Codex config preview help. |
| `.upstream/src/components/providers/forms/CodexFormFields.tsx` | Supports Reasoning Effort | Enable when upstream supports low/high/max-style thinking depth; this converts Codex `reasoning.effort` to upstream Chat parameters. | Turning on also enables thinking mode. | Codex config preview help. |
| `.upstream/src/components/providers/forms/CodexFormFields.tsx` | Model Mapping / catalog | Generates Codex `model_catalog_json` so `/model` shows third-party model names; Codex restart is required after changes. | Visible when local routing and catalog editing are available. | Codex config preview help and model field help. |
| `.upstream/src/components/providers/forms/CodexFormFields.tsx` | Model catalog rows | Menu display name, actual request model, context window. | Rows are saved as listed, empty/duplicate model IDs are dropped, context window is parsed as digits. | Future model-mapping secondary page help. |
| `.upstream/src/components/providers/forms/CodexConfigSections.tsx` | Goal mode / remote compaction | Remote compaction writes the active provider entry name as OpenAI so Codex can try remote compaction. | Remote compaction is conditional. | Codex config preview help. |
| `.upstream/src/components/providers/forms/CodexConfigSections.tsx` and `.upstream/src/components/providers/forms/CodexCommonConfigModal.tsx` | Common config | Snippet is appended to `config.toml` when Write Common Config is checked. The modal also shows guide title, purpose, usage steps, re-extract guidance, reassurance text, and empty-state hint. | Codex common config uses a TOML editor. Empty snippets prompt the user to extract from existing config. | Main provider form `Common Config Snippet` and `Attach Common Config`. |
| `.upstream/src/components/providers/forms/CommonConfigEditor.tsx` | Common config guide | Common config shares non-sensitive settings such as plugins and environment variables across providers, so switching providers does not lose them. | Guide is shown inside the upstream editor. | Common config row/help and common snippet editor help. |
| `.upstream/src/components/providers/ProviderForm.tsx` | First common config confirmation | Explains what common config is and asks the user to confirm once. | Persisted confirmation. | Existing one-time TUI notice remains authoritative. |
| `.upstream/src/components/providers/forms/CodexConfigEditor.tsx` | Proxy takeover notices | When proxy takeover is active, upstream says the editor shows stored provider config, not live `auth.json`/`config.toml`. | Only shown during takeover. | Provider edit help when proxy state is available. |
| `.upstream/src/components/settings/CodexAuthSettings.tsx` | Preserve Codex official auth | Keep official login when switching third-party providers so Codex app plugins and mobile remote control can still work. | Settings toggle defaults false. | Settings help if/when the TUI exposes this setting. |
| `.upstream/src/components/UsageScriptModal.tsx` | Usage Query modal | `配置用量查询`, `启用用量查询`, `预设模板`. | First enable shows confirmation if not confirmed. | Usage Query page header and Enabled row. |
| `.upstream/src/components/UsageScriptModal.tsx` | Usage Query template selector | Upstream includes custom, general, NewAPI, GitHub Copilot, Token Plan, official. | Local TUI intentionally exposes only custom, general, newapi, and balance. | Usage Query Template row and picker. |
| `.upstream/src/components/UsageScriptModal.tsx` | Custom supported variables | `支持的变量`, `{{baseUrl}} = ...`, `{{apiKey}} = ...`. | Only shown for custom template. | Usage Query Extractor Code panel/editor. |
| `.upstream/src/components/UsageScriptModal.tsx` | General credentials | General template API Key and Base URL can be left empty to use provider config. | Upstream has provider-specific visibility. | Usage Query API Key/Base URL fields for general template. |
| `.upstream/src/components/UsageScriptModal.tsx` | NewAPI credentials | NewAPI template shows Base URL, Access Token, and User ID, then queries `/api/user/self`. | Base URL is not the same as the optional general-template Base URL. | Usage Query Base URL/Access Token/User ID fields for NewAPI template. |
| `.upstream/src/components/UsageScriptModal.tsx` and `.upstream/src-tauri/src/usage_script.rs` | Timeout and interval | Timeout in seconds, range `2-30`; auto query interval in minutes, `0` disables auto query. | Timeout default is 10 and runtime clamps to `2..30`; interval default is 5 and TUI saves at most 1440 minutes. | Usage Query Timeout and Auto Query Interval fields. |
| `.upstream/src/components/UsageScriptModal.tsx` | Extractor Code and script instructions | Return object should include remaining quota fields; documents `isValid`, `invalidMessage`, `remaining`, `unit`, `planName`, `total`, `used`, `extra`. | Hidden for GitHub Copilot and Token Plan upstream; visible for TUI-exposed custom/general/newapi/balance. Long help must be scrollable. | Right-side Extractor Code and Script writing instructions blocks. |
| `.upstream/src/components/proxy/ProxyPanel.tsx` | Proxy enablement and takeover controls | Enable proxy button, service switch, and app takeover switches route selected apps through local routing. | App takeover switches depend on proxy service state. | Existing proxy help overlay and `?` on Settings > Local Proxy. |
| `.upstream/src/components/proxy/ProxyPanel.tsx` | Proxy service settings | Listen address, listen port, logging; restart routing service after address/port changes. | Address and port are validated upstream; TUI blocks editing while the local proxy is running. | Existing proxy help overlay and settings rows. |
