Skip to content

feat: unified conversation history — merge inbound + outbound in whatsrust_history#14

Open
xzneozx96 wants to merge 1 commit into
199-biotechnologies:mainfrom
xzneozx96:feat/unified-conversation-history
Open

feat: unified conversation history — merge inbound + outbound in whatsrust_history#14
xzneozx96 wants to merge 1 commit into
199-biotechnologies:mainfrom
xzneozx96:feat/unified-conversation-history

Conversation

@xzneozx96
Copy link
Copy Markdown

Summary

  • Adds ConversationRow struct and search_unified() method to storage.rs that UNIONs inbound_messages with sent rows from outbound_queue, sorted by timestamp
  • Updates handle_history in api.rs to call search_unified instead of search_inbound
  • Each row now includes a direction field ("inbound" / "outbound") so callers can distinguish sent vs received messages
  • The whatsrust_history MCP tool now returns the full conversation thread in one call

Previously, whatsrust_history only showed messages received — sent messages were invisible. This makes it usable for actual conversation context.

Test plan

  • cargo test passes (77 tests)
  • cargo clippy clean
  • Call whatsrust_history on a chat where you've sent messages — confirm outbound rows appear with direction: "outbound"
  • Pagination via before timestamp still works correctly

…srust_history

The /api/history endpoint and whatsrust_history MCP tool previously only
returned inbound messages. This adds a search_unified() query that UNIONs
inbound_messages with sent rows from outbound_queue, sorted by timestamp,
with a direction field ("inbound"/"outbound") on each row.

ConversationRow is a new serde-serializable struct returned by search_unified.
handle_history in api.rs now calls search_unified instead of search_inbound.
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