Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 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
2 changes: 2 additions & 0 deletions docs/design/ctrl-o-detail-expand/design.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 设计方案:Ctrl+O 行为重构 —— 对齐 Claude Code 的 Transcript 模型

> **Web Shell 补充**:后续的 [Web Shell thinking visibility and tool progress](../web-shell-thinking-and-tool-progress.md) 已移除本历史设计中保留的 Web Shell 独立 compact mode。

> **⚠️ 已被取代(superseded)**:本文档记录的 **`TranscriptView` + `AlternateScreen` 全详情冻结快照屏** 方案已在后续重构(PR #8077)中**移除**。当前实现中,`Ctrl+O`(与 `Alt+T` 共用 `Command.TOGGLE_THINKING_EXPANDED`)不再打开独立的 transcript 屏,而是**就地切换 full-detail 模式**:通过 `ThoughtExpandedContext.allExpanded` 由 `MainContent` 以 `fullDetail` 下传给每个 `HistoryItemDisplay`,在主视图内联展开所有思考块与工具组(并解除工具结果截断),再按一次收起。下文凡描述独立 transcript 屏与 alt-screen 的章节(如 §3.2、§4.2–§4.5、§9 的栈式 commit 拆分)仅作**历史记录**保留,与现行代码不符。

- 分支:`feat/ctrl-o-detail-expand`
Expand Down
17 changes: 17 additions & 0 deletions docs/design/web-shell-thinking-and-tool-progress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Web Shell thinking visibility and tool progress

## Goal

Let users hide transcript thinking without changing model behavior, make parallel tool summaries describe every active foreground tool until all tools finish, and keep thinking/tool elapsed times stable across transcript replay.

## Design

`App` reuses the existing `Ctrl+O` shortcut for thinking visibility, removes the old Web Shell compact rendering path, and documents the new shortcut in Help. It initializes the preference from `localStorage`, defaults to showing thinking, and does not read or write the compact-mode workspace setting. `MessageList` removes thinking rows only from its rendered item list, leaving the transcript and model behavior unchanged.

Regular tool groups separated only by hidden thinking are merged within the same activity sequence. Visible thinking preserves the original interleaved transcript order. User, assistant, system, plan, approval, agent, todo, and question UI boundaries remain separate. Running tool summaries are derived from all active foreground tools and reuse the existing tool descriptions. Completed summaries remain unchanged and appear only after no tool is active. Expanded tool rows reuse the existing tool-kind icons.

Transcript blocks retain the first and latest daemon timestamps. Thinking and tool messages use that authoritative pair for completed durations only when it contains a positive elapsed interval. Live durations project the elapsed daemon duration onto the client clock, avoiding mixed-clock subtraction while still surviving transcript replay. Legacy and partial records without a usable daemon pair use the client-time pair.

## Compatibility

The default remains to show thinking. Missing, invalid, or unavailable `localStorage` falls back safely. The interactive app adds no URL parameter or settings dependency; the read-only `WebShellTranscript` mirrors the presentation option through an optional `showThinking` prop for embedders without the keyboard shortcut.
4 changes: 2 additions & 2 deletions docs/users/configuration/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Settings are organized into categories. Most settings should be placed within th
| `ui.showCitations` | boolean | Show citations for generated text in the chat. | `false` |
| `ui.history.collapseOnResume` | boolean | Whether to collapse history by default when resuming a session. Can be toggled via `/history collapse-on-resume` and `/history expand-on-resume`. | `false` |
| `ui.history.collapsePreviewCount` | number | Number of most recent user turns to keep visible when `ui.history.collapseOnResume` is enabled. `0` collapses all restored history by default; `-1` shows all restored history. | `0` |
| `ui.compactMode` | boolean | Retired in the terminal UI. The CLI now always shows the compact, type-based tool view in the main transcript; press `Ctrl+O` to toggle expanded detail mode (expand or collapse all thinking blocks and tool outputs inline) instead of toggling a mode. Still honored by the web shell. | `false` |
| `ui.compactMode` | boolean | Retired and ignored by both the terminal UI and Web Shell. In Web Shell, press `Ctrl+O` to show or hide thinking. | `false` |
| `ui.shellOutputMaxLines` | number | Max number of shell output lines shown inline. Set to `0` to disable the cap and show full output. Hidden lines are surfaced via the `+N lines` indicator. Errors, `!`-prefix user-initiated commands, confirming tools, and focused embedded shells always show full output. | `5` |
| `ui.enableWelcomeBack` | boolean | Show welcome back dialog when returning to a project with conversation history. When enabled, Qwen Code will automatically detect if you're returning to a project with a previously generated project summary (`.qwen/PROJECT_SUMMARY.md`) and show a dialog allowing you to continue your previous conversation or start fresh. If you choose **Start new chat session**, that choice is remembered for the current project until the project summary changes. This feature integrates with the `/summary` command and quit confirmation dialog. | `true` |
| `ui.accessibility.enableLoadingPhrases` | boolean | Enable loading phrases (disable for accessibility). | `true` |
Expand All @@ -138,7 +138,7 @@ Settings are organized into categories. Most settings should be placed within th
| `ui.showStatusInTitle` | boolean | Show the Qwen Code session name and status in the terminal window title. | `true` |
| `ui.disableWorkflowKeywordTrigger` | boolean | When `true`, mentioning the word `workflow` in a prompt no longer softly steers the turn toward the Workflow tool (and the Footer `workflow active` indicator is suppressed). Only applies when workflows are enabled. | `false` |
| `ui.enableUserFeedback` | boolean | Show an optional feedback dialog after conversations to help improve Qwen performance. | `true` |
| `ui.compactInline` | boolean | Compact tool display within each group instead of merging across groups. Requires `ui.compactMode` to be enabled. Requires restart. | `false` |
| `ui.compactInline` | boolean | Retired and ignored with `ui.compactMode`. | `false` |
| `ui.useTerminalBuffer` | boolean | Render conversation history in an in-app scrollable viewport instead of the terminal scrollback buffer. Enabled by default in compatible interactive terminals to avoid flicker, scroll-storm, and interface freeze on long sessions. Scroll with `Shift+↑/↓` (line), `PgUp`/`PgDn` (page), `Ctrl+Home/End` (top/bottom), or the mouse wheel. Does not use the host terminal scrollback while enabled; drag to select text (double/triple click selects a word/line), or hold `Shift` (or `Option` on macOS) while dragging for the terminal's own selection. Mouse interactions (wheel, drag-select, click, hover) require `ui.mouseTracking` (on by default). | `true` |
| `ui.showScrollbar` | boolean | Show the auto-hiding scrollbar in the in-app scrollable viewport (Virtualized History). The bar appears while scrolling and fades out when idle. Disable to hide it entirely. Only applies in the interactive terminal UI. | `true` |
| `ui.mouseTracking` | boolean | Enable in-app SGR mouse tracking for text selection, click-to-position in text inputs, row hover, history-item toggling, and viewport scrolling. While enabled, the terminal forwards all mouse events to the app, so native right-click context menus and OSC 8 hyperlink clicks are unavailable. Disable to restore native right-click and clickable URL links; this turns off all in-app mouse interaction, and in Virtualized History the wheel no longer scrolls the transcript — use Shift+↑/↓, PgUp/PgDn, or Ctrl+Home/End instead (pair with `ui.useTerminalBuffer: false` to restore native terminal scrollback). Only applies in the interactive terminal UI. | `true` |
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/src/config/settingsSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ describe('SettingsSchema', () => {
expect(getSettingsSchema().ui.properties.accessibility.showInDialog).toBe(
false,
);
expect(getSettingsSchema().ui.properties).not.toHaveProperty(
'compactMode',
);
expect(
getSettingsSchema().context.properties.fileFiltering.showInDialog,
).toBe(false);
Expand Down
14 changes: 0 additions & 14 deletions packages/cli/src/config/settingsSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1061,20 +1061,6 @@ const SETTINGS_SCHEMA = {
description: 'The last time the feedback dialog was shown.',
showInDialog: false,
},
compactMode: {
type: 'boolean',
label: 'Compact Mode',
category: 'UI',
requiresRestart: false,
default: false,
// Retired from the TUI (compact tool output is now always-on there, and
// Ctrl+O opens the transcript instead of toggling this). Kept as a
// hidden, schema-only setting so the web shell's independent compact
// toggle can still persist via the daemon settings routes (mirrors
// `voiceModel`). Not shown in the TUI settings dialog.
description: 'Compact view (web shell only; not used by the TUI).',
showInDialog: false,
},
useTerminalBuffer: {
type: 'boolean',
label: 'Virtualized History (reduces flicker on long sessions)',
Expand Down
14 changes: 14 additions & 0 deletions packages/cli/src/serve/routes/workspace-settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,20 @@ describe('POST /workspace/settings', () => {
expect(persistSetting).not.toHaveBeenCalled();
});

it('rejects the retired compact mode setting', async () => {
const { app, persistSetting } = makeApp();

const res = await request(app).post('/workspace/settings').send({
scope: 'user',
key: 'ui.compactMode',
value: true,
});

expect(res.status).toBe(400);
expect(res.body).toMatchObject({ code: 'disallowed_key' });
expect(persistSetting).not.toHaveBeenCalled();
});

it.each(['ui.mouseTracking', 'ui.showScrollbar'])(
'rejects a TUI-only key (%s) that has no effect in the web shell',
async (key) => {
Expand Down
6 changes: 1 addition & 5 deletions packages/cli/src/serve/routes/workspace-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ const TUI_ONLY_SETTINGS = new Set([
// `voiceModel` is `showInDialog: false` (so not in the dialog allowlist), but
// the Web Shell `/model --voice` picker needs to read + persist it; the daemon
// `/voice/stream` then reads it back via `loadSettings`.
const WEB_SHELL_SETTINGS = new Set([
'ui.compactMode',
'voiceModel',
'mcpServers',
]);
const WEB_SHELL_SETTINGS = new Set(['voiceModel', 'mcpServers']);

const LIVE_WEB_SHELL_SETTINGS = [
'experimental.liveVoice.enabled',
Expand Down
Loading
Loading