[PR #11710] feat: Add the ability to include cleared prompts in the history, toggled by a KV-persisted command palette item (resolves #11489) #13901

Open
opened 2026-02-16 18:18:43 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11710

State: open
Merged: No


What does this PR do?

I saw @sai-sy's feature request and decided to take a stab at it, figuring that it would likely be fairly straightforward forwards. Sure enough it was, and here it is:

This PR a toggling command in the System category of the command_list that allows users to enable or disable saving cleared prompts to history. The feature is disabled by default to preserve existing behaviour that our current users may have learned to expect.

When enabled via the command_list (using a menu item listed therein as either "Include cleared prompts in history" / "Don't include cleared prompts in history", depending on it's current state),pressing Ctrl+C will save the current prompt to history before clearing it, allowing users to navigate back with arrow keys.

The current of the state of the setting is persistent to the kv.json file, and so no structural change to the configuration files whatsoever is required.

Resolves #11489

How did you verify your code works?

Manual testing, bun type check, and bun test.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11710 **State:** open **Merged:** No --- ### What does this PR do? I saw @sai-sy's feature request and decided to take a stab at it, figuring that it would likely be fairly straightforward forwards. Sure enough it was, and here it is: This PR a toggling command in the System category of the `command_list` that allows users to enable or disable saving cleared prompts to history. The feature is disabled by default to preserve existing behaviour that our current users may have learned to expect. When enabled via the `command_list` (using a menu item listed therein as either "Include cleared prompts in history" / "Don't include cleared prompts in history", depending on it's current state),pressing Ctrl+C will save the current prompt to history before clearing it, allowing users to navigate back with arrow keys. The current of the state of the setting is persistent to the `kv.json` file, and so no structural change to the configuration files whatsoever is required. Resolves #11489 ### How did you verify your code works? Manual testing, `bun type check`, and `bun test`.
yindo added the pull-request label 2026-02-16 18:18:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13901