Skip to content

Commit ae9ba8b

Browse files
authored
Merge pull request #1513 from QwenLM/feat/cli-welcome-screen
feat: Redesign CLI welcome screen and settings dialog
2 parents ed12c50 + daea673 commit ae9ba8b

File tree

111 files changed

+3764
-2648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+3764
-2648
lines changed

docs/users/configuration/settings.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ Settings are organized into categories. All settings should be placed within the
7474
| `ui.customThemes` | object | Custom theme definitions. | `{}` |
7575
| `ui.hideWindowTitle` | boolean | Hide the window title bar. | `false` |
7676
| `ui.hideTips` | boolean | Hide helpful tips in the UI. | `false` |
77-
| `ui.hideBanner` | boolean | Hide the application banner. | `false` |
78-
| `ui.hideFooter` | boolean | Hide the footer from the UI. | `false` |
79-
| `ui.showMemoryUsage` | boolean | Display memory usage information in the UI. | `false` |
8077
| `ui.showLineNumbers` | boolean | Show line numbers in code blocks in the CLI output. | `true` |
8178
| `ui.showCitations` | boolean | Show citations for generated text in the chat. | `true` |
8279
| `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. This feature integrates with the `/summary` command and quit confirmation dialog. | `true` |
@@ -273,7 +270,6 @@ If you are experiencing performance issues with file searching (e.g., with `@` c
273270
| `tools.enableToolOutputTruncation` | boolean | Enable truncation of large tool outputs. | `true` | Requires restart: Yes |
274271
| `tools.truncateToolOutputThreshold` | number | Truncate tool output if it is larger than this many characters. Applies to Shell, Grep, Glob, ReadFile and ReadManyFiles tools. | `25000` | Requires restart: Yes |
275272
| `tools.truncateToolOutputLines` | number | Maximum lines or entries kept when truncating tool output. Applies to Shell, Grep, Glob, ReadFile and ReadManyFiles tools. | `1000` | Requires restart: Yes |
276-
| `tools.autoAccept` | boolean | Controls whether the CLI automatically accepts and executes tool calls that are considered safe (e.g., read-only operations) without explicit user confirmation. If set to `true`, the CLI will bypass the confirmation prompt for tools deemed safe. | `false` | |
277273

278274
#### mcp
279275

@@ -361,7 +357,6 @@ Here is an example of a `settings.json` file with the nested structure, new as o
361357
},
362358
"ui": {
363359
"theme": "GitHub",
364-
"hideBanner": true,
365360
"hideTips": false,
366361
"customWittyPhrases": [
367362
"You forget a thousand things every day. Make sure this is one of 'em",

docs/users/reference/keyboard-shortcuts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This document lists the available keyboard shortcuts in Qwen Code.
2020
| Shortcut | Description |
2121
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
2222
| `!` | Toggle shell mode when the input is empty. |
23+
| `?` | Toggle keyboard shortcuts display when the input is empty. |
2324
| `\` (at end of line) + `Enter` | Insert a newline. |
2425
| `Down Arrow` | Navigate down through the input history. |
2526
| `Enter` | Submit the current prompt. |
@@ -38,6 +39,7 @@ This document lists the available keyboard shortcuts in Qwen Code.
3839
| `Ctrl+Left Arrow` / `Meta+Left Arrow` / `Meta+B` | Move the cursor one word to the left. |
3940
| `Ctrl+N` | Navigate down through the input history. |
4041
| `Ctrl+P` | Navigate up through the input history. |
42+
| `Ctrl+R` | Reverse search through input/shell history. |
4143
| `Ctrl+Right Arrow` / `Meta+Right Arrow` / `Meta+F` | Move the cursor one word to the right. |
4244
| `Ctrl+U` | Delete from the cursor to the beginning of the line. |
4345
| `Ctrl+V` | Paste clipboard content. If the clipboard contains an image, it will be saved and a reference to it will be inserted in the prompt. |

packages/cli/src/config/config.test.ts

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -553,70 +553,6 @@ describe('loadCliConfig', () => {
553553
expect(config.getIncludePartialMessages()).toBe(true);
554554
});
555555

556-
it('should set showMemoryUsage to true when --show-memory-usage flag is present', async () => {
557-
process.argv = ['node', 'script.js', '--show-memory-usage'];
558-
const argv = await parseArguments({} as Settings);
559-
const settings: Settings = {};
560-
const config = await loadCliConfig(
561-
settings,
562-
[],
563-
new ExtensionEnablementManager(
564-
ExtensionStorage.getUserExtensionsDir(),
565-
argv.extensions,
566-
),
567-
argv,
568-
);
569-
expect(config.getShowMemoryUsage()).toBe(true);
570-
});
571-
572-
it('should set showMemoryUsage to false when --memory flag is not present', async () => {
573-
process.argv = ['node', 'script.js'];
574-
const argv = await parseArguments({} as Settings);
575-
const settings: Settings = {};
576-
const config = await loadCliConfig(
577-
settings,
578-
[],
579-
new ExtensionEnablementManager(
580-
ExtensionStorage.getUserExtensionsDir(),
581-
argv.extensions,
582-
),
583-
argv,
584-
);
585-
expect(config.getShowMemoryUsage()).toBe(false);
586-
});
587-
588-
it('should set showMemoryUsage to false by default from settings if CLI flag is not present', async () => {
589-
process.argv = ['node', 'script.js'];
590-
const argv = await parseArguments({} as Settings);
591-
const settings: Settings = { ui: { showMemoryUsage: false } };
592-
const config = await loadCliConfig(
593-
settings,
594-
[],
595-
new ExtensionEnablementManager(
596-
ExtensionStorage.getUserExtensionsDir(),
597-
argv.extensions,
598-
),
599-
argv,
600-
);
601-
expect(config.getShowMemoryUsage()).toBe(false);
602-
});
603-
604-
it('should prioritize CLI flag over settings for showMemoryUsage (CLI true, settings false)', async () => {
605-
process.argv = ['node', 'script.js', '--show-memory-usage'];
606-
const argv = await parseArguments({} as Settings);
607-
const settings: Settings = { ui: { showMemoryUsage: false } };
608-
const config = await loadCliConfig(
609-
settings,
610-
[],
611-
new ExtensionEnablementManager(
612-
ExtensionStorage.getUserExtensionsDir(),
613-
argv.extensions,
614-
),
615-
argv,
616-
);
617-
expect(config.getShowMemoryUsage()).toBe(true);
618-
});
619-
620556
describe('Proxy configuration', () => {
621557
const originalProxyEnv: { [key: string]: string | undefined } = {};
622558
const proxyEnvVars = [

packages/cli/src/config/config.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ export interface CliArgs {
103103
prompt: string | undefined;
104104
promptInteractive: string | undefined;
105105
allFiles: boolean | undefined;
106-
showMemoryUsage: boolean | undefined;
107106
yolo: boolean | undefined;
108107
approvalMode: string | undefined;
109108
telemetry: boolean | undefined;
@@ -296,11 +295,6 @@ export async function parseArguments(settings: Settings): Promise<CliArgs> {
296295
description: 'Include ALL files in context?',
297296
default: false,
298297
})
299-
.option('show-memory-usage', {
300-
type: 'boolean',
301-
description: 'Show memory usage in status bar',
302-
default: false,
303-
})
304298
.option('yolo', {
305299
alias: 'y',
306300
type: 'boolean',
@@ -503,10 +497,6 @@ export async function parseArguments(settings: Settings): Promise<CliArgs> {
503497
],
504498
description: 'Authentication type',
505499
})
506-
.deprecateOption(
507-
'show-memory-usage',
508-
'Use the "ui.showMemoryUsage" setting in settings.json instead. This flag will be removed in a future version.',
509-
)
510500
.deprecateOption(
511501
'sandbox-image',
512502
'Use the "tools.sandbox" setting in settings.json instead. This flag will be removed in a future version.',
@@ -1009,8 +999,6 @@ export async function loadCliConfig(
1009999
userMemory: memoryContent,
10101000
geminiMdFileCount: fileCount,
10111001
approvalMode,
1012-
showMemoryUsage:
1013-
argv.showMemoryUsage || settings.ui?.showMemoryUsage || false,
10141002
accessibility: {
10151003
...settings.ui?.accessibility,
10161004
screenReader,

packages/cli/src/config/settings.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,7 +2260,7 @@ describe('Settings Loading and Merging', () => {
22602260
disableAutoUpdate: true,
22612261
},
22622262
ui: {
2263-
hideBanner: true,
2263+
hideTips: true,
22642264
customThemes: {
22652265
myTheme: {},
22662266
},
@@ -2283,7 +2283,7 @@ describe('Settings Loading and Merging', () => {
22832283
const v1Settings = migrateSettingsToV1(v2Settings);
22842284
expect(v1Settings).toEqual({
22852285
disableAutoUpdate: true,
2286-
hideBanner: true,
2286+
hideTips: true,
22872287
customThemes: {
22882288
myTheme: {},
22892289
},

packages/cli/src/config/settings.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,6 @@ const MIGRATION_MAP: Record<string, string> = {
9090
hideWindowTitle: 'ui.hideWindowTitle',
9191
showStatusInTitle: 'ui.showStatusInTitle',
9292
hideTips: 'ui.hideTips',
93-
hideBanner: 'ui.hideBanner',
94-
hideFooter: 'ui.hideFooter',
95-
hideCWD: 'ui.footer.hideCWD',
96-
hideSandboxStatus: 'ui.footer.hideSandboxStatus',
97-
hideModelInfo: 'ui.footer.hideModelInfo',
98-
hideContextSummary: 'ui.hideContextSummary',
99-
showMemoryUsage: 'ui.showMemoryUsage',
10093
showLineNumbers: 'ui.showLineNumbers',
10194
showCitations: 'ui.showCitations',
10295
ideMode: 'ide.enabled',

packages/cli/src/config/settingsSchema.test.ts

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ describe('SettingsSchema', () => {
157157

158158
it('should have showInDialog property configured', () => {
159159
// Check that user-facing settings are marked for dialog display
160-
expect(
161-
getSettingsSchema().ui.properties.showMemoryUsage.showInDialog,
162-
).toBe(true);
163160
expect(getSettingsSchema().general.properties.vimMode.showInDialog).toBe(
164161
true,
165162
);
@@ -171,17 +168,14 @@ describe('SettingsSchema', () => {
171168
).toBe(true);
172169
expect(
173170
getSettingsSchema().ui.properties.hideWindowTitle.showInDialog,
174-
).toBe(true);
171+
).toBe(false);
175172
expect(getSettingsSchema().ui.properties.hideTips.showInDialog).toBe(
176173
true,
177174
);
178-
expect(getSettingsSchema().ui.properties.hideBanner.showInDialog).toBe(
179-
true,
180-
);
181175
expect(
182176
getSettingsSchema().privacy.properties.usageStatisticsEnabled
183177
.showInDialog,
184-
).toBe(false);
178+
).toBe(true);
185179

186180
// Check that advanced settings are hidden from dialog
187181
expect(getSettingsSchema().security.properties.auth.showInDialog).toBe(
@@ -194,7 +188,7 @@ describe('SettingsSchema', () => {
194188
expect(getSettingsSchema().telemetry.showInDialog).toBe(false);
195189

196190
// Check that some settings are appropriately hidden
197-
expect(getSettingsSchema().ui.properties.theme.showInDialog).toBe(false); // Changed to false
191+
expect(getSettingsSchema().ui.properties.theme.showInDialog).toBe(true);
198192
expect(getSettingsSchema().ui.properties.customThemes.showInDialog).toBe(
199193
false,
200194
); // Managed via theme editor
@@ -203,13 +197,13 @@ describe('SettingsSchema', () => {
203197
).toBe(false); // Experimental feature
204198
expect(getSettingsSchema().ui.properties.accessibility.showInDialog).toBe(
205199
false,
206-
); // Changed to false
200+
);
207201
expect(
208202
getSettingsSchema().context.properties.fileFiltering.showInDialog,
209-
).toBe(false); // Changed to false
203+
).toBe(false);
210204
expect(
211205
getSettingsSchema().general.properties.preferredEditor.showInDialog,
212-
).toBe(false); // Changed to false
206+
).toBe(true);
213207
expect(
214208
getSettingsSchema().advanced.properties.autoConfigureMemory
215209
.showInDialog,
@@ -287,7 +281,7 @@ describe('SettingsSchema', () => {
287281
expect(
288282
getSettingsSchema().security.properties.folderTrust.properties.enabled
289283
.showInDialog,
290-
).toBe(true);
284+
).toBe(false);
291285
});
292286

293287
it('should have debugKeystrokeLogging setting in schema', () => {
@@ -310,7 +304,7 @@ describe('SettingsSchema', () => {
310304
expect(
311305
getSettingsSchema().general.properties.debugKeystrokeLogging
312306
.showInDialog,
313-
).toBe(true);
307+
).toBe(false);
314308
expect(
315309
getSettingsSchema().general.properties.debugKeystrokeLogging
316310
.description,

0 commit comments

Comments
 (0)