mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-19 00:02:51 -07:00
merge(read-exp): Reconcile 'afw/read-exp-v3' with 'main'
- Integrate model-specific tool optimizations (isGemini3) into read-file and snippets. - Reconcile prompt snippets with main's Context Efficiency mandates and experiment's discovery guidelines. - Adopt main's refactored tool definition structure while retaining experiment's surgical extraction guidance. - Resolve pagination and truncation logic in file utilities. - Update snapshots and verify with full test suite. - Align prompt provider and snippets with main's code style and linting patterns.
This commit is contained in:
@@ -119,6 +119,7 @@ export class PromptProvider {
|
||||
})),
|
||||
coreMandates: this.withSection('coreMandates', () => ({
|
||||
interactive: interactiveMode,
|
||||
isGemini3: isModernModel,
|
||||
hasSkills: skills.length > 0,
|
||||
hasHierarchicalMemory,
|
||||
contextFilenames,
|
||||
@@ -175,7 +176,6 @@ export class PromptProvider {
|
||||
'operationalGuidelines',
|
||||
() => ({
|
||||
interactive: interactiveMode,
|
||||
isGemini3: isModernModel,
|
||||
enableShellEfficiency: config.getEnableShellOutputEfficiency(),
|
||||
interactiveShellEnabled: config.isInteractiveShellEnabled(),
|
||||
}),
|
||||
@@ -196,9 +196,13 @@ export class PromptProvider {
|
||||
: this.withSection('finalReminder', () => ({
|
||||
readFileToolName: READ_FILE_TOOL_NAME,
|
||||
})),
|
||||
};
|
||||
} as snippets.SystemPromptOptions;
|
||||
|
||||
basePrompt = activeSnippets.getCoreSystemPrompt(options);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const getCoreSystemPrompt = activeSnippets.getCoreSystemPrompt as (
|
||||
options: snippets.SystemPromptOptions,
|
||||
) => string;
|
||||
basePrompt = getCoreSystemPrompt(options);
|
||||
}
|
||||
|
||||
// --- Finalization (Shell) ---
|
||||
|
||||
@@ -35,6 +35,7 @@ export interface SystemPromptOptions {
|
||||
sandbox?: SandboxMode;
|
||||
interactiveYoloMode?: boolean;
|
||||
gitRepo?: GitRepoOptions;
|
||||
finalReminder?: FinalReminderOptions;
|
||||
}
|
||||
|
||||
export interface PreambleOptions {
|
||||
@@ -60,7 +61,6 @@ export interface PrimaryWorkflowsOptions {
|
||||
|
||||
export interface OperationalGuidelinesOptions {
|
||||
interactive: boolean;
|
||||
isGemini3: boolean;
|
||||
enableShellEfficiency: boolean;
|
||||
interactiveShellEnabled: boolean;
|
||||
}
|
||||
@@ -71,6 +71,10 @@ export interface GitRepoOptions {
|
||||
interactive: boolean;
|
||||
}
|
||||
|
||||
export interface FinalReminderOptions {
|
||||
readFileToolName: string;
|
||||
}
|
||||
|
||||
export interface PlanningWorkflowOptions {
|
||||
planModeToolsList: string;
|
||||
plansDir: string;
|
||||
|
||||
Reference in New Issue
Block a user