Merge pull request #1205 from afarber/rename-leftover-gemini-references

fix(ide): rename Gemini references to Qwen and fix IDE connection path
This commit is contained in:
tanzhenxin
2025-12-16 14:46:14 +08:00
committed by GitHub
13 changed files with 25 additions and 25 deletions

View File

@@ -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) {

View File

@@ -284,7 +284,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: {
@@ -312,7 +312,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: {
@@ -518,7 +518,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: {

View File

@@ -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'];
}
});

View File

@@ -92,7 +92,7 @@ function getNodeMemoryArgs(isDebugMode: boolean): string[] {
);
}
if (process.env['GEMINI_CLI_NO_RELAUNCH']) {
if (process.env['QWEN_CODE_NO_RELAUNCH']) {
return [];
}

View File

@@ -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}}',

View File

@@ -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}}',

View File

@@ -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- '),
},

View File

@@ -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.',
});
});

View File

@@ -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.',
};
}

View File

@@ -115,7 +115,7 @@ export function PermissionsModifyTrustDialog({
{needsRestart && (
<Box marginLeft={1} marginTop={1}>
<Text color={theme.status.warning}>
To apply the trust changes, Gemini CLI must be restarted. Press
To apply the trust changes, Qwen Code must be restarted. Press
&apos;r&apos; to restart CLI now.
</Text>
</Box>

View File

@@ -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', () => {

View File

@@ -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();

View File

@@ -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)