* fix: allow rerunning a message the editor has not changed
The submit button in both message editors was disabled until the draft
differed from the persisted message, so reissuing a request after a
cancelled response, a failed generation, or a backend restarted on
different parameters meant typing a throwaway character and deleting it
first.
The button now reads "Rerun" while the draft is untouched and "Update &
rerun" once it differs, and neither state disables it. An untouched
assistant turn regenerates instead of replaying its own content as an
edit: editedContent retains the existing content and appends the new
completion, so replaying it would return the old answer with a second one
glued onto it.
Two ask options were dead on arrival. editedText was declared on TOptions
and passed by EditMessage but never destructured by ask, and
isResubmission was never set or read anywhere. Since no submission can
carry a text-level edit, and editedMessageId regenerates the row in
place, an assistant turn in the plain-text editor now always reads
"Rerun" and its status slot says where an unsaved edit is about to go.
Fixes#15205
* fix: address PR review bot findings
chatgpt-codex-connector:
- Route a plain-text assistant rerun through regeneration. It kept the
edit-resubmission options, so it replaced the response in place, and
with no targetResponseMessageId the submission resolved the NEWEST
answer for that turn: rerunning an older sibling pruned the wrong
subtree from the optimistic thread while appending a placeholder keyed
to the older sibling's own id. It now sends isRegenerate with
targetResponseMessageId, matching the hover action and
EditContentParts, and leaves the sibling index alone.
- Let an empty answer reach the rerun handler. The field is registered as
required so Save cannot blank a message, and routing the rerun through
handleSubmit meant a response cancelled before its first token had an
enabled button that did nothing. The answer's draft is never submitted,
so it no longer gates the rerun or the disabled state.
The status hint changes with the behavior: rerunning discards an unsaved
answer edit and generates a new response rather than replacing this one.