Reviewed GitHub issue and related code.
UnderstandUpdated setting types to include "none" option.
EditModified UI components for new setting.
EditRan type checks and validations.
VerifyCommitted and pushed changes with changelog.
CleanupAnalyze GitHub issue(s): https://github.com/badlogic/pi-mono/issues/973 just implement and add a changelog entry
For each issue:
Read the issue in full, including all comments and linked issues/PRs.
For bugs:
For feature requests:
Do NOT implement unless explicitly asked. Analyze and propose only.
The user wants me to analyze GitHub issue #973 and implement it directly, plus add a changelog entry. Let me start by reading the issue.
>gh issue view 973 --repo badlogic/pi-mono --json title,body,comments,labels,stateThe issue is requesting adding a "none" option to the doubleEscapeAction setting so that double-escape doesn't trigger any action. Let me find the relevant code files to understand the current implementation.
Let me find the relevant code for the doubleEscapeAction setting:
>rg -l "doubleEscapeAction" --type ts /Users/badlogic/workspaces/pi-monoLet me read these files to understand the current implementation.
Now let me check the settings-selector.ts to see how the doubleEscapeAction options are presented in the UI:
Now let me check interactive-mode.ts to see how the doubleEscapeAction is handled:
Let me search for where the doubleEscapeAction is actually handled (the escape handler):
Let me search for the escape handler where the double-escape action is implemented:
>rg -n "lastEscapeTime|doubleEscapeAction|getDoubleEscapeAction" /Users/badlogic/workspaces/pi-mono/packages/coding-agent/src/modes/interactive/interactive-mode.tsNow let me read around line 1745 to understand how the double escape action is handled:
Now let me also check line 2982 to understand the settings configuration:
Let me see more of the callbacks to find the onDoubleEscapeActionChange:
Now I understand the implementation. Here's what I need to change:
settings-manager.ts:
doubleEscapeAction type from "fork" | "tree" to "fork" | "tree" | "none"getDoubleEscapeAction() method return typesetDoubleEscapeAction() method parameter typesettings-selector.ts:
SettingsConfig.doubleEscapeAction type from "fork" | "tree" to "fork" | "tree" | "none"SettingsCallbacks.onDoubleEscapeActionChange typeinteractive-mode.ts:
doubleEscapeAction === "none"CHANGELOG.md: Add entry for this change
Let me implement these changes:
Now I understand the implementation. I need to:
"none" to the doubleEscapeAction type"none" to the UI options and type"none"Let me implement:
Now I need to update the getter and setter return/parameter types:
Now update settings-selector.ts:
Now update the callback type:
Now update the values array:
Now update interactive-mode.ts to handle the "none" case:
Now I need to add a changelog entry. Let me first read the existing CHANGELOG.md to see the format:
Now add a changelog entry:
I need to add an "Added" entry under the ## [Unreleased] section. The current unreleased section only has a "Fixed" subsection. I need to add an "Added" subsection.
Now let me run the check to make sure everything compiles correctly:
Now run the type check:
>cd /Users/badlogic/workspaces/pi-mono && npm run check 2>&1All checks pass. Let me provide a summary of what was changed:
settings-manager.ts: Updated the doubleEscapeAction type in the Settings interface, and the getter/setter methods to support "none" in addition to "fork" and "tree".
settings-selector.ts: Updated the config type, callback type, and added "none" to the available values in the settings UI.
interactive-mode.ts: Modified the escape handler logic to skip the double-escape action entirely when set to "none".
CHANGELOG.md: Added entry under the [Unreleased] section.
All checks pass. Here's a summary of the changes:
Files modified:
packages/coding-agent/src/core/settings-manager.ts
"none" to the doubleEscapeAction type in Settings interfacegetDoubleEscapeAction() return type to include "none"setDoubleEscapeAction() parameter type to include "none"packages/coding-agent/src/modes/interactive/components/settings-selector.ts
SettingsConfig.doubleEscapeAction type to include "none"SettingsCallbacks.onDoubleEscapeActionChange callback type"none" to the values array for the double-escape-action settingpackages/coding-agent/src/modes/interactive/interactive-mode.ts
doubleEscapeAction === "none"packages/coding-agent/CHANGELOG.md
[Unreleased] ā ### Addedlgtm, commit and push the files you changed
The user wants me to commit and push the files I changed. I need to be careful to only add the specific files I modified, not use git add -A or git add ..
Files I changed:
>cd /Users/badlogic/workspaces/pi-mono && git add packages/coding-agent/src/core/settings-manager.ts packages/coding-agent/src/modes/interactive/components/settings-selector.ts packages/coding-agent/src/modes/interactive/interactive-mode.ts packages/coding-agent/CHANGELOG.md && git commit -m 'feat(coding-agent): add "none" option to doubleEscapeAction setting
Allows disabling double-escape behavior entirely for users who
accidentally trigger the tree/fork selector.
Fixes #973'Now push the changes.
>cd /Users/badlogic/workspaces/pi-mono && git pushPushed successfully. The commit message included "Fixes #973" which will automatically close the issue.
Done. Committed and pushed cb087586. The issue will be automatically closed via "Fixes #973" in the commit message.