Skip to content

Comments

fix(sessions): dedupe streamed tool calls with deterministic upserts#223

Merged
baxen merged 2 commits intomainfrom
better-chats
Feb 19, 2026
Merged

fix(sessions): dedupe streamed tool calls with deterministic upserts#223
baxen merged 2 commits intomainfrom
better-chats

Conversation

@baxen
Copy link
Collaborator

@baxen baxen commented Feb 19, 2026

Summary

  • replace heuristic session deduplication with streamed tool-call upserts in the writer
  • collapse duplicate streamed tool call cards in the session modal
  • add acp_stream_probe example to exercise streaming behavior

Revert the SessionModal tool-call dedupe heuristic from aa7ed57 so the UI reflects raw message rows again.

Handle streamed ACP updates in the backend writer by updating existing rows instead of inserting duplicates: repeated tool_call IDs now update the same tool_call row, and repeated tool_result chunks update a single tool_result row.

Add an ACP stream probe example (src-tauri/examples/acp_stream_probe.rs) to run codex-acp and print tool-call/tool-result event patterns and duplicate ID counts for debugging.

Also add writer unit tests covering both behaviors.
@baxen baxen merged commit fdea314 into main Feb 19, 2026
3 checks passed
@baxen baxen deleted the better-chats branch February 19, 2026 23:31
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