Skip to content

Commit 7d8a8ee

Browse files
committed
optimized: config&model&prompt&
1 parent 4a16bbc commit 7d8a8ee

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

packages/cli/src/config/settingsSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ export const SETTINGS_SCHEMA = {
528528
type: 'boolean',
529529
label: 'Enable Prompt Completion',
530530
category: 'General',
531-
requiresRestart: false,
531+
requiresRestart: true,
532532
default: false,
533533
description: 'Enable AI-powered prompt completion suggestions while typing.',
534534
showInDialog: true,

packages/cli/src/ui/hooks/usePromptCompletion.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
import { useState, useCallback, useRef, useEffect, useMemo } from 'react';
88
import {
99
Config,
10-
DEFAULT_GEMINI_FLASH_MODEL,
10+
DEFAULT_GEMINI_FLASH_LITE_MODEL,
1111
getResponseText,
1212
} from '@google/gemini-cli-core';
1313
import { Content, GenerateContentConfig } from '@google/genai';
1414
import { TextBuffer } from '../components/shared/text-buffer.js';
1515

1616
export const PROMPT_COMPLETION_MIN_LENGTH = 5;
17-
export const PROMPT_COMPLETION_DEBOUNCE_MS = 500;
17+
export const PROMPT_COMPLETION_DEBOUNCE_MS = 250;
1818

1919
export interface PromptCompletion {
2020
text: string;
@@ -117,9 +117,10 @@ export function usePromptCompletion({
117117
role: 'user',
118118
parts: [
119119
{
120-
text: `You are a professional prompt engineering assistant. Complete the user's partial prompt with expert precision and clarity.\n\nUser's input: "${trimmedText}"\n\nContinue this prompt by adding specific, actionable details that align with the user's intent. Focus on:\n- Clear, precise language\n- Structured requirements\n- Professional terminology\n- Measurable outcomes\n\nStart your response with the exact user text ("${trimmedText}") followed by your completion. Provide practical, implementation-focused suggestions rather than creative interpretations.\n\nFormat: Plain text only. Single completion. Match the user's language.`,
120+
text: `You are a professional prompt engineering assistant. Complete the user's partial prompt with expert precision and clarity. User's input: "${trimmedText}" Continue this prompt by adding specific, actionable details that align with the user's intent. Focus on: clear, precise language; structured requirements; professional terminology; measurable outcomes. Length Guidelines: Keep suggestions concise (ideally 10-20 characters); prioritize brevity while maintaining clarity; use essential keywords only; avoid redundant phrases. Start your response with the exact user text ("${trimmedText}") followed by your completion. Provide practical, implementation-focused suggestions rather than creative interpretations. Format: Plain text only. Single completion. Match the user's language. Emphasize conciseness over elaboration.`,
121121
},
122122
],
123+
123124
},
124125
];
125126

@@ -135,7 +136,7 @@ export function usePromptCompletion({
135136
contents,
136137
generationConfig,
137138
signal,
138-
DEFAULT_GEMINI_FLASH_MODEL,
139+
DEFAULT_GEMINI_FLASH_LITE_MODEL,
139140
);
140141

141142
if (signal.aborted) {

packages/core/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export * from './src/index.js';
88
export {
99
DEFAULT_GEMINI_MODEL,
1010
DEFAULT_GEMINI_FLASH_MODEL,
11+
DEFAULT_GEMINI_FLASH_LITE_MODEL,
1112
DEFAULT_GEMINI_EMBEDDING_MODEL,
1213
} from './src/config/models.js';
1314
export { logIdeConnection } from './src/telemetry/loggers.js';

0 commit comments

Comments
 (0)