Skip to content

Conversation

hasvtar
Copy link

@hasvtar hasvtar commented Oct 7, 2025

Summary

Adds /tangent compact subcommand to compact tangent conversations with in-place summary replacement.

Changes

  • Add Compact subcommand to TangentSubcommand enum
  • Implement exit_tangent_mode_with_compact() to replace tangent entries with single summary entry
  • Add is_tangent_empty() helper method
  • Make HistoryEntry fields public for testing
  • Add comprehensive tests for single and multiple tangent compacts

Problem Fixed

Previously, tangent compact summaries were lost when exiting tangent mode. Multiple tangent compacts would overwrite previous summaries.

Solution

Replace tangent entries with a single summary entry in history at the exact position where the tangent occurred. This maintains perfect chronological order and preserves all summaries.

Testing

  • All existing tests pass
  • Added test_exit_tangent_mode_with_compact()
  • Added test_multiple_tangent_compacts()

- Add /tangent compact subcommand to compact tangent conversations
- Replace tangent entries with single summary entry in history
- Preserve chronological order with summaries at tangent positions
- Support multiple tangent compacts without losing previous summaries
- Add comprehensive tests for single and multiple tangent compacts

Fixes issue where tangent compact summaries were lost when exiting
tangent mode. Summary now appears as history entry at exact position
where tangent occurred, maintaining perfect chronological order.

https://issues.amazon.com/issues/P129406383
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