From 2fa50a88c2a3959eb4308df90baf3c21d7854f8a Mon Sep 17 00:00:00 2001 From: "jifeng.zjd" Date: Fri, 27 Mar 2026 20:53:59 +0800 Subject: [PATCH 001/208] feat: customize branding for DataWorks DataAgent Update ASCII logo and header title to reflect DataWorks DataAgent branding while acknowledging it's powered by Qwen Code. Co-authored-by: Qwen-Coder --- packages/cli/src/ui/components/AsciiArt.ts | 12 ++++++------ packages/cli/src/ui/components/Header.tsx | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/ui/components/AsciiArt.ts b/packages/cli/src/ui/components/AsciiArt.ts index c70a38f4cb5..b3d259b3ca9 100644 --- a/packages/cli/src/ui/components/AsciiArt.ts +++ b/packages/cli/src/ui/components/AsciiArt.ts @@ -5,10 +5,10 @@ */ export const shortAsciiLogo = ` - ▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄ -██╔═══██╗██║ ██║██╔════╝████╗ ██║ -██║ ██║██║ █╗ ██║█████╗ ██╔██╗ ██║ -██║▄▄ ██║██║███╗██║██╔══╝ ██║╚██╗██║ -╚██████╔╝╚███╔███╔╝███████╗██║ ╚████║ - ╚══▀▀═╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═══╝ +██████╗ █████╗ ████████╗ █████╗ ██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗ +██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗██║ ██║██╔═══██╗██╔══██╗██║ ██╔╝██╔════╝ +██║ ██║███████║ ██║ ███████║██║ █╗ ██║██║ ██║██████╔╝█████╔╝ ███████╗ +██║ ██║██╔══██║ ██║ ██╔══██║██║███╗██║██║ ██║██╔══██╗██╔═██╗ ╚════██║ +██████╔╝██║ ██║ ██║ ██║ ██║╚███╔███╔╝╚██████╔╝██║ ██║██║ ██╗███████║ +╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ `; diff --git a/packages/cli/src/ui/components/Header.tsx b/packages/cli/src/ui/components/Header.tsx index 2d919385f59..fee6891286b 100644 --- a/packages/cli/src/ui/components/Header.tsx +++ b/packages/cli/src/ui/components/Header.tsx @@ -134,10 +134,10 @@ export const Header: React.FC = ({ flexGrow={showLogo ? 0 : 1} width={showLogo ? availableInfoPanelWidth : undefined} > - {/* Title line: >_ Qwen Code (v{version}) */} + {/* Title line: >_ DataWorks DataAgent (v{version}) */} - >_ Qwen Code + >_ DataWorks DataAgent (Power by Qwen Code) (v{version}) From 27a44cbd92016fb5b652b3523b961c7552cc78ab Mon Sep 17 00:00:00 2001 From: "jifeng.zjd" Date: Fri, 27 Mar 2026 21:30:44 +0800 Subject: [PATCH 002/208] feat: add DataWorks DataAgent branding in header Co-authored-by: Qwen-Coder --- packages/cli/src/ui/components/Header.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/ui/components/Header.tsx b/packages/cli/src/ui/components/Header.tsx index fee6891286b..ad67d133f27 100644 --- a/packages/cli/src/ui/components/Header.tsx +++ b/packages/cli/src/ui/components/Header.tsx @@ -139,10 +139,12 @@ export const Header: React.FC = ({ >_ DataWorks DataAgent (Power by Qwen Code) - (v{version}) + (v{version}) {/* Empty line for spacing */} - + + Built-in DataWorks Official Skills{' '} + {/* Auth and Model line */} {authModelText} From b8585686a53bc30f544ae0a13d0274427bac8356 Mon Sep 17 00:00:00 2001 From: "jifeng.zjd" Date: Fri, 27 Mar 2026 21:33:13 +0800 Subject: [PATCH 003/208] fix: remove trailing space in header Co-authored-by: Qwen-Coder --- packages/cli/src/ui/components/Header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/ui/components/Header.tsx b/packages/cli/src/ui/components/Header.tsx index ad67d133f27..a08d932485e 100644 --- a/packages/cli/src/ui/components/Header.tsx +++ b/packages/cli/src/ui/components/Header.tsx @@ -143,7 +143,7 @@ export const Header: React.FC = ({ {/* Empty line for spacing */} - Built-in DataWorks Official Skills{' '} + Built-in DataWorks Official Skills {/* Auth and Model line */} From 62a2cbaf7f897bb6fa542538c8c29b12b7490eab Mon Sep 17 00:00:00 2001 From: "jinjing.zzj" Date: Fri, 27 Mar 2026 21:54:23 +0800 Subject: [PATCH 004/208] build: update package names and versions for publishing Co-developed-by: Aone Copilot --- package-lock.json | 1 + packages/cli/package.json | 11 +++++++---- packages/core/package.json | 7 +++++-- packages/web-templates/package.json | 7 +++++-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 81261d49d4b..b3b3e464056 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14285,6 +14285,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } diff --git a/packages/cli/package.json b/packages/cli/package.json index dd22a8f6e85..3d9ffa70fd4 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { - "name": "@qwen-code/qwen-code", - "version": "0.13.1", + "name": "@alife/dataworks-qwen-code", + "version": "0.0.2", "description": "Qwen Code", "repository": { "type": "git", @@ -35,13 +35,16 @@ "config": { "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.13.1" }, + "publishConfig": { + "registry": "https://registry.anpm.alibaba-inc.com" + }, "dependencies": { "@agentclientprotocol/sdk": "^0.14.1", "@google/genai": "1.30.0", "@iarna/toml": "^2.2.5", "@modelcontextprotocol/sdk": "^1.25.1", - "@qwen-code/qwen-code-core": "file:../core", - "@qwen-code/web-templates": "file:../web-templates", + "@qwen-code/qwen-code-core": "npm:@alife/dataworks-qwen-code-core@^0.0.1", + "@qwen-code/web-templates": "npm:@alife/dataworks-qwen-code-web-templates@^0.0.1", "@types/update-notifier": "^6.0.8", "ansi-regex": "^6.2.2", "command-exists": "^1.2.9", diff --git a/packages/core/package.json b/packages/core/package.json index 9498803ff51..656a722f802 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { - "name": "@qwen-code/qwen-code-core", - "version": "0.13.1", + "name": "@alife/dataworks-qwen-code-core", + "version": "0.0.1", "description": "Qwen Code Core", "repository": { "type": "git", @@ -22,6 +22,9 @@ "vendor", "scripts/postinstall.js" ], + "publishConfig": { + "registry": "https://registry.anpm.alibaba-inc.com" + }, "dependencies": { "@anthropic-ai/sdk": "^0.36.1", "@google/genai": "1.30.0", diff --git a/packages/web-templates/package.json b/packages/web-templates/package.json index bb63ea5b4ff..334914651ae 100644 --- a/packages/web-templates/package.json +++ b/packages/web-templates/package.json @@ -1,6 +1,6 @@ { - "name": "@qwen-code/web-templates", - "version": "0.13.1", + "name": "@alife/dataworks-qwen-code-web-templates", + "version": "0.0.1", "description": "Web templates bundled as embeddable JS/CSS strings", "repository": { "type": "git", @@ -22,6 +22,9 @@ "files": [ "dist" ], + "publishConfig": { + "registry": "https://registry.anpm.alibaba-inc.com" + }, "dependencies": {}, "devDependencies": { "@types/react": "^18.2.0", From 129f918406ac774fa12fdee2680f5393505217c8 Mon Sep 17 00:00:00 2001 From: "jifeng.zjd" Date: Fri, 27 Mar 2026 21:56:42 +0800 Subject: [PATCH 005/208] feat: update ASCII logo for DataWorks branding Co-authored-by: Qwen-Coder --- packages/cli/src/ui/components/AsciiArt.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/ui/components/AsciiArt.ts b/packages/cli/src/ui/components/AsciiArt.ts index b3d259b3ca9..e78127c3d45 100644 --- a/packages/cli/src/ui/components/AsciiArt.ts +++ b/packages/cli/src/ui/components/AsciiArt.ts @@ -5,10 +5,12 @@ */ export const shortAsciiLogo = ` -██████╗ █████╗ ████████╗ █████╗ ██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗ -██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗██║ ██║██╔═══██╗██╔══██╗██║ ██╔╝██╔════╝ -██║ ██║███████║ ██║ ███████║██║ █╗ ██║██║ ██║██████╔╝█████╔╝ ███████╗ -██║ ██║██╔══██║ ██║ ██╔══██║██║███╗██║██║ ██║██╔══██╗██╔═██╗ ╚════██║ -██████╔╝██║ ██║ ██║ ██║ ██║╚███╔███╔╝╚██████╔╝██║ ██║██║ ██╗███████║ -╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ -`; +██████╗ █████╗ ████████╗ █████╗ █████╗ ██████╗ ███████╗███╗ ██╗████████╗ +██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗ ██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝ +██║ ██║███████║ ██║ ███████║ ███████║██║ ███╗█████╗ ██╔██╗ ██║ ██║ +██║ ██║██╔══██║ ██║ ██╔══██║ ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ +██████╔╝██║ ██║ ██║ ██║ ██║ ██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ +╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ + + + `; From ae0c47f06b9cad05e589f7cd9e88452cc20fa8fb Mon Sep 17 00:00:00 2001 From: "jinjing.zzj" Date: Fri, 27 Mar 2026 23:01:10 +0800 Subject: [PATCH 006/208] build: bump cli package version to 0.0.3 Co-developed-by: Aone Copilot --- packages/cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 3d9ffa70fd4..ea15d6511a2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@alife/dataworks-qwen-code", - "version": "0.0.2", + "version": "0.0.3", "description": "Qwen Code", "repository": { "type": "git", From 8005060105221b04dc1fb0dd023cb740b8e63d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E5=A5=87?= Date: Mon, 30 Mar 2026 20:28:35 +0800 Subject: [PATCH 007/208] docs: add verbose/compact mode implementation plan Co-Authored-By: Claude Sonnet 4.6 --- .../plans/2026-03-30-verbose-compact-mode.md | 863 ++++++++++++++++++ 1 file changed, 863 insertions(+) create mode 100644 docs/superpowers/plans/2026-03-30-verbose-compact-mode.md diff --git a/docs/superpowers/plans/2026-03-30-verbose-compact-mode.md b/docs/superpowers/plans/2026-03-30-verbose-compact-mode.md new file mode 100644 index 00000000000..9526d1c6fa1 --- /dev/null +++ b/docs/superpowers/plans/2026-03-30-verbose-compact-mode.md @@ -0,0 +1,863 @@ +# Verbose / Compact Mode Toggle Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Add a Ctrl+O hot-toggle between compact mode (default, hides tool results + thinking) and verbose mode (shows everything), persisted to settings.json. + +**Architecture:** New read-only `VerboseModeContext` provides a `verboseMode: boolean` to any descendant. `AppContainer` owns the state, persists to `settings.json`, and handles the Ctrl+O keypress. Two render sites consume the context: `HistoryItemDisplay` (hides thought items) and `ToolMessage` (hides `resultDisplay`). The Footer shows a `verbose` label when active. + +**Tech Stack:** React 19 + Ink 6, Vitest, ink-testing-library, existing `keyBindings` / `settingsSchema` / `historyManager` patterns. + +--- + +## File Map + +| File | Action | Responsibility | +|------|--------|---------------| +| `packages/cli/src/ui/contexts/VerboseModeContext.tsx` | **CREATE** | Context definition, `useVerboseMode` hook, `VerboseModeProvider` export | +| `packages/cli/src/config/settingsSchema.ts` | modify | Add `ui.verboseMode: boolean` field | +| `packages/cli/src/config/keyBindings.ts` | modify | Add `TOGGLE_VERBOSE_MODE` command + Ctrl+O binding | +| `packages/cli/src/ui/AppContainer.tsx` | modify | State init, keypress handler, Provider mount | +| `packages/cli/src/ui/components/HistoryItemDisplay.tsx` | modify | Hide `gemini_thought` / `gemini_thought_content` in compact mode | +| `packages/cli/src/ui/components/messages/ToolMessage.tsx` | modify | Hide `resultDisplay` in compact mode via `effectiveDisplayRenderer` | +| `packages/cli/src/ui/components/Footer.tsx` | modify | Show `verbose` label in right section when verbose mode active | +| `packages/cli/src/i18n/locales/en.js` | modify | Add 4 i18n keys | +| `packages/cli/src/i18n/locales/zh.js` | modify | Add 4 i18n keys (Chinese translations) | +| `packages/cli/src/i18n/locales/de.js` | modify | Add 4 i18n keys (English placeholder) | +| `packages/cli/src/i18n/locales/ja.js` | modify | Add 4 i18n keys (English placeholder) | +| `packages/cli/src/i18n/locales/ru.js` | modify | Add 4 i18n keys (English placeholder) | +| `packages/cli/src/i18n/locales/pt.js` | modify | Add 4 i18n keys (English placeholder) | +| `docs/users/reference/keyboard-shortcuts.md` | modify | Update Ctrl+O description | +| `packages/cli/src/ui/keyMatchers.test.ts` | modify | Add 2 test cases for TOGGLE_VERBOSE_MODE binding | +| `packages/cli/src/ui/components/messages/ToolMessage.test.tsx` | modify | Update `renderWithContext` + add 2 verbose mode test cases | +| `packages/cli/src/ui/components/HistoryItemDisplay.test.tsx` | modify | Add 2 test cases for thought visibility | +| `packages/cli/src/ui/components/Footer.test.tsx` | modify | Add 2 test cases for verbose indicator | + +--- + +## Task 1: Create VerboseModeContext + +**Files:** +- Create: `packages/cli/src/ui/contexts/VerboseModeContext.tsx` + +- [ ] **Step 1: Create the context file** + +```typescript +/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import React, { createContext, useContext } from 'react'; + +interface VerboseModeContextType { + verboseMode: boolean; +} + +const VerboseModeContext = createContext({ + verboseMode: false, // default: compact mode +}); + +export const useVerboseMode = (): VerboseModeContextType => + useContext(VerboseModeContext); + +export const VerboseModeProvider = VerboseModeContext.Provider; +``` + +- [ ] **Step 2: Run TypeScript check to confirm the file is valid** + +```bash +cd packages/cli && npx tsc --noEmit 2>&1 | head -20 +``` + +Expected: no errors related to VerboseModeContext.tsx + +- [ ] **Step 3: Commit** + +```bash +git add packages/cli/src/ui/contexts/VerboseModeContext.tsx +git commit -m "feat: add VerboseModeContext for compact/verbose toggle" +``` + +--- + +## Task 2: Add Key Binding + Failing Test + +**Files:** +- Modify: `packages/cli/src/config/keyBindings.ts` +- Modify: `packages/cli/src/ui/keyMatchers.test.ts` + +- [ ] **Step 1: Write the failing test first** + +Open `packages/cli/src/ui/keyMatchers.test.ts` and add this `describe` block **before the final closing `});`** of the outer `describe('keyMatchers', ...)`: + +```typescript +describe('TOGGLE_VERBOSE_MODE binding', () => { + it('matches Ctrl+O', () => { + expect( + keyMatchers[Command.TOGGLE_VERBOSE_MODE]( + createKey('o', { ctrl: true }), + ), + ).toBe(true); + }); + + it('does not match plain O', () => { + expect( + keyMatchers[Command.TOGGLE_VERBOSE_MODE]( + createKey('o', { ctrl: false }), + ), + ).toBe(false); + }); +}); +``` + +- [ ] **Step 2: Run to confirm test fails** (Command.TOGGLE_VERBOSE_MODE doesn't exist yet) + +```bash +cd packages/cli && npx vitest run src/ui/keyMatchers.test.ts 2>&1 | tail -20 +``` + +Expected: TypeScript/import error — `TOGGLE_VERBOSE_MODE` is not a member of `Command` + +- [ ] **Step 3: Add the enum member and binding to keyBindings.ts** + +In `packages/cli/src/config/keyBindings.ts`, find line 48 (the `TOGGLE_TOOL_DESCRIPTIONS` line) and add the new enum member after it: + +```typescript +// BEFORE (around line 47-49): + // App level bindings + TOGGLE_TOOL_DESCRIPTIONS = 'toggleToolDescriptions', + TOGGLE_IDE_CONTEXT_DETAIL = 'toggleIDEContextDetail', + +// AFTER: + // App level bindings + TOGGLE_TOOL_DESCRIPTIONS = 'toggleToolDescriptions', + TOGGLE_VERBOSE_MODE = 'toggleVerboseMode', + TOGGLE_IDE_CONTEXT_DETAIL = 'toggleIDEContextDetail', +``` + +Then find line 169 (the `TOGGLE_TOOL_DESCRIPTIONS` binding) and add the new binding after it: + +```typescript +// BEFORE (around line 168-170): + // App level bindings + [Command.TOGGLE_TOOL_DESCRIPTIONS]: [{ key: 't', ctrl: true }], + [Command.TOGGLE_IDE_CONTEXT_DETAIL]: [{ key: 'g', ctrl: true }], + +// AFTER: + // App level bindings + [Command.TOGGLE_TOOL_DESCRIPTIONS]: [{ key: 't', ctrl: true }], + [Command.TOGGLE_VERBOSE_MODE]: [{ key: 'o', ctrl: true }], + [Command.TOGGLE_IDE_CONTEXT_DETAIL]: [{ key: 'g', ctrl: true }], +``` + +- [ ] **Step 4: Run the test to confirm it passes** + +```bash +cd packages/cli && npx vitest run src/ui/keyMatchers.test.ts 2>&1 | tail -20 +``` + +Expected: all tests pass, including the 2 new TOGGLE_VERBOSE_MODE cases + +- [ ] **Step 5: Commit** + +```bash +git add packages/cli/src/config/keyBindings.ts packages/cli/src/ui/keyMatchers.test.ts +git commit -m "feat: add TOGGLE_VERBOSE_MODE command and Ctrl+O key binding" +``` + +--- + +## Task 3: Add Settings Schema Field + +**Files:** +- Modify: `packages/cli/src/config/settingsSchema.ts` + +- [ ] **Step 1: Add the verboseMode field** + +In `packages/cli/src/config/settingsSchema.ts`, find the `enableUserFeedback` property block (around line 494–503) and insert the new field **after its closing `},`** and **before the `accessibility` property**: + +```typescript +// BEFORE (lines 502-505): + showInDialog: true, + }, + accessibility: { + +// AFTER: + showInDialog: true, + }, + verboseMode: { + type: 'boolean', + label: 'Verbose Mode', + category: 'UI', + requiresRestart: false, + default: false, + description: + 'Show full tool output and thinking in verbose mode (toggle with ctrl+o).', + showInDialog: false, + }, + accessibility: { +``` + +- [ ] **Step 2: Verify TypeScript can infer the new type** + +```bash +cd packages/cli && npx tsc --noEmit 2>&1 | grep -i verbose +``` + +Expected: no output (no errors) + +- [ ] **Step 3: Commit** + +```bash +git add packages/cli/src/config/settingsSchema.ts +git commit -m "feat: add ui.verboseMode setting to schema" +``` + +--- + +## Task 4: Update ToolMessage — Write Failing Test, Then Implement + +**Files:** +- Modify: `packages/cli/src/ui/components/messages/ToolMessage.test.tsx` +- Modify: `packages/cli/src/ui/components/messages/ToolMessage.tsx` + +- [ ] **Step 1: Update renderWithContext in ToolMessage.test.tsx to include VerboseModeProvider** + +The existing `renderWithContext` function (around line 104–117) must wrap with `VerboseModeProvider value={{ verboseMode: true }}` so existing tests (which test result visibility) continue to pass after we hide results in compact mode. + +At the top of the file, add the import after the other context imports (around line 14): + +```typescript +import { VerboseModeProvider } from '../../../ui/contexts/VerboseModeContext.js'; +``` + +Then update `renderWithContext`: + +```typescript +// BEFORE: +const renderWithContext = ( + ui: React.ReactElement, + streamingState: StreamingState, +) => { + const contextValue: StreamingState = streamingState; + return render( + + + {ui} + + , + ); +}; + +// AFTER: +const renderWithContext = ( + ui: React.ReactElement, + streamingState: StreamingState, + verboseMode = true, // default true: preserves existing test expectations +) => { + const contextValue: StreamingState = streamingState; + return render( + + + + {ui} + + + , + ); +}; +``` + +- [ ] **Step 2: Add the 2 verbose mode test cases** + +Append this `describe` block **before the final `});`** of `describe('', ...)`: + +```typescript + describe('verbose mode', () => { + it('hides resultDisplay in compact mode (verboseMode=false)', () => { + const { lastFrame } = renderWithContext( + , + StreamingState.Idle, + false, // compact mode + ); + expect(lastFrame()).not.toContain('unique-tool-output-xyz'); + }); + + it('shows resultDisplay in verbose mode (verboseMode=true)', () => { + const { lastFrame } = renderWithContext( + , + StreamingState.Idle, + true, // verbose mode + ); + expect(lastFrame()).toContain('MockMarkdown:unique-tool-output-xyz'); + }); + }); +``` + +- [ ] **Step 3: Run to confirm compact mode test FAILS (result still visible)** + +```bash +cd packages/cli && npx vitest run src/ui/components/messages/ToolMessage.test.tsx 2>&1 | tail -30 +``` + +Expected: "hides resultDisplay in compact mode" test FAILS with "expected string not to contain 'unique-tool-output-xyz'" + +- [ ] **Step 4: Implement the compact mode filter in ToolMessage.tsx** + +In `packages/cli/src/ui/components/messages/ToolMessage.tsx`, at the top of the file add the import after the other context imports: + +```typescript +import { useVerboseMode } from '../../contexts/VerboseModeContext.js'; +``` + +Then, inside the `ToolMessage` component function, add the hook call and `effectiveDisplayRenderer` computation immediately after the existing `const displayRenderer = useResultDisplayRenderer(resultDisplay);` line: + +```typescript +const { verboseMode } = useVerboseMode(); +const effectiveDisplayRenderer = verboseMode + ? displayRenderer + : { type: 'none' as const }; +``` + +Then find the JSX at line 347 that reads `{displayRenderer.type !== 'none' && (` and replace `displayRenderer` with `effectiveDisplayRenderer`: + +```typescript +// BEFORE: + {displayRenderer.type !== 'none' && ( + +// AFTER: + {effectiveDisplayRenderer.type !== 'none' && ( +``` + +- [ ] **Step 5: Run the test to confirm all ToolMessage tests pass** + +```bash +cd packages/cli && npx vitest run src/ui/components/messages/ToolMessage.test.tsx 2>&1 | tail -20 +``` + +Expected: all tests pass including the 2 new verbose mode cases + +- [ ] **Step 6: Commit** + +```bash +git add packages/cli/src/ui/components/messages/ToolMessage.tsx packages/cli/src/ui/components/messages/ToolMessage.test.tsx +git commit -m "feat: hide tool result display in compact mode" +``` + +--- + +## Task 5: Update HistoryItemDisplay — Write Failing Test, Then Implement + +**Files:** +- Modify: `packages/cli/src/ui/components/HistoryItemDisplay.test.tsx` +- Modify: `packages/cli/src/ui/components/HistoryItemDisplay.tsx` + +- [ ] **Step 1: Add the import and 2 failing test cases to HistoryItemDisplay.test.tsx** + +At the top, add the import alongside the other imports (around line 11): + +```typescript +import { VerboseModeProvider } from '../../contexts/VerboseModeContext.js'; +``` + +Add this `describe` block **before the final `});`** of the outer `describe('', ...)`: + +```typescript + describe('verbose mode — thought rendering', () => { + const thoughtItem: HistoryItem = { + ...baseItem, + type: 'gemini_thought', + text: 'thinking-text-xyz', + }; + + it('hides gemini_thought in compact mode', () => { + const { lastFrame } = renderWithProviders( + + + , + { config: mockConfig }, + ); + expect(lastFrame()).not.toContain('thinking-text-xyz'); + }); + + it('shows gemini_thought in verbose mode', () => { + const { lastFrame } = renderWithProviders( + + + , + { config: mockConfig }, + ); + expect(lastFrame()).toContain('thinking-text-xyz'); + }); + }); +``` + +- [ ] **Step 2: Run to confirm compact mode test FAILS** + +```bash +cd packages/cli && npx vitest run src/ui/components/HistoryItemDisplay.test.tsx 2>&1 | tail -20 +``` + +Expected: "hides gemini_thought in compact mode" FAILS — thought is currently always rendered + +- [ ] **Step 3: Implement the compact mode filter in HistoryItemDisplay.tsx** + +Add the import at the top of the file alongside the other local imports: + +```typescript +import { useVerboseMode } from '../contexts/VerboseModeContext.js'; +``` + +Add the hook call inside the component function, immediately after the existing `const contentWidth = terminalWidth - 4;` line: + +```typescript +const { verboseMode } = useVerboseMode(); +``` + +Then modify the `gemini_thought` render block (around line 116). Replace: + +```typescript + {itemForDisplay.type === 'gemini_thought' && ( + + )} +``` + +With: + +```typescript + {verboseMode && itemForDisplay.type === 'gemini_thought' && ( + + )} +``` + +Then modify the `gemini_thought_content` render block (around line 126). Replace: + +```typescript + {itemForDisplay.type === 'gemini_thought_content' && ( + + )} +``` + +With: + +```typescript + {verboseMode && itemForDisplay.type === 'gemini_thought_content' && ( + + )} +``` + +- [ ] **Step 4: Run to confirm all HistoryItemDisplay tests pass** + +```bash +cd packages/cli && npx vitest run src/ui/components/HistoryItemDisplay.test.tsx 2>&1 | tail -20 +``` + +Expected: all tests pass including the 2 new verbose mode cases + +- [ ] **Step 5: Commit** + +```bash +git add packages/cli/src/ui/components/HistoryItemDisplay.tsx packages/cli/src/ui/components/HistoryItemDisplay.test.tsx +git commit -m "feat: hide thinking chain in compact mode" +``` + +--- + +## Task 6: Update AppContainer — State, Handler, Provider + +**Files:** +- Modify: `packages/cli/src/ui/AppContainer.tsx` + +- [ ] **Step 1: Add the VerboseModeProvider import** + +At the top of `packages/cli/src/ui/AppContainer.tsx`, add the import alongside the other context imports (search for `VimModeContext` or `UIStateContext` imports): + +```typescript +import { VerboseModeProvider } from './contexts/VerboseModeContext.js'; +``` + +- [ ] **Step 2: Add verboseMode state initialization** + +Find the existing `showToolDescriptions` state (around line 963): + +```typescript + const [showToolDescriptions, setShowToolDescriptions] = + useState(false); +``` + +Add the `verboseMode` state immediately after it: + +```typescript + const [verboseMode, setVerboseMode] = useState( + settings.merged.ui?.verboseMode ?? false, + ); +``` + +- [ ] **Step 3: Add the Ctrl+O keypress handler** + +Find the `if (keyMatchers[Command.TOGGLE_TOOL_DESCRIPTIONS](key)) {` block (around line 1327) and add the new handler as a new `if` block right after the closing `}` of that block (before the next `} else if`): + +```typescript + if (keyMatchers[Command.TOGGLE_VERBOSE_MODE](key)) { + const newValue = !verboseMode; + setVerboseMode(newValue); + settings.setValue(SettingScope.User, 'ui.verboseMode', newValue); + historyManager.addItem( + { + type: MessageType.INFO, + text: newValue + ? t('Verbose mode on — showing full tool output and thinking') + : t( + 'Compact mode on — showing tool names and final responses only', + ), + }, + Date.now(), + ); + } +``` + +- [ ] **Step 4: Add verboseMode to the useCallback dependency array** + +Find the dependency array of `handleGlobalKeypress` (the `useCallback` that contains the key handler). It starts around line 1352. Add `verboseMode` and `setVerboseMode` to the array, alongside `showToolDescriptions` and `setShowToolDescriptions`: + +```typescript +// Find this in the deps array and add verboseMode, setVerboseMode next to it: + showToolDescriptions, + setShowToolDescriptions, + verboseMode, // ADD THIS + setVerboseMode, // ADD THIS +``` + +- [ ] **Step 5: Wrap with VerboseModeProvider in the JSX return** + +Find the JSX return (around line 1800). Locate this block: + +```tsx + + + +``` + +Replace it with: + +```tsx + + + + + +``` + +- [ ] **Step 6: Run TypeScript check** + +```bash +cd packages/cli && npx tsc --noEmit 2>&1 | grep -i verbose +``` + +Expected: no output (no errors) + +- [ ] **Step 7: Run all CLI tests to catch regressions** + +```bash +cd packages/cli && npx vitest run 2>&1 | tail -20 +``` + +Expected: all tests pass + +- [ ] **Step 8: Commit** + +```bash +git add packages/cli/src/ui/AppContainer.tsx +git commit -m "feat: wire VerboseModeContext into AppContainer with Ctrl+O toggle and settings persistence" +``` + +--- + +## Task 7: Update Footer — Write Failing Test, Then Implement + +**Files:** +- Modify: `packages/cli/src/ui/components/Footer.test.tsx` +- Modify: `packages/cli/src/ui/components/Footer.tsx` + +- [ ] **Step 1: Add the import and 2 failing test cases to Footer.test.tsx** + +At the top, add the import alongside the other context imports: + +```typescript +import { VerboseModeProvider } from '../../contexts/VerboseModeContext.js'; +``` + +Add this `describe` block **before the final `});`** of `describe('