Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/en/guides/configuration/chat-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,13 @@ Provider "Anthropic", base URL `https://api.anthropic.com`. Don't add `/v1` to t
| What you want | Key | Value |
| --- | --- | --- |
| Prompt caching | `extra_body` | `{"cache_control": {"type": "ephemeral"}}` |
| Adaptive thinking | `thinking` | `{"type": "adaptive"}` |
| Adaptive thinking with readable summaries | `thinking` | `{"type": "adaptive", "display": "summarized"}` |
| Thinking with a fixed budget (older models) | `thinking` | `{"type": "enabled", "budget_tokens": 8000}` |
| Effort | `output_config` | `{"effort": "medium"}` |
| Interleaved thinking on older models at another address | `additional_beta_flags` | `["interleaved-thinking-2025-05-14"]` |

- Use `adaptive` only on models that support it; recent models reject the older `enabled`/`budget_tokens` form. For ordinary fixed-budget thinking, set "Max Output Tokens" higher than `budget_tokens` (manual interleaved thinking has different budget rules).
- `display: "summarized"` asks the service to return a readable summary of the model's thinking. Newer Claude models, including Opus 5.5 and Fable 5.1, hide this text by default. Add `"display": "summarized"` to your existing `thinking` object to request it; iCode's "Show model thinking" setting controls whether returned text is shown, but does not request it from the service. To hide the summary at the API level, use `"display": "omitted"`; this leaves thinking enabled and does not reduce its token charges.
- Newer Claude models reject non-default `temperature`, `top_p`, and `top_k` values, so leave them unset.
- `additional_beta_flags` and `betas` add beta flags to the request, as does an `anthropic-beta` header in "HTTP Extra Headers". iCode sends them all, after its own flags, in one `anthropic-beta` header. An `anthropic-beta` key in an `extra_headers` row replaces all of these flags, iCode's own included; iCode then adds only the flags the thinking settings need.
- With fixed-budget thinking at Anthropic's own address, iCode adds the interleaved-thinking flag itself; see [Claude thinking settings](./models.md#claude-thinking-settings). At another address, add it yourself as in the table above. Adaptive thinking already interleaves and needs no flag. Interleaving depends on the exact model, and accepting a beta flag does not mean it takes effect.
Expand Down
4 changes: 3 additions & 1 deletion docs/en/guides/configuration/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ If you edit the model profile currently in use, the updated configuration applie

### Claude thinking settings

