What's Changed
Code Refactor
Split monolithic index.ts (~2000 lines) into focused modules for better maintainability:
execution.ts- Core runSync function for single agent executionchain-execution.ts- Chain orchestration (sequential + parallel steps)async-execution.ts- Async/background execution supportrender.ts- TUI rendering (widget, tool result display)schemas.ts- TypeBox parameter schemasformatters.ts- Output formatting utilitiesutils.ts- Shared utility functionstypes.ts- Shared type definitions and constants
Bug Fixes
- Expanded view visibility - Running chains now properly show:
- Task preview (truncated to 80 chars) for each step
- Recent tools fallback when between tool calls
- Increased recent output from 2 to 3 lines
- Progress matching - Added agent name fallback when index doesn't match
- Type safety - Added defensive checks for union types
Installation
npx pi-subagents