mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-14 16:10:59 -07:00
fix(cli): keep plan-exit mode choice user-controlled
This commit is contained in:
@@ -214,7 +214,7 @@ Implement a comprehensive authentication system with multiple providers.
|
||||
});
|
||||
});
|
||||
|
||||
it('calls onApprove with DEEP_WORK when deep work is recommended and selected first', async () => {
|
||||
it('calls onApprove with DEEP_WORK when deep work is recommended and selected', async () => {
|
||||
const { stdin, lastFrame } = renderDialog({
|
||||
useAlternateBuffer,
|
||||
deepWorkEnabled: true,
|
||||
@@ -228,8 +228,12 @@ Implement a comprehensive authentication system with multiple providers.
|
||||
await waitFor(() => {
|
||||
expect(lastFrame()).toContain('Add user authentication');
|
||||
expect(lastFrame()).toContain('Deep Work');
|
||||
expect(lastFrame()).toContain(
|
||||
'Yes, start Deep Work execution (Recommended)',
|
||||
);
|
||||
});
|
||||
|
||||
writeKey(stdin, '\x1b[B'); // Down arrow to Deep Work
|
||||
writeKey(stdin, '\r');
|
||||
|
||||
await waitFor(() => {
|
||||
|
||||
@@ -243,49 +243,44 @@ export const ExitPlanModeDialog: React.FC<ExitPlanModeDialogProps> = ({
|
||||
? ApprovalMode.AUTO_EDIT
|
||||
: computedRecommendation;
|
||||
|
||||
const autoOptionLabel =
|
||||
effectiveRecommendation === ApprovalMode.AUTO_EDIT
|
||||
? `${ApprovalOption.Auto} (Recommended)`
|
||||
: ApprovalOption.Auto;
|
||||
const deepWorkOptionLabel =
|
||||
effectiveRecommendation === ApprovalMode.DEEP_WORK
|
||||
? `${ApprovalOption.DeepWork} (Recommended)`
|
||||
: ApprovalOption.DeepWork;
|
||||
const manualOptionLabel =
|
||||
effectiveRecommendation === ApprovalMode.DEFAULT
|
||||
? `${ApprovalOption.Manual} (Recommended)`
|
||||
: ApprovalOption.Manual;
|
||||
|
||||
const approvalOptions = deepWorkEnabled
|
||||
? effectiveRecommendation === ApprovalMode.DEEP_WORK
|
||||
? [
|
||||
{
|
||||
label: `${ApprovalOption.DeepWork} (Recommended)`,
|
||||
description:
|
||||
'Approves plan and uses iterative Deep Work execution with readiness checks.',
|
||||
},
|
||||
{
|
||||
label: ApprovalOption.Auto,
|
||||
description:
|
||||
'Approves plan and runs regular implementation with automatic edits.',
|
||||
},
|
||||
{
|
||||
label: ApprovalOption.Manual,
|
||||
description:
|
||||
'Approves plan but requires confirmation before each tool call.',
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
label: `${ApprovalOption.Auto} (Recommended)`,
|
||||
description:
|
||||
'Approves plan and runs regular implementation with automatic edits.',
|
||||
},
|
||||
{
|
||||
label: ApprovalOption.DeepWork,
|
||||
description:
|
||||
'Approves plan and uses iterative Deep Work execution with readiness checks.',
|
||||
},
|
||||
{
|
||||
label: ApprovalOption.Manual,
|
||||
description:
|
||||
'Approves plan but requires confirmation before each tool call.',
|
||||
},
|
||||
]
|
||||
? [
|
||||
{
|
||||
label: autoOptionLabel,
|
||||
description:
|
||||
'Approves plan and runs regular implementation with automatic edits.',
|
||||
},
|
||||
{
|
||||
label: deepWorkOptionLabel,
|
||||
description:
|
||||
'Approves plan and uses iterative Deep Work execution with readiness checks.',
|
||||
},
|
||||
{
|
||||
label: manualOptionLabel,
|
||||
description:
|
||||
'Approves plan but requires confirmation before each tool call.',
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
label: ApprovalOption.Auto,
|
||||
label: autoOptionLabel,
|
||||
description: 'Approves plan and allows tools to run automatically.',
|
||||
},
|
||||
{
|
||||
label: ApprovalOption.Manual,
|
||||
label: manualOptionLabel,
|
||||
description: 'Approves plan but requires confirmation for each tool.',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -17,7 +17,7 @@ Implementation Steps
|
||||
Files to Modify
|
||||
... last 3 lines hidden ...
|
||||
|
||||
1. Yes, automatically accept edits
|
||||
1. Yes, automatically accept edits (Recommended)
|
||||
Approves plan and allows tools to run automatically.
|
||||
2. Yes, manually accept edits
|
||||
Approves plan but requires confirmation for each tool.
|
||||
@@ -43,7 +43,7 @@ Implementation Steps
|
||||
Files to Modify
|
||||
... last 3 lines hidden ...
|
||||
|
||||
1. Yes, automatically accept edits
|
||||
1. Yes, automatically accept edits (Recommended)
|
||||
Approves plan and allows tools to run automatically.
|
||||
2. Yes, manually accept edits
|
||||
Approves plan but requires confirmation for each tool.
|
||||
@@ -71,7 +71,7 @@ Implementation Steps
|
||||
6. Add LDAP provider support in src/auth/providers/LDAPProvider.ts
|
||||
... last 24 lines hidden ...
|
||||
|
||||
● 1. Yes, automatically accept edits
|
||||
● 1. Yes, automatically accept edits (Recommended)
|
||||
Approves plan and allows tools to run automatically.
|
||||
2. Yes, manually accept edits
|
||||
Approves plan but requires confirmation for each tool.
|
||||
@@ -97,7 +97,7 @@ Implementation Steps
|
||||
Files to Modify
|
||||
... last 3 lines hidden ...
|
||||
|
||||
● 1. Yes, automatically accept edits
|
||||
● 1. Yes, automatically accept edits (Recommended)
|
||||
Approves plan and allows tools to run automatically.
|
||||
2. Yes, manually accept edits
|
||||
Approves plan but requires confirmation for each tool.
|
||||
@@ -125,7 +125,7 @@ Files to Modify
|
||||
- src/index.ts - Add auth middleware
|
||||
- src/config.ts - Add auth configuration options
|
||||
|
||||
1. Yes, automatically accept edits
|
||||
1. Yes, automatically accept edits (Recommended)
|
||||
Approves plan and allows tools to run automatically.
|
||||
2. Yes, manually accept edits
|
||||
Approves plan but requires confirmation for each tool.
|
||||
@@ -153,7 +153,7 @@ Files to Modify
|
||||
- src/index.ts - Add auth middleware
|
||||
- src/config.ts - Add auth configuration options
|
||||
|
||||
1. Yes, automatically accept edits
|
||||
1. Yes, automatically accept edits (Recommended)
|
||||
Approves plan and allows tools to run automatically.
|
||||
2. Yes, manually accept edits
|
||||
Approves plan but requires confirmation for each tool.
|
||||
@@ -204,7 +204,7 @@ Testing Strategy
|
||||
- Security penetration testing
|
||||
- Load testing for session management
|
||||
|
||||
● 1. Yes, automatically accept edits
|
||||
● 1. Yes, automatically accept edits (Recommended)
|
||||
Approves plan and allows tools to run automatically.
|
||||
2. Yes, manually accept edits
|
||||
Approves plan but requires confirmation for each tool.
|
||||
@@ -232,7 +232,7 @@ Files to Modify
|
||||
- src/index.ts - Add auth middleware
|
||||
- src/config.ts - Add auth configuration options
|
||||
|
||||
● 1. Yes, automatically accept edits
|
||||
● 1. Yes, automatically accept edits (Recommended)
|
||||
Approves plan and allows tools to run automatically.
|
||||
2. Yes, manually accept edits
|
||||
Approves plan but requires confirmation for each tool.
|
||||
|
||||
Reference in New Issue
Block a user