Skip to content

feat(plan): support clearing conversation context on plan approval#21168

Closed
Adib234 wants to merge 28 commits intomainfrom
adibakm/clear-context-conversation-approval
Closed

feat(plan): support clearing conversation context on plan approval#21168
Adib234 wants to merge 28 commits intomainfrom
adibakm/clear-context-conversation-approval

Conversation

@Adib234
Copy link
Copy Markdown
Contributor

@Adib234 Adib234 commented Mar 4, 2026

Summary

This PR adds support for surgically clearing the conversation context (both terminal UI and LLM history) upon plan approval. This allows users to eliminate "noisy" intermediate planning iterations while preserving critical context that occurred before the planning session began.

Details

  • History Boundary Tracking: Added planModeHistoryStartIndex to the Config service to precisely track when a session transitions into Plan Mode.
  • Surgical Truncation: Modified the exit_plan_mode tool to perform surgical history manipulation. It now retains all turns prior to the plan, the initial planning request turn, and the final approval turn, effectively discarding outdated draft discussions.
  • UI State Synchronization: Introduced a new CoreEvent.ApprovalModeChanged event. The AppContainer listens for this to track UI history indices and implements handleClearPlanContext for visual truncation using refreshStatic.
  • User Interface: Updated ExitPlanModeDialog to provide users with explicit choices to clear conversation context alongside existing approval modes (Default/Auto-Edit).

Related Issues

Fixes #17723

Notice that when we cleared context, the UI did not clear the history before plan mode was active.

How to Validate

  1. Start Gemini CLI in Default mode.
  2. Have a few conversation turns (e.g., "Hello", "How can you help?").
  3. Enter Plan Mode: /plan.
  4. Request a complex change and iterate once or twice by providing feedback and rejecting the initial draft.
  5. Approve the final plan using the new option: Yes, automatically accept edits & clear conversation.
  6. Verify UI: The terminal screen should surgically "rewind" to just before the planning iterations started, keeping your pre-plan turns visible.
  7. Verify LLM: Subsequent turns should show the LLM remembers your pre-plan conversation but has no context of the discarded planning drafts.
  8. Run tests: npm test -w @google/gemini-cli-core -- src/tools/exit-plan-mode.test.ts and npm test -w @google/gemini-cli -- src/ui/components/ExitPlanModeDialog.test.tsx.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
    • Linux

@Adib234 Adib234 requested a review from a team as a code owner March 4, 2026 22:01
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the plan approval workflow by introducing a feature to selectively clear conversation history. This allows users to maintain a cleaner, more focused conversation by removing irrelevant planning drafts and iterations from both the terminal UI and the LLM's memory, ensuring that only critical context persists after a plan is approved. The changes span core logic for history management, UI updates for user control, and event-driven synchronization between components.

Highlights

  • Surgical Conversation Context Clearing: Introduced functionality to surgically clear conversation context (both UI and LLM history) upon plan approval, allowing users to remove 'noisy' intermediate planning iterations while retaining pre-plan context.
  • History Boundary Tracking: Implemented planModeHistoryStartIndex in the Config service to precisely track the conversation history length when entering Plan Mode, serving as a boundary for truncation.
  • Enhanced exit_plan_mode Tool: Modified the exit_plan_mode tool to perform intelligent history manipulation, preserving pre-plan turns, the initial planning request, and the final approval turn, while discarding draft discussions.
  • UI State Synchronization: Added a new CoreEvent.ApprovalModeChanged event and corresponding listener in AppContainer to track UI history indices and enable visual truncation using refreshStatic.
  • Updated User Interface: The ExitPlanModeDialog now offers explicit options to clear conversation context alongside existing approval modes (Default/Auto-Edit), providing more control to the user.
