mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
refactor(ide): Improve IDE detection discovery (#6765)
This commit is contained in:
@@ -88,7 +88,7 @@ export function IdeIntegrationNudge({
|
||||
<Box marginBottom={1} flexDirection="column">
|
||||
<Text>
|
||||
<Text color="yellow">{'> '}</Text>
|
||||
{`Do you want to connect ${ideName ?? 'your'} editor to Gemini CLI?`}
|
||||
{`Do you want to connect ${ideName ?? 'your editor'} to Gemini CLI?`}
|
||||
</Text>
|
||||
<Text dimColor>{installText}</Text>
|
||||
</Box>
|
||||
|
||||
@@ -6,10 +6,8 @@
|
||||
|
||||
import {
|
||||
Config,
|
||||
DetectedIde,
|
||||
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
||||
IDEConnectionStatus,
|
||||
getIdeInfo,
|
||||
getIdeInstaller,
|
||||
IdeClient,
|
||||
type File,
|
||||
@@ -130,11 +128,7 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
|
||||
({
|
||||
type: 'message',
|
||||
messageType: 'error',
|
||||
content: `IDE integration is not supported in your current environment. To use this feature, run Gemini CLI in one of these supported IDEs: ${Object.values(
|
||||
DetectedIde,
|
||||
)
|
||||
.map((ide) => getIdeInfo(ide).displayName)
|
||||
.join(', ')}`,
|
||||
content: `IDE integration is not supported in your current environment. To use this feature, run Gemini CLI in one of these supported IDEs: VS Code or VS Code forks.`,
|
||||
}) as const,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ import { McpPromptLoader } from '../../services/McpPromptLoader.js';
|
||||
import {
|
||||
SlashCommandStatus,
|
||||
makeFakeConfig,
|
||||
type IdeClient,
|
||||
} from '@google/gemini-cli-core/index.js';
|
||||
|
||||
function createTestCommand(
|
||||
@@ -109,6 +110,10 @@ describe('useSlashCommandProcessor', () => {
|
||||
const mockSetQuittingMessages = vi.fn();
|
||||
|
||||
const mockConfig = makeFakeConfig({});
|
||||
vi.spyOn(mockConfig, 'getIdeClient').mockReturnValue({
|
||||
addStatusChangeListener: vi.fn(),
|
||||
removeStatusChangeListener: vi.fn(),
|
||||
} as unknown as IdeClient);
|
||||
|
||||
const mockSettings = {} as LoadedSettings;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user