Add support for VSCode-like editors (#5699)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
christine betts
2025-08-11 21:01:37 +00:00
committed by GitHub
parent 4656f17524
commit 0e98641b51
5 changed files with 118 additions and 14 deletions

View File

@@ -939,8 +939,7 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
{shouldShowIdePrompt ? (
<IdeIntegrationNudge
question="Do you want to connect your VS Code editor to Gemini CLI?"
description="If you select Yes, we'll install an extension that allows the CLI to access your open files and display diffs directly in VS Code."
ideName={config.getIdeClient().getDetectedIdeDisplayName()}
onComplete={handleIdePromptComplete}
/>
) : isFolderTrustDialogOpen ? (

View File

@@ -13,14 +13,12 @@ import {
export type IdeIntegrationNudgeResult = 'yes' | 'no' | 'dismiss';
interface IdeIntegrationNudgeProps {
question: string;
description?: string;
ideName?: string;
onComplete: (result: IdeIntegrationNudgeResult) => void;
}
export function IdeIntegrationNudge({
question,
description,
ideName,
onComplete,
}: IdeIntegrationNudgeProps) {
useInput((_input, key) => {
@@ -56,9 +54,11 @@ export function IdeIntegrationNudge({
<Box marginBottom={1} flexDirection="column">
<Text>
<Text color="yellow">{'> '}</Text>
{question}
{`Do you want to connect your ${ideName ?? 'your'} editor to Gemini CLI?`}
</Text>
{description && <Text dimColor>{description}</Text>}
<Text
dimColor
>{`If you select Yes, we'll install an extension that allows the CLI to access your open files and display diffs directly in ${ideName ?? 'your editor'}.`}</Text>
</Box>
<RadioButtonSelect
items={OPTIONS}