From 68295d0bbf87484f06db5571258b8094d8f3376a Mon Sep 17 00:00:00 2001 From: Alexander Farber Date: Wed, 10 Dec 2025 13:00:07 +0100 Subject: [PATCH 1/5] Rename leftover Gemini references to Qwen in UI strings --- packages/cli/src/config/settingsSchema.ts | 6 +++--- packages/cli/src/i18n/locales/en.js | 4 ++-- packages/cli/src/i18n/locales/zh.js | 4 ++-- packages/cli/src/ui/commands/directoryCommand.tsx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index d95f4dbb..957ef7e4 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -263,7 +263,7 @@ const SETTINGS_SCHEMA = { requiresRestart: false, default: false, description: - 'Show Gemini CLI status and thoughts in the terminal window title', + 'Show Qwen Code status and thoughts in the terminal window title', showInDialog: true, }, hideTips: { @@ -291,7 +291,7 @@ const SETTINGS_SCHEMA = { requiresRestart: false, default: false, description: - 'Hide the context summary (GEMINI.md, MCP servers) above the input.', + 'Hide the context summary (QWEN.md, MCP servers) above the input.', showInDialog: true, }, footer: { @@ -497,7 +497,7 @@ const SETTINGS_SCHEMA = { category: 'Model', requiresRestart: false, default: undefined as string | undefined, - description: 'The Gemini model to use for conversations.', + description: 'The model to use for conversations.', showInDialog: false, }, maxSessionTurns: { diff --git a/packages/cli/src/i18n/locales/en.js b/packages/cli/src/i18n/locales/en.js index c2217757..a58ea0db 100644 --- a/packages/cli/src/i18n/locales/en.js +++ b/packages/cli/src/i18n/locales/en.js @@ -635,8 +635,8 @@ export default { 'The /directory add command is not supported in restrictive sandbox profiles. Please use --include-directories when starting the session instead.': 'The /directory add command is not supported in restrictive sandbox profiles. Please use --include-directories when starting the session instead.', "Error adding '{{path}}': {{error}}": "Error adding '{{path}}': {{error}}", - 'Successfully added GEMINI.md files from the following directories if there are:\n- {{directories}}': - 'Successfully added GEMINI.md files from the following directories if there are:\n- {{directories}}', + 'Successfully added QWEN.md files from the following directories if there are:\n- {{directories}}': + 'Successfully added QWEN.md files from the following directories if there are:\n- {{directories}}', 'Error refreshing memory: {{error}}': 'Error refreshing memory: {{error}}', 'Successfully added directories:\n- {{directories}}': 'Successfully added directories:\n- {{directories}}', diff --git a/packages/cli/src/i18n/locales/zh.js b/packages/cli/src/i18n/locales/zh.js index adeb85f1..bf8efa2c 100644 --- a/packages/cli/src/i18n/locales/zh.js +++ b/packages/cli/src/i18n/locales/zh.js @@ -601,8 +601,8 @@ export default { 'The /directory add command is not supported in restrictive sandbox profiles. Please use --include-directories when starting the session instead.': '/directory add 命令在限制性沙箱配置文件中不受支持。请改为在启动会话时使用 --include-directories。', "Error adding '{{path}}': {{error}}": "添加 '{{path}}' 时出错:{{error}}", - 'Successfully added GEMINI.md files from the following directories if there are:\n- {{directories}}': - '如果存在,已成功从以下目录添加 GEMINI.md 文件:\n- {{directories}}', + 'Successfully added QWEN.md files from the following directories if there are:\n- {{directories}}': + '如果存在,已成功从以下目录添加 QWEN.md 文件:\n- {{directories}}', 'Error refreshing memory: {{error}}': '刷新内存时出错:{{error}}', 'Successfully added directories:\n- {{directories}}': '成功添加目录:\n- {{directories}}', diff --git a/packages/cli/src/ui/commands/directoryCommand.tsx b/packages/cli/src/ui/commands/directoryCommand.tsx index e44530b7..536cc9bb 100644 --- a/packages/cli/src/ui/commands/directoryCommand.tsx +++ b/packages/cli/src/ui/commands/directoryCommand.tsx @@ -130,7 +130,7 @@ export const directoryCommand: SlashCommand = { { type: MessageType.INFO, text: t( - 'Successfully added GEMINI.md files from the following directories if there are:\n- {{directories}}', + 'Successfully added QWEN.md files from the following directories if there are:\n- {{directories}}', { directories: added.join('\n- '), }, From 6d3cf4cd98b2d373ff645934126f0a155d3706cb Mon Sep 17 00:00:00 2001 From: Alexander Farber Date: Wed, 10 Dec 2025 13:13:56 +0100 Subject: [PATCH 2/5] Rrename Gemini references to Qwen and fix IDE connection path --- packages/cli/src/ui/commands/restoreCommand.ts | 2 +- .../cli/src/ui/components/PermissionsModifyTrustDialog.tsx | 2 +- packages/core/src/ide/ide-client.test.ts | 6 +++--- packages/core/src/ide/ide-client.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/ui/commands/restoreCommand.ts b/packages/cli/src/ui/commands/restoreCommand.ts index 5076e536..fce63327 100644 --- a/packages/cli/src/ui/commands/restoreCommand.ts +++ b/packages/cli/src/ui/commands/restoreCommand.ts @@ -28,7 +28,7 @@ async function restoreAction( return { type: 'message', messageType: 'error', - content: 'Could not determine the .gemini directory path.', + content: 'Could not determine the .qwen directory path.', }; } diff --git a/packages/cli/src/ui/components/PermissionsModifyTrustDialog.tsx b/packages/cli/src/ui/components/PermissionsModifyTrustDialog.tsx index 94da2078..dfed5ba4 100644 --- a/packages/cli/src/ui/components/PermissionsModifyTrustDialog.tsx +++ b/packages/cli/src/ui/components/PermissionsModifyTrustDialog.tsx @@ -115,7 +115,7 @@ export function PermissionsModifyTrustDialog({ {needsRestart && ( - To apply the trust changes, Gemini CLI must be restarted. Press + To apply the trust changes, Qwen Code must be restarted. Press 'r' to restart CLI now. diff --git a/packages/core/src/ide/ide-client.test.ts b/packages/core/src/ide/ide-client.test.ts index ca26f78f..e80565a2 100644 --- a/packages/core/src/ide/ide-client.test.ts +++ b/packages/core/src/ide/ide-client.test.ts @@ -324,7 +324,7 @@ describe('IdeClient', () => { expect(result).toEqual(config); expect(fs.promises.readFile).toHaveBeenCalledWith( - path.join('/tmp/gemini/ide', 'qwen-code-ide-server-12345-123.json'), + path.join('/tmp', 'qwen-code-ide-server-12345-123.json'), 'utf8', ); }); @@ -518,11 +518,11 @@ describe('IdeClient', () => { expect(result).toEqual(validConfig); expect(fs.promises.readFile).toHaveBeenCalledWith( - path.join('/tmp/gemini/ide', 'qwen-code-ide-server-12345-111.json'), + path.join('/tmp', 'qwen-code-ide-server-12345-111.json'), 'utf8', ); expect(fs.promises.readFile).not.toHaveBeenCalledWith( - path.join('/tmp/gemini/ide', 'not-a-config-file.txt'), + path.join('/tmp', 'not-a-config-file.txt'), 'utf8', ); }); diff --git a/packages/core/src/ide/ide-client.ts b/packages/core/src/ide/ide-client.ts index b447f46c..e49b81c7 100644 --- a/packages/core/src/ide/ide-client.ts +++ b/packages/core/src/ide/ide-client.ts @@ -591,7 +591,7 @@ export class IdeClient { // exist. } - const portFileDir = path.join(os.tmpdir(), 'gemini', 'ide'); + const portFileDir = os.tmpdir(); let portFiles; try { portFiles = await fs.promises.readdir(portFileDir); From 95d3e5b744fa9fdf9d8a3b01c91f600192f8c249 Mon Sep 17 00:00:00 2001 From: Alexander Farber Date: Wed, 10 Dec 2025 13:27:34 +0100 Subject: [PATCH 3/5] Rename more references --- packages/cli/src/config/extension.ts | 2 +- packages/cli/src/ui/commands/restoreCommand.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/config/extension.ts b/packages/cli/src/config/extension.ts index c9fde128..2d30cc41 100644 --- a/packages/cli/src/config/extension.ts +++ b/packages/cli/src/config/extension.ts @@ -581,7 +581,7 @@ function extensionConsentString(extensionConfig: ExtensionConfig): string { } if (extensionConfig.contextFileName) { output.push( - `This extension will append info to your gemini.md context using ${extensionConfig.contextFileName}`, + `This extension will append info to your QWEN.md context using ${extensionConfig.contextFileName}`, ); } if (extensionConfig.excludeTools) { diff --git a/packages/cli/src/ui/commands/restoreCommand.test.ts b/packages/cli/src/ui/commands/restoreCommand.test.ts index a60ee502..a786c3a7 100644 --- a/packages/cli/src/ui/commands/restoreCommand.test.ts +++ b/packages/cli/src/ui/commands/restoreCommand.test.ts @@ -89,7 +89,7 @@ describe('restoreCommand', () => { ).toEqual({ type: 'message', messageType: 'error', - content: 'Could not determine the .gemini directory path.', + content: 'Could not determine the .qwen directory path.', }); }); From bf905dcc173ca8477d981599879d90a393f79d34 Mon Sep 17 00:00:00 2001 From: Alexander Farber Date: Wed, 10 Dec 2025 13:48:01 +0100 Subject: [PATCH 4/5] Rename GEMINI_CLI_NO_RELAUNCH to QWEN_CODE_NO_RELAUNCH --- packages/cli/src/gemini.test.tsx | 8 ++++---- packages/cli/src/gemini.tsx | 2 +- packages/cli/src/utils/relaunch.test.ts | 10 +++++----- packages/cli/src/utils/relaunch.ts | 4 ++-- scripts/start.js | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/cli/src/gemini.test.tsx b/packages/cli/src/gemini.test.tsx index f602d17d..e34396ed 100644 --- a/packages/cli/src/gemini.test.tsx +++ b/packages/cli/src/gemini.test.tsx @@ -379,8 +379,8 @@ describe('gemini.tsx main function kitty protocol', () => { beforeEach(() => { // Set no relaunch in tests since process spawning causing issues in tests - originalEnvNoRelaunch = process.env['GEMINI_CLI_NO_RELAUNCH']; - process.env['GEMINI_CLI_NO_RELAUNCH'] = 'true'; + originalEnvNoRelaunch = process.env['QWEN_CODE_NO_RELAUNCH']; + process.env['QWEN_CODE_NO_RELAUNCH'] = 'true'; // eslint-disable-next-line @typescript-eslint/no-explicit-any if (!(process.stdin as any).setRawMode) { @@ -402,9 +402,9 @@ describe('gemini.tsx main function kitty protocol', () => { afterEach(() => { // Restore original env variables if (originalEnvNoRelaunch !== undefined) { - process.env['GEMINI_CLI_NO_RELAUNCH'] = originalEnvNoRelaunch; + process.env['QWEN_CODE_NO_RELAUNCH'] = originalEnvNoRelaunch; } else { - delete process.env['GEMINI_CLI_NO_RELAUNCH']; + delete process.env['QWEN_CODE_NO_RELAUNCH']; } }); diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx index 18f191bc..88eb1c52 100644 --- a/packages/cli/src/gemini.tsx +++ b/packages/cli/src/gemini.tsx @@ -92,7 +92,7 @@ function getNodeMemoryArgs(isDebugMode: boolean): string[] { ); } - if (process.env['GEMINI_CLI_NO_RELAUNCH']) { + if (process.env['QWEN_CODE_NO_RELAUNCH']) { return []; } diff --git a/packages/cli/src/utils/relaunch.test.ts b/packages/cli/src/utils/relaunch.test.ts index e627a07a..0ed8c485 100644 --- a/packages/cli/src/utils/relaunch.test.ts +++ b/packages/cli/src/utils/relaunch.test.ts @@ -115,7 +115,7 @@ describe('relaunchAppInChildProcess', () => { vi.clearAllMocks(); process.env = { ...originalEnv }; - delete process.env['GEMINI_CLI_NO_RELAUNCH']; + delete process.env['QWEN_CODE_NO_RELAUNCH']; process.execArgv = [...originalExecArgv]; process.argv = [...originalArgv]; @@ -145,9 +145,9 @@ describe('relaunchAppInChildProcess', () => { stdinResumeSpy.mockRestore(); }); - describe('when GEMINI_CLI_NO_RELAUNCH is set', () => { + describe('when QWEN_CODE_NO_RELAUNCH is set', () => { it('should return early without spawning a child process', async () => { - process.env['GEMINI_CLI_NO_RELAUNCH'] = 'true'; + process.env['QWEN_CODE_NO_RELAUNCH'] = 'true'; await relaunchAppInChildProcess(['--test'], ['--verbose']); @@ -156,9 +156,9 @@ describe('relaunchAppInChildProcess', () => { }); }); - describe('when GEMINI_CLI_NO_RELAUNCH is not set', () => { + describe('when QWEN_CODE_NO_RELAUNCH is not set', () => { beforeEach(() => { - delete process.env['GEMINI_CLI_NO_RELAUNCH']; + delete process.env['QWEN_CODE_NO_RELAUNCH']; }); it('should construct correct node arguments from execArgv, additionalNodeArgs, script, additionalScriptArgs, and argv', () => { diff --git a/packages/cli/src/utils/relaunch.ts b/packages/cli/src/utils/relaunch.ts index 1142efc7..80d243c7 100644 --- a/packages/cli/src/utils/relaunch.ts +++ b/packages/cli/src/utils/relaunch.ts @@ -27,7 +27,7 @@ export async function relaunchAppInChildProcess( additionalNodeArgs: string[], additionalScriptArgs: string[], ) { - if (process.env['GEMINI_CLI_NO_RELAUNCH']) { + if (process.env['QWEN_CODE_NO_RELAUNCH']) { return; } @@ -44,7 +44,7 @@ export async function relaunchAppInChildProcess( ...additionalScriptArgs, ...scriptArgs, ]; - const newEnv = { ...process.env, GEMINI_CLI_NO_RELAUNCH: 'true' }; + const newEnv = { ...process.env, QWEN_CODE_NO_RELAUNCH: 'true' }; // The parent process should not be reading from stdin while the child is running. process.stdin.pause(); diff --git a/scripts/start.js b/scripts/start.js index baa9fd98..49037b79 100644 --- a/scripts/start.js +++ b/scripts/start.js @@ -67,7 +67,7 @@ const env = { if (process.env.DEBUG) { // If this is not set, the debugger will pause on the outer process rather // than the relaunched process making it harder to debug. - env.GEMINI_CLI_NO_RELAUNCH = 'true'; + env.QWEN_CODE_NO_RELAUNCH = 'true'; } // Use process.cwd() to inherit the working directory from launch.json cwd setting // This allows debugging from a specific directory (e.g., .todo) From 633148b2577c542451a73aaf5d6f58aa3e3aec80 Mon Sep 17 00:00:00 2001 From: tanzhenxin Date: Tue, 16 Dec 2025 14:30:25 +0800 Subject: [PATCH 5/5] Revert IDE client discovery path changes --- packages/core/src/ide/ide-client.test.ts | 6 +++--- packages/core/src/ide/ide-client.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/ide/ide-client.test.ts b/packages/core/src/ide/ide-client.test.ts index e80565a2..ca26f78f 100644 --- a/packages/core/src/ide/ide-client.test.ts +++ b/packages/core/src/ide/ide-client.test.ts @@ -324,7 +324,7 @@ describe('IdeClient', () => { expect(result).toEqual(config); expect(fs.promises.readFile).toHaveBeenCalledWith( - path.join('/tmp', 'qwen-code-ide-server-12345-123.json'), + path.join('/tmp/gemini/ide', 'qwen-code-ide-server-12345-123.json'), 'utf8', ); }); @@ -518,11 +518,11 @@ describe('IdeClient', () => { expect(result).toEqual(validConfig); expect(fs.promises.readFile).toHaveBeenCalledWith( - path.join('/tmp', 'qwen-code-ide-server-12345-111.json'), + path.join('/tmp/gemini/ide', 'qwen-code-ide-server-12345-111.json'), 'utf8', ); expect(fs.promises.readFile).not.toHaveBeenCalledWith( - path.join('/tmp', 'not-a-config-file.txt'), + path.join('/tmp/gemini/ide', 'not-a-config-file.txt'), 'utf8', ); }); diff --git a/packages/core/src/ide/ide-client.ts b/packages/core/src/ide/ide-client.ts index e49b81c7..b447f46c 100644 --- a/packages/core/src/ide/ide-client.ts +++ b/packages/core/src/ide/ide-client.ts @@ -591,7 +591,7 @@ export class IdeClient { // exist. } - const portFileDir = os.tmpdir(); + const portFileDir = path.join(os.tmpdir(), 'gemini', 'ide'); let portFiles; try { portFiles = await fs.promises.readdir(portFileDir);