From ff9c5189c922ceda25bd59c797b12872fd9dbc0d Mon Sep 17 00:00:00 2001 From: roboomp Date: Fri, 14 Aug 2026 08:26:37 +0000 Subject: [PATCH] docs: correct /hotkeys ctrl+d copy to match save-draft-and-exit The /hotkeys table described app.exit (Ctrl+D) as "Exit (when editor is empty)", implying readline/EOF-style conditional exit. The handler exits unconditionally and snapshots the current prompt as a resumable draft regardless of editor content (custom-editor.ts fires onExit for app.exit with no empty check; input-controller.ts handleCtrlD calls shutdown() unconditionally, which persists the draft). Corrected the line to "Exit (saves current prompt as draft)". Fixes #8530 --- packages/ai/test/remote-auth-store.test.ts | 2 +- packages/coding-agent/CHANGELOG.md | 4 ++++ packages/coding-agent/src/modes/utils/hotkeys-markdown.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/ai/test/remote-auth-store.test.ts b/packages/ai/test/remote-auth-store.test.ts index 56b203664..d730efce7 100644 --- a/packages/ai/test/remote-auth-store.test.ts +++ b/packages/ai/test/remote-auth-store.test.ts @@ -1110,7 +1110,7 @@ describe("RemoteAuthCredentialStore + AuthStorage integration", () => { test("broker invalidation drops server-side last-good usage reports", async () => { const credential = serverStore!.listAuthCredentials("anthropic")[0]; - if (!credential || credential.credential.type !== "oauth") throw new Error("expected OAuth credential"); + if (credential?.credential.type !== "oauth") throw new Error("expected OAuth credential"); serverStore!.updateAuthCredential(credential.id, { ...credential.credential, expires: Date.now() + 3_600_000, diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 6f6108547..4f1257b04 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Fixed + +- Fixed the `/hotkeys` table describing Ctrl+D (`app.exit`) as "Exit (when editor is empty)" when it actually exits unconditionally and saves the current prompt as a resumable draft ([#8530](https://github.com/can1357/oh-my-pi/issues/8530)). + ## [17.3.3] - 2026-08-14 ### Fixed diff --git a/packages/coding-agent/src/modes/utils/hotkeys-markdown.ts b/packages/coding-agent/src/modes/utils/hotkeys-markdown.ts index ed8bb035e..c16270ad9 100644 --- a/packages/coding-agent/src/modes/utils/hotkeys-markdown.ts +++ b/packages/coding-agent/src/modes/utils/hotkeys-markdown.ts @@ -39,7 +39,7 @@ export function buildHotkeysMarkdown(bindings: HotkeysMarkdownBindings): string "| `Tab` | Path completion / accept autocomplete |", `| \`${appKey(bindings, "app.interrupt")}\` | Cancel autocomplete / interrupt active work |`, `| \`${appKey(bindings, "app.clear")}\` | Clear editor (first) / exit (second) |`, - `| \`${appKey(bindings, "app.exit")}\` | Exit (when editor is empty) |`, + `| \`${appKey(bindings, "app.exit")}\` | Exit (saves current prompt as draft) |`, `| \`${appKey(bindings, "app.suspend")}\` | Suspend to background |`, `| \`${appKey(bindings, "app.display.reset")}\` | Reset terminal display |`, `| \`${appKey(bindings, "app.thinking.cycle")}\` | Cycle thinking level |`,