Changelog
  • packages/cli/src/test-utils/render.tsx
    • Added handleClearPlanContext to mockUIActions for testing UI actions.
  • packages/cli/src/ui/AppContainer.tsx
    • Imported ApprovalMode directly instead of as a type.
    • Introduced planModeUIHistoryStartIndex state to track the UI history length at the start of plan mode.
    • Implemented a useEffect hook to listen for CoreEvent.ApprovalModeChanged and update planModeUIHistoryStartIndex when entering plan mode.
    • Added handleClearPlanContext callback to surgically truncate the UI history based on planModeUIHistoryStartIndex and refresh the static display.
    • Exposed handleClearPlanContext through the UIActions context.
  • packages/cli/src/ui/components/ExitPlanModeDialog.test.tsx
    • Updated onApprove mock calls to include the new clearConversation boolean argument.
    • Adjusted key press sequences in tests to account for the additional approval options in the dialog.
  • packages/cli/src/ui/components/ExitPlanModeDialog.tsx
    • Modified ExitPlanModeDialogProps.onApprove to accept an optional clearConversation boolean parameter.
    • Added new ApprovalOption enum values: AutoClear and ManualClear to provide options for clearing conversation context.
    • Updated the dialog's options list to include the new clear conversation choices with descriptive text.
    • Adjusted the onSubmit logic to determine and pass the clearConversation flag to onApprove based on the selected option.
  • packages/cli/src/ui/components/snapshots/ExitPlanModeDialog.test.tsx.snap
    • Updated UI snapshots to reflect the new approval options in the ExitPlanModeDialog.
  • packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
    • Imported useUIActions hook.
    • Utilized handleClearPlanContext from useUIActions when the clearConversation flag is true during plan approval.
    • Passed the clearConversation flag to the handleConfirm function.
    • Reordered dependencies in the useMemo hook for the confirmation details.
  • packages/cli/src/ui/contexts/UIActionsContext.tsx
    • Added handleClearPlanContext function signature to the UIActions interface.
  • packages/core/src/config/config.ts
    • Introduced a private planModeHistoryStartIndex property and a public getter getPlanModeHistoryStartIndex().
    • Modified setApprovalMode to record the current geminiClient history length in planModeHistoryStartIndex when transitioning into ApprovalMode.PLAN.
    • Added coreEvents.emitApprovalModeChanged(mode) to notify subscribers of approval mode changes.
  • packages/core/src/tools/exit-plan-mode.test.ts
    • Imported GeminiClient type.
    • Updated the mock Config to include getGeminiClient and getPlanModeHistoryStartIndex methods.
    • Added a new test case to verify that setHistory is called with a surgically truncated history when clearConversation is true.
  • packages/core/src/tools/exit-plan-mode.ts
    • Implemented logic within ExitPlanModeInvocation.execute to surgically truncate the LLM's conversation history.
    • The truncation retains pre-plan messages, the initial planning request, and the final exit_plan_mode message, discarding intermediate planning turns.
    • This logic is conditionally applied if payload.clearConversation is true.
  • packages/core/src/tools/tools.ts
    • Added an optional clearConversation boolean property to the ToolExitPlanModeConfirmationPayload interface.
  • packages/core/src/utils/events.ts
    • Imported ApprovalMode type.
    • Defined ApprovalModeChangedPayload interface to carry the new approval mode.
    • Added ApprovalModeChanged to the CoreEvent enum.
    • Extended CoreEvents interface to include ApprovalModeChanged event.
    • Added emitApprovalModeChanged method to CoreEventEmitter to dispatch approval mode change events.
Activity
  • The pull request introduces a new feature to clear conversation context upon plan approval.
  • Validation steps are provided to test the UI rewind and LLM context retention after clearing.
  • Tests for exit-plan-mode.test.ts and ExitPlanModeDialog.test.tsx have been updated and should be run.
  • Documentation and README have been updated as part of the pre-merge checklist.
  • The changes have been validated on MacOS using npm run and Seatbelt.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Adib234 Adib234 marked this pull request as draft March 4, 2026 22:02
@Adib234 Adib234 changed the title feat(plan): support clearing conversation context on plan approval [DRAFT] feat(plan): support clearing conversation context on plan approval Mar 4, 2026
@Adib234 Adib234 self-assigned this Mar 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Size Change: +7.41 kB (+0.03%)

Total Size: 26.5 MB

Filename Size Change
./bundle/gemini.js 26 MB +7.41 kB (+0.03%)
ℹ️ View Unchanged
Filename Size
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB
./bundle/sandbox-macos-strict-open.sb 4.82 kB
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB

