mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 04:24:51 -07:00
feat: move shell efficiency guidelines to tool description (#18614)
This commit is contained in:
@@ -245,6 +245,7 @@ export function renderOperationalGuidelines(
|
||||
if (!options) return '';
|
||||
return `
|
||||
# Operational Guidelines
|
||||
|
||||
${shellEfficiencyGuidelines(options.enableShellEfficiency)}
|
||||
|
||||
## Tone and Style (CLI Interaction)
|
||||
|
||||
@@ -55,7 +55,6 @@ export interface PrimaryWorkflowsOptions {
|
||||
export interface OperationalGuidelinesOptions {
|
||||
interactive: boolean;
|
||||
isGemini3: boolean;
|
||||
enableShellEfficiency: boolean;
|
||||
interactiveShellEnabled: boolean;
|
||||
}
|
||||
|
||||
@@ -259,8 +258,6 @@ export function renderOperationalGuidelines(
|
||||
return `
|
||||
# Operational Guidelines
|
||||
|
||||
${shellEfficiencyGuidelines(options.enableShellEfficiency)}
|
||||
|
||||
## Tone and Style
|
||||
|
||||
- **Role:** A senior software engineer and collaborative peer programmer.
|
||||
@@ -517,15 +514,6 @@ function planningPhaseSuggestion(options: PrimaryWorkflowsOptions): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
function shellEfficiencyGuidelines(enabled: boolean): string {
|
||||
if (!enabled) return '';
|
||||
return `
|
||||
## Shell Tool Efficiency
|
||||
|
||||
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
|
||||
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).`;
|
||||
}
|
||||
|
||||
function toneAndStyleNoChitchat(isGemini3: boolean): string {
|
||||
return isGemini3
|
||||
? `
|
||||
|
||||
Reference in New Issue
Block a user