Skip to content

fix(reader): keep a repeated prompt after an assistant turn - #10

Open
Nyarlathoteppppp wants to merge 2 commits into
Walvez:mainfrom
Nyarlathoteppppp:fix/repeat-prompt-dedupe
Open

Nyarlathoteppppp wants to merge 2 commits into
Walvez:mainfrom
Nyarlathoteppppp:fix/repeat-prompt-dedupe

Conversation

@Nyarlathoteppppp

Copy link
Copy Markdown

Fixes #9.

lastUserText was only cleared on the next user message, so an identical prompt sent again after an assistant reply (e.g. "continue") was treated as an echo and its turn was dropped.

Reset it on non-user messages and on tool-call, tool-output and reasoning items. Consecutive echoes of the same prompt still collapse.

  • New tests in test/codex-reader.test.mjs cover a repeated prompt after an assistant reply, consecutive echoes, and each boundary payload type. They fail on main.
  • npm test: 71 pass, 0 fail.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repeated user prompt after an assistant turn is dropped on import

1 participant