compressed-size-action

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to provide a dialog to clear context after approval instead of baking it into the approval prompts?

  • approval options stay the same
  • if approved, provide an additional dialog to clear context the standard options, e.g. allow once, allow in this session, allow in future sessions etc

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a valuable feature to clear the conversation context upon plan approval, which helps in reducing noise from intermediate planning iterations. The implementation is well-structured, spanning across the core logic, UI components, and context management. The use of a new CoreEvent.ApprovalModeChanged event for state synchronization between the core and UI is a good design choice. The history truncation logic in exit-plan-mode.ts is precise and correctly implemented to retain the essential parts of the conversation. The accompanying updates to tests and snapshots ensure the new functionality is well-covered. Overall, this is a solid contribution with no major issues found.

@gemini-cli gemini-cli bot added area/core Issues related to User Interface, OS Support, Core Functionality area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. labels Mar 4, 2026
@Adib234
Copy link
Copy Markdown
Contributor Author

Adib234 commented Mar 5, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a feature to selectively clear conversation history upon plan approval, which helps in removing intermediate planning discussions. The implementation correctly tracks the start of a planning session, modifies the exit_plan_mode tool for surgical history truncation, and updates the UI to offer this new option to the user. The changes are well-tested and the logic appears sound. I have no high or critical severity feedback at this time.

@Adib234
Copy link
Copy Markdown
Contributor Author

Adib234 commented Mar 5, 2026

I've reviewed the changes and have a few concerns regarding the implementation:

  1. **Misplaced Code Hunk in **: There appears to be a hunk in that modifies . This interface and its logic seem to belong in instead.
  2. **Brittle in **: The use of to avoid 'Maximum update depth exceeded' when calling is non-idiomatic and potentially race-prone. This should be handled via a that triggers after the state update.
  3. Inaccurate on Session Resume: In , is initialized to if a session resumes in mode. For long-running sessions, this would cause a full history wipe rather than a surgical one.
  4. **Redundant Triggers in **: The tracking the start index depends on , causing it to fire on every new message. While safe due to the check, it's slightly inefficient and could be optimized.
  5. LLM History Truncation Logic: In , the search for might be fragile if other tools or hooks modify the history concurrently. We should ensure this index accurately represents the 'Enter plan mode' turn.

@Adib234
Copy link
Copy Markdown
Contributor Author

Adib234 commented Mar 5, 2026

I've reviewed the changes and have a few concerns regarding the implementation:

  1. Misplaced Code Hunk in render.tsx: There appears to be a hunk in packages/cli/src/test-utils/render.tsx that modifies ChoiceQuestionViewProps. This interface and its logic seem to belong in AskUserDialog.tsx instead.
  2. Brittle setTimeout in ExitPlanModeDialog.tsx: The use of setTimeout(() => onApprove(...), 0) to avoid 'Maximum update depth exceeded' when calling setSetting is non-idiomatic and potentially race-prone. This should be handled via a useEffect that triggers after the state update.
  3. Inaccurate planModeUIHistoryStartIndex on Session Resume: In AppContainer.tsx, planModeUIHistoryStartIndex is initialized to 0 if a session resumes in PLAN mode. For long-running sessions, this would cause a full history wipe rather than a surgical one.
  4. Redundant useEffect Triggers in AppContainer.tsx: The useEffect tracking the start index depends on historyManager.history.length, causing it to fire on every new message. While safe due to the prev === null check, it's slightly inefficient and could be optimized.
  5. LLM History Truncation Logic: In exit-plan-mode.ts, the search for planningUserIndex might be fragile if other tools or hooks modify the history concurrently. We should ensure this index accurately represents the 'Enter plan mode' turn.

@Adib234
Copy link
Copy Markdown
Contributor Author

Adib234 commented Mar 5, 2026

Thanks for the PR! I've reviewed the changes and found a few areas that need to be addressed to align with our development guidelines, particularly around React state management.

Feedback

  1. React State Management Antipattern (setTimeout):
    In packages/cli/src/ui/components/ExitPlanModeDialog.tsx, there's a setTimeout(() => { onApprove(...) }, 0) inside the onSubmit handler to work around a "Maximum update depth exceeded" error. This is a brittle workaround and violates the Strict React Guidelines about avoiding side effects within state updates. This should be handled more idiomatically, likely via a useEffect that triggers after the state update completes.

  2. Inaccurate History Truncation on Resume:
    In packages/cli/src/ui/AppContainer.tsx, planModeUIHistoryStartIndex is initialized to 0 if the CLI resumes a session already in PLAN mode. For long-running sessions, this would inadvertently wipe the entire history back to the start of the session instead of preserving the history from before plan mode started.

  3. Redundant useEffect Triggers:
    In packages/cli/src/ui/AppContainer.tsx, the useEffect listening for CoreEvent.ApprovalModeChanged includes historyManager.history.length in its dependency array. This means the effect is torn down and recreated every time a new message is added to the chat. Since the effect only cares about the event, the dependency on history.length is redundant and can cause unnecessary re-evaluations.

