diff --git a/packages/cli/src/ui/commands/bugCommand.test.ts b/packages/cli/src/ui/commands/bugCommand.test.ts index 1cc5da456..9d6680552 100644 --- a/packages/cli/src/ui/commands/bugCommand.test.ts +++ b/packages/cli/src/ui/commands/bugCommand.test.ts @@ -27,7 +27,6 @@ vi.mock('@qwen-code/qwen-code-core', async (importOriginal) => { getDetectedIdeDisplayName: vi.fn().mockReturnValue('VSCode'), }), }, - sessionId: 'test-session-id', }; }); vi.mock('node:process', () => ({ @@ -59,6 +58,7 @@ describe('bugCommand', () => { getModel: () => 'qwen3-coder-plus', getBugCommand: () => undefined, getIdeMode: () => true, + getSessionId: () => 'test-session-id', }, settings: { merged: { @@ -102,6 +102,7 @@ describe('bugCommand', () => { getModel: () => 'qwen3-coder-plus', getBugCommand: () => ({ urlTemplate: customTemplate }), getIdeMode: () => true, + getSessionId: () => 'test-session-id', }, settings: { merged: { @@ -143,6 +144,7 @@ describe('bugCommand', () => { getModel: () => 'qwen3-coder-plus', getBugCommand: () => undefined, getIdeMode: () => true, + getSessionId: () => 'test-session-id', getContentGeneratorConfig: () => ({ baseUrl: 'https://api.openai.com/v1', }), diff --git a/packages/cli/src/ui/commands/bugCommand.ts b/packages/cli/src/ui/commands/bugCommand.ts index 4c16f4fb4..2eb9b823a 100644 --- a/packages/cli/src/ui/commands/bugCommand.ts +++ b/packages/cli/src/ui/commands/bugCommand.ts @@ -15,7 +15,7 @@ import { MessageType } from '../types.js'; import { GIT_COMMIT_INFO } from '../../generated/git-commit.js'; import { formatMemoryUsage } from '../utils/formatters.js'; import { getCliVersion } from '../../utils/version.js'; -import { IdeClient, sessionId, AuthType } from '@qwen-code/qwen-code-core'; +import { IdeClient, AuthType } from '@qwen-code/qwen-code-core'; export const bugCommand: SlashCommand = { name: 'bug', @@ -48,7 +48,7 @@ export const bugCommand: SlashCommand = { let info = ` * **CLI Version:** ${cliVersion} * **Git Commit:** ${GIT_COMMIT_INFO} -* **Session ID:** ${sessionId} +* **Session ID:** ${config?.getSessionId() || 'unknown'} * **Operating System:** ${osVersion} * **Sandbox Environment:** ${sandboxEnv} * **Auth Type:** ${selectedAuthType}`;