feat: subagent tool, undo system, history compaction, TUI shortcuts#3
Open
OrionArch wants to merge 1 commit into
Open
feat: subagent tool, undo system, history compaction, TUI shortcuts#3OrionArch wants to merge 1 commit into
OrionArch wants to merge 1 commit into
Conversation
…rtcuts - Add subagent_run tool for spawning stateless sub-agents in parallel - Implement UndoHistoryManager for multi-turn file edit rollback with /undo command - Add CompactActiveSession for session history compaction with /compact command - Wire CompactHistory hook across all LLM adapters (Anthropic, OpenAI, Genkit) - Add TUI prefix shortcuts: ! (shell), # (memory), & (background) - Add /skill slash command to list and inspect registered skills - Add integration and unit tests for compaction, subagent, and undo Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
subagent_runtool for spawning stateless sub-agents that execute tasks in parallel within their own context windowUndoHistoryManagerwith/undocommand for multi-turn file edit rollbackCompactActiveSessionwith/compactcommand to summarize older rounds and reclaim context window space!(shell run),#(memory save),&(background run)/skillcommand: List and inspect registered skills from~/.iroha/skills/Changed files (14 files, +833 / -20)
Core
pkg/agent/runner.go— undo manager, compact history hook, session_id context injectionpkg/agent/session_store.go—CompactActiveSessionimplementationpkg/agent/pool.go— refactoredExecuteMessageInDir, dynamic model getter hookspkg/agent/tools.go— registeredsubagent_runtoolpkg/agent/auto_review.go— addedsubagent_runto low-risk tool classificationNew files
pkg/agent/tools_subagent.go— subagent spawn and execute handlerpkg/agent/tools_subagent_test.go— unit tests for subagentpkg/agent/undo_test.go— unit tests for undo managerpkg/agent/compaction_integration_test.go— integration tests for compactionLLM adapters
pkg/llm/adapter.go— addedCompactHistorytoAdapterHooksinterfacepkg/llm/anthropic.go,openai.go,genkit_adapter.go— callCompactHistorybefore message conversionTUI
pkg/tui/update_keys.go— prefix shortcuts (!,#,&) and slash commands (/compact,/undo,/skill)Test plan
go test ./pkg/agent/...— all existing and new tests passgo test ./pkg/llm/...— retry and adapter tests pass!echo hello,#prefer dark mode,&npm run build,/compact,/undo,/skill🤖 Generated with Claude Code