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