Please address these points, especially the setTimeout workaround, to ensure the UI remains robust and stable. Let me know if you have any questions!

@Adib234
Copy link
Copy Markdown
Contributor Author

Adib234 commented Mar 7, 2026

  1. Misplaced Code Hunk in render.tsx - Gemini is hallucinating, this comment doesn't need to be addressed
  2. Brittle setTimeout in ExitPlanModeDialog.tsx - replaced setTimeout with pendingApproval state and paired it with useEffect hook
  3. Inaccurate planModeUIHistoryStartIndex on Session Resume - rely on config.getPlanModeHistoryStartIndex instead of hard coded 0
  4. Redundant useEffect Triggers in AppContainer.tsx - removed historyManager.history.length
  5. LLM History Truncation Logic in exit-plan-mode.ts - two checks added, if plan mode was triggered by /plan or EnterPlanMode tool was invoked
  • Validate that the "Maximum update depth exceeded" error no longer appears when approving a plan.
  • Verify that resuming a CLI session already in Plan Mode accurately restores history without wiping the entire conversation.
  • Monitor AppContainer renders to ensure useEffect isn't re-triggering unnecessarily on every chat message.
  • End-to-end test the exit_plan_mode tool (both when initiated via the enter_plan_mode tool and via CLI slash commands) to ensure LLM history is appropriately truncated to preserve the initiating prompt.

@Adib234 Adib234 force-pushed the adibakm/clear-context-conversation-approval branch from 6c6ed34 to e3b1f31 Compare March 10, 2026 21:00
@Adib234 Adib234 marked this pull request as ready for review March 10, 2026 21:01
@Adib234 Adib234 requested a review from a team as a code owner March 10, 2026 21:01
@Adib234
Copy link
Copy Markdown
Contributor Author

Adib234 commented Mar 10, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a valuable feature for clearing conversation context upon plan approval, which will improve the user experience by reducing noise from planning iterations. The implementation is comprehensive, touching UI, core logic, and configuration. However, I've identified a high-severity issue in the new dialog logic where selecting "No" to clearing context unintentionally makes a permanent configuration change, which violates established UX consistency principles. My review includes a specific suggestion to correct this behavior.

Note: Security Review did not run due to the size of the PR.

Comment on lines +367 to +374
} else if (answer === ContextOption.No) {
clearConversation = false;
setSetting(
SettingScope.User,
'general.plan.clearContextOnApproval',
false,
);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The current implementation for the "No" option in the context clearing dialog has an unintended side effect. It permanently sets the general.plan.clearContextOnApproval setting to false, which prevents the user from being prompted again in future sessions. The option's label "No" and description "Keep context" imply a one-time choice for the current plan approval, not a permanent configuration change. This can lead to a confusing user experience, as the user would have to manually edit their settings file or use the /settings command to re-enable the feature or be prompted again.

To align with user expectations, this option should only affect the current plan approval. Please remove the call to setSetting.

            } else if (answer === ContextOption.No) {
              clearConversation = false;
            }
References
  1. Maintain consistency with existing UI behavior across components. Defer non-standard UX pattern improvements to be addressed holistically rather than in a single component. The 'No' option having a permanent configuration change effect is a non-standard and confusing UX pattern that deviates from typical user expectations for such a prompt.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended, "No" option clears the context dialog forever to not annoy users in the future

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a feature to clear conversation history upon plan approval, which is a great UX improvement. The implementation involves changes across the UI, core logic, and configuration to track plan mode state and surgically truncate both UI and LLM history. The overall approach is solid. I've found one potential issue in the new React component logic that could lead to unintended side effects, which I've detailed in a comment.

Note: Security Review did not run due to the size of the PR.

@Adib234
Copy link
Copy Markdown
Contributor Author

Adib234 commented Mar 11, 2026

Thanks for the PR! I've reviewed the changes and found a few areas that need to be addressed to align with our strict development guidelines, particularly around React state management and settings.

