Skip to content

fix(conversation): Keep chat responses a newer jp wrote - #1248

Open
JeanMertz wants to merge 2 commits into
mainfrom
fix/keep-unknown-chat-responses
Open

JeanMertz wants to merge 2 commits into
mainfrom
fix/keep-unknown-chat-responses

Conversation

@JeanMertz

Copy link
Copy Markdown
Collaborator

A conversation holding a chat response variant this build does not
know can no longer fail to load. ChatResponse is untagged, so a new
variant is stored under the known chat_response type with a new
content key, and the unknown-event preservation from #778 never saw
it: the entry failed to deserialize and the workspace skipped the
whole conversation.

A chat_response holding none of the known content keys (message,
reasoning, data) is now kept verbatim and hidden, like an unknown
event type, and written back unchanged on save. A known key with a
malformed value still fails the load.

This ships ahead of the assistant commentary work, which adds a
commentary chat response, so builds have time to pick it up before
anything writes one.

Signed-off-by: Jean Mertz git@jeanmertz.com

A conversation holding a chat response variant this build does not
know can no longer fail to load. `ChatResponse` is untagged, so a new
variant is stored under the known `chat_response` type with a new
content key, and the unknown-event preservation from #778 never saw
it: the entry failed to deserialize and the workspace skipped the
whole conversation.

A `chat_response` holding none of the known content keys (`message`,
`reasoning`, `data`) is now kept verbatim and hidden, like an unknown
event type, and written back unchanged on save. A known key with a
malformed value still fails the load.

This ships ahead of the assistant commentary work, which adds a
`commentary` chat response, so builds have time to pick it up before
anything writes one.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant