GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(tui): restore the input mode of stashed prompts by dancvv · Pull Request #64718 · anomalyco/opencode

Conversation

@dancvv

@dancvv dancvv commented Nov 18, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #64630

Type of change

  • Bug fix

What does this PR do?

Store the prompt input mode with an explicitly stashed draft. Both pop and list selection now restore it along with the text. Stashes written before this change restore in normal mode.

How did you verify your code works?

Bound F6 to stash and F7 to pop or select. Typed !echo draft, pressed F6, left shell mode with Esc, then restored the draft with F7. Both TUI fixture tests check the draft text and the rendered Shell indicator. The prompt tests passed locally (92/92). AI assistance was used to implement and test the change.

Screenshots / recordings

Relevant rows from the TUI test renderer after the same pop sequence on both revisions:

Before

┃  echo draft
/tmp/opencode/packages/tui:main           shift+tab agents  ctrl+p commands

After

┃  echo draft
┃  Shell
/tmp/opencode/packages/tui:main                         esc exit shell mode

Checklist

  • Tested locally
  • Changes are limited to stash mode restoration and its regression tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dancvv
fix(tui): restore the input mode of stashed prompts
f1fff12
Fixes anomalyco#64630.
opencodejr[bot]
opencodejr Bot reviewed Nov 18, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This looks correct. I ran the steps from #64630 with opencode-drive and a simulated model. On the base, the popped draft comes back in Build mode and Enter sends it to the model. With this change it comes back in Shell mode and Enter doesn't send it to the model. The prompt tests and tsc -b pass in packages/tui. The new test fails on the base and passed 3 runs in a row here.

Public API: unchanged. Entries in the local prompt-stash.jsonl state file can now include an optional prompt.mode field. This is backwards compatible: older entries without it come back in normal mode.

No concerns.

Before

After

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@opencodejr opencodejr Bot mentioned this pull request Nov 18, 2026
Duplicate of #64718 #64719
Closed
@dancvv
Merge branch 'dev' into fix-64630-restore-stash-mode
ae5e229
opencodejr[bot]
opencodejr Bot reviewed Nov 19, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The new commit only merges dev, and the changes in this pull request are the same as before. I re-ran the #64630 steps on the new head with a simulated model. The popped draft still comes back in Shell mode, and Enter doesn't send it to the model. The prompt tests and tsc -b in packages/tui pass.

Public API: unchanged. Entries in the local prompt-stash.jsonl state file can include an optional prompt.mode field. Older entries without it come back in normal mode, so this is backwards compatible.

No concerns.

Before

After

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot mentioned this pull request Nov 19, 2026
📊 AI CLI 工具社区动态日报 2026-11-19 litang9/big_model_radar#726
Open

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

tui: popping a stashed Shell draft in Build mode submits it as a regular prompt

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dancvv
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.