Claude Opus 5.5, Fable 5.1 and Sonnet 5.5 tie the thinking they return to the conversation before it. When that earlier conversation changes, for example after iCode compacts the context, the model service may refuse to read that thinking back. When one of these models uses adaptive thinking (`"thinking": {"type": "adaptive"}` in ["Chat Options"](./chat-options.md#anthropic)) at Anthropic's own address, iCode asks the service to leave out thinking that no longer matches instead of refusing the request. The model then sees less of its earlier reasoning, but the request goes through. On accounts where the service would not otherwise check this, the request makes it check, so such thinking is left out there too.
To request adaptive thinking with readable summaries, add a `thinking` row with the value `{"type": "adaptive", "display": "summarized"}` in ["Chat Options"](./chat-options.md#anthropic).

Claude Opus 5.5, Fable 5.1 and Sonnet 5.5 tie the thinking they return to the conversation before it. When that earlier conversation changes, for example after iCode compacts the context, the model service may refuse to read that thinking back. When one of these models uses adaptive thinking at Anthropic's own address, iCode asks the service to leave out thinking that no longer matches instead of refusing the request. The model then sees less of its earlier reasoning, but the request goes through. On accounts where the service would not otherwise check this, the request makes it check, so such thinking is left out there too.

To change this, open the profile's file in the `models` folder of the iCode configuration directory (`~/.chrys/models/` on macOS and Linux, `%APPDATA%\chrys\models\` on Windows; the file's `name:` line shows the profile name), add a `thinking_block_binding` line with one of these values, and restart iCode:

Expand Down
1 change: 1 addition & 0 deletions docs/en/guides/configuration/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The "Takes effect" column in the following tables describes each setting's usual
| Theme | Changes the TUI theme. To adjust colors or create a custom theme, see [Customize themes](themes.md). | Immediately |
| UI Language | Changes only iCode interface text, not conversation content, the model's output language, or existing records. You can also switch the interface language with `/language`. | Immediately |
| Show model thinking | Shows the model's thinking above its reply as it arrives, when the model service returns it as readable text. Thinking the service returns only in encrypted form is never shown. Thinking already in the conversation stays as it is when you change this. | New replies and sessions you open afterwards |
| Automatically fold completed turns | Enabled by default (`ui.chat.fold_finished_turns`). After a successful reply, folds thinking, tool calls and intermediate replies under **Made N tool calls**, or **Activity** when there were no tools or the turn is in compressed history. User messages, including mid-turn additions, and the final reply remain visible. Click the header to toggle one section, or type `/fold` to collapse or expand activity sections, tool groups and thinking with the keyboard. Errors, interruptions and the last turn recovered after a crash stay visible; a turn without a visible final reply is not automatically folded. Existing folds keep your choice. | Future completed turns and sessions you open afterwards |

#### Input

Expand Down
4 changes: 4 additions & 0 deletions docs/en/guides/daily-use/sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ When you resume a long conversation, iCode shows its most recent part first so y

A resumed conversation shows the model's saved thinking folded under **Thinking** above the reply it led to; click **Thinking** to unfold it. If a reply was interrupted or failed, the thinking shown for the request that was cut off is not saved, so it does not appear. To hide thinking, see [Show model thinking](../configuration/settings.md#appearance).

Successful turns also fold their intermediate activity by default. Each mid-turn user addition stays visible and starts a separate activity section. Click **Made N tool calls** or **Activity** to inspect that section while keeping its inner details in their current state. A lone thinking block uses its own header. For keyboard access, `/fold` toggles activity sections, tool groups and thinking together: it collapses them if any are open, and expands them otherwise. Thinking that is still being written and controls waiting for your input stay open. Copy commands still include intermediate replies and keep their original message counts. Turn off **Automatically fold completed turns** in [Settings](../configuration/settings.md#appearance) to keep future completed turns and subsequently opened sessions expanded. The last turn recovered from a crash stays open.

Clicking an activity header keeps focus in the input field. A restored turn waiting for sub-agents stays open. Compressed history shows only some tool details, so these sections are all labeled **Activity**.

If a resumed conversation continues on a different model service than before, some earlier reasoning may be left out; see [Switch the current model profile](../configuration/models.md#switch-the-current-model-profile).

## Delete old sessions
Expand Down
1 change: 1 addition & 0 deletions docs/en/reference/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ In the tables, “None” means there is no corresponding environment variable,
| `ui.editor.keymap` | `CHRYS_EDITOR_KEYMAP` | `standard` | String; `standard`, `emacs`, or `vim` selects the input editor's key bindings |
| `ui.chat.tool_groups_expanded` | None | `false` | Boolean; whether newly displayed tool groups expand their details by default |
| `ui.chat.show_thinking` | None | `true` | Boolean; whether the TUI chat shows the model's thinking above its reply, when the model service returns it as readable text. Thinking the service returns only in encrypted form is never shown |
| `ui.chat.fold_finished_turns` | None | `true` | Boolean; automatically fold intermediate activity after successful replies. Applies to future completed turns and subsequently opened sessions; existing sections keep their state. User messages and final replies remain visible |
| `ui.chat.file_snapshot_inline_chars` | `CHRYS_TUI_FILE_SNAPSHOT_INLINE_CHARS` | `131072` | Integer; limits the before-and-after file content loaded directly with a file edit card, measured by their combined byte size. Within the limit, content loads with the card and the header shows the exact numbers of added and deleted lines. Above the limit, if snapshot references are available, content is read only when the diff is expanded, and the header does not show exact line counts. `0` or a negative value sets the limit to zero; inline content may still be retained when no snapshot references are available. This setting controls only how the card loads content; `mutations.snapshot.max_file_mb` and `mutations.snapshot.skip_binary` determine whether file content is backed up |
| `history.prompt.enabled` | `CHRYS_HISTORY_DISABLE` | `true` | Boolean; save and read input history across sessions. Disabling it does not delete existing records. The environment variable has the opposite meaning: only the exact value `1` disables history; other values do not |
| `app.update_check` | `CHRYS_UPDATE_CHECK` | `true` | Boolean; once a day, when the TUI starts, look up the newest iCode version and, when it is newer, show it on the welcome screen with the command that upgrades iCode. The request carries none of your personal information or data. `icode run`, `icode acp` and `icode serve` never check |
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/tui-slash-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ In this table:
| `/language [locale]` | — | Switch the interface language. See [Appearance](../guides/configuration/settings.md#appearance). | `locale`: switch directly to the specified language. Supported values are `system` (follow the system), `en` (English), and `zh-Hans` (Simplified Chinese). With no argument, press **Space** or **Enter** to show available values. |
| `/chdir [path]` | `/cd` | Switch the working directory for the current session. See [Switch working directories in a session](../guides/daily-use/workspaces.md#change-the-working-directory-during-a-session). | `path`: an existing target directory, specified as an absolute path or a path relative to the current working directory. Omit it to open the directory picker. |
| `/copy [N]`<br>`/copy agent [N\|all]`<br>`/copy user [N\|all]`<br>`/copy all` | — | Copy conversation content to the clipboard. | No argument: copy the most recent agent message (text the agent shows between tool calls counts as a separate message).<br>`N`: the number of recent agent messages to copy; must be a positive integer. `/copy N` is shorthand for `/copy agent N`.<br>`agent [N\|all]`: copy the most recent `N` agent messages or all agent messages. If no count is given, copy the most recent one.<br>`user [N\|all]`: copy the most recent `N` user messages or all user messages. If no count is given, copy the most recent one.<br>`all`: copy the full conversation history. |
| `/fold` | — | Collapse or expand all tool call groups and **Thinking** blocks in the current conversation. Collapsed ones show only their headers, making long sessions easier to browse. Thinking that is still being written stays open. | — |
| `/fold` | — | Toggle activity sections, tool call groups and **Thinking** blocks together. If any are open, collapse them all; otherwise expand them all, including details inside activity sections. Thinking that is still being written and controls waiting for your input stay open. | — |
| `/diff` | — | Open the diff view to see files added, modified, and deleted during the current session line by line, so you can review the agent's changes. Files inside the current working directory appear in the directory tree; files outside it appear under **External**, including while a turn is running. | — |
| `/rollback`<br>`/rollback <N>`<br>`/rollback to <N>` | — | Roll back the conversation while keeping current file changes, or roll back the conversation and restore the file changes that iCode can recover. Rollback also stops the [background commands](../guides/configuration/tools.md#commands-that-keep-running-in-the-background) that the discarded turns started. Rollback cannot be undone. | No argument: open the rollback picker, with the most recent available target selected by default. The file restoration option in the lower-left corner of the "Rollback" dialog (its label includes the file count) controls whether file changes are also restored.<br>`N`: immediately discard the most recent `N` turns; must be a positive integer. A turn starts with a user submission and ends when that agent run finishes.<br>`to N`: keep turns 1 through `N` and discard later turns. `N` must be a nonnegative integer; `0` returns to the start of the session.<br>Both `/rollback N` and `/rollback to N` run immediately (iCode asks first only when they would stop running background commands) and restore the file changes from the discarded turns that iCode can recover. |
| `/approval [manual\|auto\|bypass]` | — | Switch the current approval mode. The chosen mode is also saved as the default for the next launch (`bypass` is saved as `auto`). See [Configure approval modes](../guides/configuration/approval.md). | `manual`: the user decides on calls that require approval.<br>`auto`: the approval judge model decides; calls it cannot confirm are safe still go to the user.<br>`bypass`: skip approval for tool calls.<br>No argument: press **Space** or **Enter** to show approval mode suggestions. |
Expand Down
3 changes: 2 additions & 1 deletion docs/zh-Hans/guides/configuration/chat-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,13 @@ GPT-5.6 及之后的模型使用 `prompt_cache_options`,有效期为 `30m`,
| 用途 | 字段名 | 值 |
| --- | --- | --- |
| 提示词缓存 | `extra_body` | `{"cache_control": {"type": "ephemeral"}}` |
| 自适应思考 | `thinking` | `{"type": "adaptive"}` |
| 自适应思考并返回可读摘要 | `thinking` | `{"type": "adaptive", "display": "summarized"}` |
| 固定预算的思考(较早的模型) | `thinking` | `{"type": "enabled", "budget_tokens": 8000}` |
| 投入程度(effort) | `output_config` | `{"effort": "medium"}` |
| 其他地址上较早模型的交错思考 | `additional_beta_flags` | `["interleaved-thinking-2025-05-14"]` |

- 只有支持自适应思考的模型才能使用 `adaptive`;较新的模型会拒绝旧的 `enabled` / `budget_tokens` 形式。普通固定预算思考要求“最大输出词元数”大于 `budget_tokens`,手动交错思考的预算规则有所不同。
- `display: "summarized"` 用于请求服务返回可读的思考摘要。较新的 Claude 模型(包括 Opus 5.5 和 Fable 5.1)默认隐藏这部分文字。请在已有的 `thinking` 对象中加入 `"display": "summarized"`;iCode 的“显示模型思考”设置控制是否显示返回的文字,不会向服务请求摘要。如需让接口隐藏摘要,可改为 `"display": "omitted"`;这不会关闭思考,也不会减少思考词元的费用。
- 较新的 Claude 模型会拒绝非默认的 `temperature`、`top_p` 和 `top_k` 值,请不要设置。
- `additional_beta_flags` 和 `betas` 用于给请求增加 Beta 标志,“HTTP 附加请求头”中的 `anthropic-beta` 也一样。iCode 会把它们排在自己的标志之后,合并到同一个 `anthropic-beta` 请求头中发送。`extra_headers` 行中的 `anthropic-beta` 会替换所有这些标志,包括 iCode 自己的标志;此时 iCode 只补上思考设置所需的标志。
- 在 Anthropic 官方地址上使用固定预算的思考时,iCode 会自动添加交错思考的标志,详见 [Claude 思考设置](./models.md#claude-思考设置)。在其他地址上,请按上表自行添加。自适应思考已自动支持交错思考,无需该标志。交错思考的支持情况因模型而异,服务接受某个 Beta 标志并不代表它实际生效。
Expand Down
4 changes: 3 additions & 1 deletion docs/zh-Hans/guides/configuration/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@

### Claude 思考设置

Claude Opus 5.5、Fable 5.1 和 Sonnet 5.5 会把返回的思考内容与它之前的对话绑定。之前的对话发生变化后(例如 iCode 压缩了上下文),模型服务可能拒绝读回这些思考内容。当这些模型在 Anthropic 官方地址上使用自适应思考(在 [“Chat 选项”](./chat-options.md#anthropic)中设置 `"thinking": {"type": "adaptive"}`)时,iCode 会请服务略去对不上的思考内容,而不是拒绝请求。这样模型看到的早先推理会变少,但请求可以正常完成。对于服务原本不做这项检查的账号,这项要求也会让服务开始检查,对不上的思考内容同样会被略去。
如需使用自适应思考并返回可读摘要,请在 [“Chat 选项”](./chat-options.md#anthropic)中添加 `thinking` 行,值设为 `{"type": "adaptive", "display": "summarized"}`。

Claude Opus 5.5、Fable 5.1 和 Sonnet 5.5 会把返回的思考内容与它之前的对话绑定。之前的对话发生变化后(例如 iCode 压缩了上下文),模型服务可能拒绝读回这些思考内容。当这些模型在 Anthropic 官方地址上使用自适应思考时,iCode 会请服务略去对不上的思考内容,而不是拒绝请求。这样模型看到的早先推理会变少,但请求可以正常完成。对于服务原本不做这项检查的账号,这项要求也会让服务开始检查,对不上的思考内容同样会被略去。

如需更改,请在 iCode 配置目录的 `models` 文件夹中(macOS 和 Linux 为 `~/.chrys/models/`,Windows 为 `%APPDATA%\chrys\models\`;文件中的 `name:` 一行即配置名称)打开该配置的文件,添加一行 `thinking_block_binding`,取下列值之一,然后重启 iCode:

Expand Down
1 change: 1 addition & 0 deletions docs/zh-Hans/guides/configuration/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ iCode 设置控制界面外观、默认智能体、会话、工具、通知和
| 主题 | 切换 TUI 使用的主题。需要调整配色或创建自定义主题时,请参阅[自定义主题](themes.md)。 | 立即 |
| 界面显示语言 | 只改变 iCode 界面文案,不改变会话内容、模型输出语言或已有记录。也可输入 `/language` 切换界面显示语言。| 立即 |
| 显示模型思考 | 模型服务以可读文本返回模型的思考时,在回复上方实时显示。服务只以加密形式返回的思考不会显示。修改后,对话中已有的思考保持不变。 | 新回复及之后打开的会话 |
| 自动折叠已完成轮次 | 默认开启(`ui.chat.fold_finished_turns`)。成功回复后,将思考、工具调用和中间回复收起为**调用了 N 次工具**;没有工具或轮次属于压缩历史时使用**执行过程**。用户消息、中途补充和最终回复始终可见。点击标题可切换单个片段;只用键盘时,输入 `/fold` 可统一收起或展开过程块、工具组和思考。错误、中断以及崩溃恢复的最后一轮保持可见;没有可见最终回复的轮次不自动折叠。已有折叠块保留你的选择。 | 之后完成的轮次及之后打开的会话 |

#### 输入

Expand Down
Loading
Loading