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
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 模型

> **⚠️ 已被取代(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`
- worktree:`<worktree-path>`
- 状态:**实现进行中——本文档为当前 PR 实现的验收基线**(非 docs-only;当前 PR 已含实现文件改动)
Expand Down
2 changes: 1 addition & 1 deletion 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 open the full-detail transcript instead of toggling a mode. Still honored by the web shell. | `false` |
| `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.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 Down
14 changes: 7 additions & 7 deletions docs/users/features/tool-use-summaries.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tool-Use Summaries

Qwen Code can generate a short, git-commit-subject-style label after each tool batch completes, summarizing what the batch accomplished. The label appears inline: for a completed tool group in the main view it replaces the generic `Tool × N` header; when the group is force-expanded (in the `Ctrl+O` full-detail transcript, or for error / user-initiated batches) it appears as a dim `● <label>` line below the group.
Qwen Code can generate a short, git-commit-subject-style label after each tool batch completes, summarizing what the batch accomplished. The label appears inline: for a completed tool group in the main view it replaces the generic `Tool × N` header; when the group is force-expanded (in `Ctrl+O` expanded detail mode, or for error / user-initiated batches) it appears as a dim `● <label>` line below the group.

This is a UX aid for parallel tool calls: when the model fans out into several `Read` + `Grep` + `Bash` calls at once, the summary tells you the intent at a glance instead of forcing you to scan the tool list.

Expand All @@ -18,11 +18,11 @@ In the main transcript, a completed collapsible batch folds into a single labele
╰──────────────────────────────────────────────╯
```

The full per-tool output is a keystroke away: press `Ctrl+O` to open the full-detail transcript.
The full per-tool output is a keystroke away: press `Ctrl+O` to toggle expanded detail mode.

### Full-detail transcript (`Ctrl+O`) and force-expanded groups
### Expanded detail mode (`Ctrl+O`) and force-expanded groups

When a group is force-expanded — in the `Ctrl+O` transcript, or for error / user-initiated batches in the main view — each tool renders individually and the summary appears as a dim badge line below the group:
When a group is force-expanded — in `Ctrl+O` expanded detail mode, or for error / user-initiated batches in the main view — each tool renders individually and the summary appears as a dim badge line below the group:

```
╭──────────────────────────────────────────────╮
Expand Down Expand Up @@ -122,7 +122,7 @@ These settings can be configured in `settings.json`:

Three points that tend to trip up a first read of this feature:

1. **One generation per batch, shared by both display modes.** The fast-model call happens exactly once in `handleCompletedTools` when a tool batch finalizes. Opening the `Ctrl+O` transcript afterwards does **not** trigger a new call — both the main view and the full-detail transcript read from the same `tool_use_summary` history entry that was captured the first time.
1. **One generation per batch, shared by both display modes.** The fast-model call happens exactly once in `handleCompletedTools` when a tool batch finalizes. Toggling `Ctrl+O` expanded detail mode afterwards does **not** trigger a new call — both the collapsed and the expanded rendering read from the same `tool_use_summary` history entry that was captured the first time.
2. **No backfill on toggle or on session resume.** A `tool_group` that completed before the feature was enabled (or before you flipped the setting on, or in a resumed session — `ChatRecordingService` does not persist summary entries) will never get a label. There is no "sweep existing history" pass. If you turn this setting on mid-session, only _future_ batches will show a label; older groups keep the default rendering with no indicator that a label is missing.
3. **Main-agent batches only.** The trigger lives in the main session's turn loop (`useGeminiStream`), so:
- ✅ Shell, MCP, file operations, and the `Task` / subagent tool _call itself_ (as it appears in the main batch) are summarized.
Expand All @@ -132,7 +132,7 @@ Three points that tend to trip up a first read of this feature:

## Display behavior

The main view already folds a completed collapsible batch into a single labeled row (`✓ Read 4 text files`) — the summary does the work of the old per-tool list. For full per-tool detail, press `Ctrl+O` to open the full-detail transcript, where each tool renders individually with the summary as a trailing `● <label>` line below the group.
The main view already folds a completed collapsible batch into a single labeled row (`✓ Read 4 text files`) — the summary does the work of the old per-tool list. For full per-tool detail, press `Ctrl+O` to toggle expanded detail mode, where each tool renders individually with the summary as a trailing `● <label>` line below the group.

```json
{
Expand Down Expand Up @@ -170,5 +170,5 @@ If you do not want the extra cost, turn the feature off via `experimental.emitTo

## Related

- [Full-detail transcript](../configuration/settings#ui) — press `Ctrl+O` to open the frozen full-detail transcript; the summary replaces the generic tool-group header for completed groups in the main view.
- [Expanded detail mode](../configuration/settings#ui) — press `Ctrl+O` to expand all tool outputs inline; the summary replaces the generic tool-group header for completed groups in the main view.
- [Followup Suggestions](./followup-suggestions) — another fast-model-driven UX enhancement that shares the same `fastModel` setting.
2 changes: 1 addition & 1 deletion docs/users/reference/keyboard-shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This document lists the available keyboard shortcuts in Qwen Code.
| `Ctrl+C` | Cancel the ongoing request and clear the input. Press twice to exit the application. |
| `Ctrl+D` | Exit the application if the input is empty. Press twice to confirm. |
| `Ctrl+L` | Clear the screen. |
| `Ctrl+O` | Open/close the full-detail transcript view (a scrollable, frozen snapshot showing every tool's complete output and full thinking). Press again, or `Esc`/`q`, to close. |
| `Ctrl+O` | Toggle expanded detail mode: expand or collapse all thinking blocks and tool outputs inline. Press again to collapse. When `ui.useTerminalBuffer` is off, toggling redraws the full conversation with untruncated output into terminal scrollback. |
| `Ctrl+S` | Stashes non-empty input for the current project and restores it on the next launch. With empty input, allows long responses to print fully, disabling truncation. Use your terminal's scrollback to view the entire output. |
| `Ctrl+T` | Toggle the display of tool descriptions. |
| `Ctrl+B` | While a foreground shell command is running: promote it to a background task. The child keeps running, the agent's turn unblocks, and the shell appears in `/tasks` + the Background tasks dialog. No-op when no shell is executing — Ctrl+B then falls through to its prompt-area binding (cursor-left). |
Expand Down
13 changes: 5 additions & 8 deletions packages/cli/src/config/keyBindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ export enum Command {
// Thinking expansion
TOGGLE_THINKING_EXPANDED = 'toggleThinkingExpanded',

// Transcript full-detail screen (Ctrl+O)
TOGGLE_TRANSCRIPT = 'toggleTranscript',

// Scroll commands
SCROLL_UP = 'scrollUp',
SCROLL_DOWN = 'scrollDown',
Expand Down Expand Up @@ -266,11 +263,11 @@ export const defaultKeyBindings: KeyBindingConfig = {
[Command.EXPAND_SUGGESTION]: [{ key: 'right' }],
[Command.COLLAPSE_SUGGESTION]: [{ key: 'left' }],

// Thinking expansion
[Command.TOGGLE_THINKING_EXPANDED]: [{ key: 't', meta: true }],

// Transcript full-detail screen
[Command.TOGGLE_TRANSCRIPT]: [{ key: 'o', ctrl: true }],
// Thinking expansion (Ctrl+O primary, Alt+T legacy)
[Command.TOGGLE_THINKING_EXPANDED]: [
{ key: 'o', ctrl: true },
{ key: 't', meta: true },
],
Comment thread
qwen-code-dev-bot marked this conversation as resolved.

// Scroll commands
[Command.SCROLL_UP]: [{ key: 'up', shift: true }],
Expand Down
5 changes: 1 addition & 4 deletions packages/cli/src/i18n/locales/ca.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {
'to search history': "per cercar a l'historial",
'to paste images': 'per enganxar imatges',
'for external editor': 'per a editor extern',
'to view transcript': 'per veure la transcripció',
'to expand details': 'per expandir els detalls',
'Jump through words in the input': "Salta entre paraules a l'entrada",
'Close dialogs, cancel requests, or quit application':
"Tanca els diàlegs, cancel·la les peticions o surt de l'aplicació",
Expand Down Expand Up @@ -252,9 +252,6 @@ export default {
'Unknown Step': 'Pas desconegut',
'Esc to close': 'Esc per tancar',
Transcript: 'Transcripció',
'to close': 'per tancar',
'to scroll': 'per desplaçar',
'Failed to render transcript.': 'Error en renderitzar la transcripció.',
'Read {{count}} file': 'Ha llegit {{count}} fitxer',
'Read {{count}} files': 'Ha llegit {{count}} fitxers',
'Reading {{count}} file': 'Llegint {{count}} fitxer',
Expand Down
5 changes: 1 addition & 4 deletions packages/cli/src/i18n/locales/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ export default {
'Unknown Step': 'Unbekannter Schritt',
'Esc to close': 'Esc zum Schließen',
Transcript: 'Transkript',
'to close': 'zum Schließen',
'to scroll': 'zum Scrollen',
'Failed to render transcript.': 'Transkript konnte nicht gerendert werden.',
'Read {{count}} file': '{{count}} Datei gelesen',
'Read {{count}} files': '{{count}} Dateien gelesen',
'Reading {{count}} file': 'Lese {{count}} Datei',
Expand Down Expand Up @@ -1911,7 +1908,7 @@ export default {
'Raw-Modus nicht verfügbar. Bitte in einem interaktiven Terminal ausführen.',
'(Use ↑ ↓ arrows to navigate, Enter to select, Ctrl+C to exit)\n':
'(↑ ↓ Pfeiltasten zum Navigieren, Enter zum Auswählen, Ctrl+C zum Beenden)\n',
'to view transcript': 'zum Anzeigen des Transkripts',
'to expand details': 'zum Erweitern der Details',
'Switch to plan mode or exit plan mode':
'In den Plan-Modus wechseln oder den Plan-Modus verlassen',
'Set how hard reasoning-capable models think ({{tiers}}); mapped and clamped per provider.':
Expand Down
5 changes: 1 addition & 4 deletions packages/cli/src/i18n/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export default {
'to search history': 'to search history',
'to paste images': 'to paste images',
'for external editor': 'for external editor',
'to view transcript': 'to view transcript',
'to expand details': 'to expand details',
'Jump through words in the input': 'Jump through words in the input',
'Close dialogs, cancel requests, or quit application':
'Close dialogs, cancel requests, or quit application',
Expand Down Expand Up @@ -506,9 +506,6 @@ export default {
'Unknown Step': 'Unknown Step',
'Esc to close': 'Esc to close',
Transcript: 'Transcript',
'to close': 'to close',
'to scroll': 'to scroll',
'Failed to render transcript.': 'Failed to render transcript.',
'Read {{count}} file': 'Read {{count}} file',
'Read {{count}} files': 'Read {{count}} files',
'Reading {{count}} file': 'Reading {{count}} file',
Expand Down
5 changes: 1 addition & 4 deletions packages/cli/src/i18n/locales/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ export default {
'Unknown Step': 'Étape inconnue',
'Esc to close': 'Esc pour fermer',
Transcript: 'Transcription',
'to close': 'pour fermer',
'to scroll': 'pour défiler',
'Failed to render transcript.': 'Échec du rendu de la transcription.',
'Read {{count}} file': 'Lu {{count}} fichier',
'Read {{count}} files': 'Lu {{count}} fichiers',
'Reading {{count}} file': 'Lecture de {{count}} fichier',
Expand Down Expand Up @@ -2045,7 +2042,7 @@ export default {
'Afficher le détail de l’utilisation du contexte par élément.',

// === Missing key backfill ===
'to view transcript': 'pour voir la transcription',
'to expand details': 'pour développer les détails',
'The name of the extension to update.':
"Le nom de l'extension à mettre à jour.",
'Session (temporary)': 'Session (temporaire)',
Expand Down
5 changes: 1 addition & 4 deletions packages/cli/src/i18n/locales/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ export default {
'Unknown Step': '不明なステップ',
'Esc to close': 'Esc で閉じる',
Transcript: 'トランスクリプト',
'to close': '閉じる',
'to scroll': 'スクロール',
'Failed to render transcript.': 'トランスクリプトの描画に失敗しました。',
'Read {{count}} file': '{{count}} 件のファイルを読み込みました',
'Read {{count}} files': '{{count}} 件のファイルを読み込みました',
'Reading {{count}} file': '{{count}} 件のファイルを読み込み中',
Expand Down Expand Up @@ -1449,7 +1446,7 @@ export default {
'Rawモードが利用できません。インタラクティブターミナルで実行してください。',
'(Use ↑ ↓ arrows to navigate, Enter to select, Ctrl+C to exit)\n':
'(↑ ↓ 矢印キーで移動、Enter で選択、Ctrl+C で終了)\n',
'to view transcript': 'トランスクリプトを表示',
'to expand details': '詳細を展開',
'Switch to plan mode or exit plan mode':
'プランモードに切り替えるか、プランモードを終了する',
'Set how hard reasoning-capable models think ({{tiers}}); mapped and clamped per provider.':
Expand Down
Loading
Loading