Code Review Feedback

  1. ContextOption.No Permanently Alters User Settings (High Severity):
    In packages/cli/src/ui/components/ExitPlanModeDialog.tsx, when the user selects ContextOption.No ("Keep context"), the code calls setSetting(SettingScope.User, 'general.plan.clearContextOnApproval', false);. This permanently changes the user's global setting to false, disabling the prompt for all future sessions. It should likely just proceed with clearConversation = false without modifying the global setting.

  2. React Anti-pattern: Using useEffect to trigger onApprove:
    The use of a pendingApproval state that triggers onApprove inside a useEffect is a known React anti-pattern. Triggering action callbacks via useEffect state-tracking can lead to race conditions or duplicate executions. The state logic in ExitPlanModeDialog has become complex enough that migrating it to a useReducer might be cleaner and resolve the root cause of the depth error, aligning with the rule to use reducers for complex state transitions.

  3. Missing Documentation in docs/get-started/configuration.md:
    Our strict development rules state: "If a setting has showInDialog: true, it MUST be documented in docs/get-started/configuration.md." This PR adds clearContextOnApproval to packages/cli/src/config/settingsSchema.ts with showInDialog: true and updates docs/reference/configuration.md, but it appears to miss updating docs/get-started/configuration.md.

  4. Redundant State in AppContainer.tsx:
    The state planModeUIHistoryStartIndex is initialized using an arrow function. While functionally correct, introducing local component state to track something that is already explicitly tracked on the config object (config.getPlanModeHistoryStartIndex()) is redundant and violates the principle of keeping AppContainer minimal. Consider whether this state needs to be duplicated in the UI or if it can just be read from the config when needed.

Please address these points to ensure the implementation is robust and consistent with the repository's patterns. Let me know if you have any questions!

@Adib234 Adib234 force-pushed the adibakm/clear-context-conversation-approval branch from dc99005 to e78099f Compare March 11, 2026 14:09
@Adib234 Adib234 changed the title [DRAFT] feat(plan): support clearing conversation context on plan approval feat(plan): support clearing conversation context on plan approval Mar 11, 2026
@Adib234
Copy link
Copy Markdown
Contributor Author

Adib234 commented Mar 11, 2026

Note to reviewers: excluding the snapshot file changes the lines of code changed in this PR are

adibakm@adibakm-macbookair1 ~/gemini-cli (adibakm/clear-context-conversation-approval)> git diff $(git merge-base main HEAD) HEAD --shortstat -- ':!*.svg'
 20 files changed, 497 insertions(+), 105 deletions(-)

Comment on lines +217 to +259
if (payload.clearConversation) {
const geminiClient = this.config.getGeminiClient();
if (geminiClient) {
const history = geminiClient.getHistory();
const startIndex = this.config.getPlanModeHistoryStartIndex();

// Find the user message that initiated the plan mode.
let planningUserIndex = -1;

// If the message exactly at startIndex is a user message, then plan mode
// was initiated via a UI/CLI command before the message was added to history.
if (
startIndex < history.length &&
history[startIndex].role === 'user'
) {
planningUserIndex = startIndex;
} else {
// Otherwise, Plan mode was initiated via the `enter_plan_mode` tool.
// The initiating user message is the last user message before startIndex.
for (
let i = Math.min(startIndex, history.length - 1);
i >= 0;
i--
) {
if (history[i].role === 'user') {
planningUserIndex = i;
break;
}
}
}

if (planningUserIndex !== -1) {
const lastModelMessage = history[history.length - 1];
// Keep everything before the plan, plus the initial plan request turn.
const newHistory = [
...history.slice(0, planningUserIndex + 1),
lastModelMessage,
];
geminiClient.setHistory(newHistory);
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we refactor the logic in

* SPDX-License-Identifier: Apache-2.0
into a shared util that's used both for /clear and this?

Comment on lines +64 to +70
enum ContextOption {
Once = 'Allow once',
Session = 'Allow for this session',
Always = 'Allow for all future sessions',
No = 'No',
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Adib234
Copy link
Copy Markdown
Contributor Author

Adib234 commented Mar 20, 2026

Closing PR, see linked issue

@Adib234 Adib234 closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality area/core Issues related to User Interface, OS Support, Core Functionality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support clearing context / conversation on plan approval

2 participants