Commit Graph
1628 Commits
Author SHA1 Message Date
Markus Ylisiurunen 10b854e2db extract shell config logic and add bash command cancellation in tui 2025-12-04 20:24:26 +02:00
Markus Ylisiurunen 00530a8223 add support for running bash commands via '!' in the tui editor 2025-12-04 20:06:12 +02:00
Mario Zechner 434996ba3e Release v0.12.9 2025-12-04 13:22:53 +01:00
Mario Zechner 5925209a3b Add /copy command docs and changelog entry, closes #105 2025-12-04 13:22:17 +01:00
Mario Zechner 27535a85d5 Merge branch 'built-in-copy-slash-command' 2025-12-04 13:22:13 +01:00
Mario Zechner 37d87a4866 fix(coding-agent): update compaction test to match actual summary prefix 2025-12-04 12:29:14 +01:00
Mario Zechner da2036a6aa fix(mom): private channel messages not being logged
- Add message.groups to required bot events in README
- Add groups:history and groups:read to required scopes in README
- app_mention handler now logs messages directly instead of relying on message event
- Add deduplication in ChannelStore.logMessage() to prevent double-logging
- Remove redundant current message append in agent.ts (already in log)
2025-12-04 12:24:29 +01:00
Markus Ylisiurunen 673858dc7f add cross-platform clipboard support and /copy command 2025-12-04 09:16:11 +02:00
Mario Zechner 5622cbd0cc Release v0.12.8 2025-12-04 03:59:20 +01:00
Mario Zechner bd003382b5 Add [Unreleased] section 2025-12-04 03:12:00 +01:00
Mario Zechner c6b2c3d8b3 Release v0.12.7 2025-12-04 03:11:03 +01:00
Mario Zechner 916e061f39 docs(coding-agent): add GitHub link to context compaction docs in CHANGELOG 2025-12-04 03:09:00 +01:00
Mario Zechner 8f7b5b8e3a docs(coding-agent): clean up compaction note 2025-12-04 03:05:01 +01:00
Mario Zechner d6521dba0c docs(coding-agent): add note about iterating on manual summary 2025-12-04 03:01:07 +01:00
Mario Zechner f45a237fa3 docs(coding-agent): expand compaction note with manual summary alternative 2025-12-04 02:59:55 +01:00
Mario Zechner 5e03295b99 docs(coding-agent): add note that compaction should generally be avoided 2025-12-04 02:58:45 +01:00
Mario Zechner 3c30548a72 docs(coding-agent): fix context compaction documentation
- Correctly describe cut point mechanism that keeps recent messages verbatim
- Document keepRecentTokens setting (default 20k)
- Fix reserveTokens default (16k not 20k)
- Explain summary chaining for multiple compactions
2025-12-04 02:57:45 +01:00
Mario Zechner 8f193790fb docs(coding-agent): add /compact, /autocompact commands and Context Compaction section
- Add /compact and /autocompact slash command documentation
- Add Context Compaction section explaining how it works, manual/auto modes, configuration
- Update /autocompact output to match thinking level toggle style (dimmed text)
- Remove Planned Features section (auto-compaction now implemented)
2025-12-04 02:56:03 +01:00
Mario Zechner 518bf4bbd7 docs(coding-agent): add compaction to RPC protocol documentation 2025-12-04 02:51:27 +01:00
Mario Zechner 0e58cb9786 docs(coding-agent): add context compaction to CHANGELOG 2025-12-04 02:49:46 +01:00
Mario Zechner 7ab3d33ae7 feat(coding-agent): add auto-compaction to RPC mode, add RPC compaction test
- RPC mode now auto-compacts when context exceeds threshold (same as TUI)
- Add RPC test for manual compaction via compact command
- Auto-compaction emits compaction event with auto: true flag
2025-12-04 02:49:22 +01:00
Mario Zechner b6a4b05796 perf(coding-agent): avoid loading session file for auto-compaction check
Use agent.state.messages instead of loading entries from disk
2025-12-04 02:42:43 +01:00
Mario Zechner 28348c600c feat(coding-agent): context compaction with /compact, /autocompact, and auto-trigger
- Add /compact command for manual context compaction with optional custom instructions
- Add /autocompact command to toggle automatic compaction
- Auto-trigger compaction when context usage exceeds threshold (contextWindow - reserveTokens)
- Add CompactionComponent for TUI display with collapsed/expanded states
- Add compaction events to HTML export with collapsible summary
- Refactor export-html.ts to eliminate duplication between session and streaming formats
- Use setTimeout to break out of agent event handler for safe async compaction
- Show compaction summary in TUI after compaction completes

fixes #92
2025-12-04 02:39:54 +01:00
Mario Zechner 900811f610 Wire up /compact and /autocompact slash commands 2025-12-04 00:31:21 +01:00
Mario Zechner 7d8a3a0a88 Context compaction: commands, auto-trigger, RPC support, /branch rework (fixes #92)
- Add compaction settings to Settings interface
- /compact [instructions]: manual compaction with optional focus
- /autocompact: toggle auto-compaction on/off
- Auto-compaction triggers after assistant message_end when threshold exceeded
- Footer shows (auto) when auto-compact is enabled
- RPC mode: {type: 'compact'} command emits CompactionEntry
- /branch now reads from session file to show ALL historical user messages
- createBranchedSessionFromEntries preserves compaction events
2025-12-04 00:25:53 +01:00
Mario Zechner e9b4fda9d3 WIP: Context compaction core logic (#92)
- Add CompactionEntry type with firstKeptEntryIndex
- Add loadSessionFromEntries() for compaction-aware loading
- Add compact() function that returns CompactionEntry
- Add token calculation and cut point detection
- Add tests with real session fixture and LLM integration

Still TODO: settings, /compact and /autocompact commands, auto-trigger in TUI, /branch rework
2025-12-04 00:07:53 +01:00
Mario Zechner 1a2991dc6d feat(mom): backfill missed messages on startup using conversations.history API
- Add getLastTimestamp() to ChannelStore to read last ts from log.jsonl
- Add backfillChannel() to fetch up to 3 pages (3000 messages) per channel
- Add backfillAllChannels() called in start() before socket connection
- Include mom's own messages (as bot) and user messages, exclude other bots
- Process attachments from backfilled messages
- Add logging: logBackfillStart, logBackfillChannel, logBackfillComplete
- Warn if attachment missing name instead of failing

fixes #103
2025-12-03 22:05:13 +01:00
Mario Zechner f9e694861e chore: bump version to 0.12.6 2025-12-03 17:12:27 +01:00
Mario Zechner 93824fe185 fix: normalize OpenAI token counting, add branch source tracking
pi-ai:
- Fixed usage.input to exclude cached tokens for OpenAI providers
- Previously input included cached tokens, causing double-counting
- Now input + output + cacheRead + cacheWrite correctly gives total context

coding-agent:
- Session header now includes branchedFrom field for branched sessions
- Updated compaction.md with refined implementation plan
- Updated session.md with branchedFrom documentation
2025-12-03 17:11:22 +01:00
Mario Zechner e159e8c8fa fix(coding-agent): use APP_NAME in export-html and tools-manager 2025-12-03 16:27:49 +01:00
Mario Zechner 203802f626 Release v0.12.5 2025-12-03 16:21:11 +01:00
Mario Zechner eddbff982e feat(coding-agent): configurable app name and config dir for forks (#95)
- Add piConfig to package.json for app name and config directory
- Consolidate paths.ts into config.ts with clearer naming
- Fix Bun binary detection (changed from %7EBUN to $bunfs)
- Update all hardcoded paths to use config.ts exports
- getThemesDir() for built-in themes, getCustomThemesDir() for user themes
2025-12-03 16:18:59 +01:00
Mario Zechner edffe8248a Update session docs: add type definition links, reorder sections 2025-12-03 15:44:33 +01:00
Mario Zechner f1aef2370a Clean up docs, add session format documentation 2025-12-03 15:42:56 +01:00
Mario Zechner 78b5cbfd34 Add RPC protocol documentation with tool call correlation 2025-12-03 15:28:17 +01:00
Mario Zechner 1e79eabdbd Add comprehensive RPC protocol documentation 2025-12-03 15:22:20 +01:00
Mario Zechner d2ce80a365 Simplified CI setup 2025-12-03 15:12:21 +01:00
Mario Zechner 0ff8557c4c Use ordered root build instead of parallel workspace build in CI 2025-12-03 15:05:04 +01:00
Mario Zechner 92f3aaefb7 Add web-ui/example to workspaces, remove CI workaround 2025-12-03 14:27:02 +01:00
Mario Zechner 84e2936a8b Try fixing root level compiles 2025-12-03 14:16:00 +01:00
Mario Zechner 4f6ef6cc39 Add CTRL+ENTER note for WSL 2025-12-02 22:18:12 +01:00
Mario Zechner 822e974095 ci: install fd and ripgrep for coding-agent tests 2025-12-02 16:36:36 +01:00
Mario Zechner 31e7bee360 Add auto-compaction trigger flow and maxTokens calculation 2025-12-02 16:17:05 +01:00
Mario Zechner 4b0b4961f7 Add compaction examples and /branch interaction 2025-12-02 16:09:46 +01:00
Mario Zechner b5322084b4 Add compaction research and implementation plan 2025-12-02 16:00:52 +01:00
Mario Zechner 5f326f8e80 docs: add CI section with warning about API secrets 2025-12-02 14:52:28 +01:00
Mario Zechner 6169d13f33 fix(coding-agent): use describe.skipIf for RPC test with explicit model
- Use describe.skipIf pattern matching other tests
- Skip when ANTHROPIC_API_KEY and ANTHROPIC_OAUTH_TOKEN are missing
- Use explicit --provider anthropic --model claude-sonnet-4-5
2025-12-02 14:50:29 +01:00
Peter Steinberger 2ce124f1fb Add CI workflow and fix workspace tests 2025-12-02 12:53:53 +00:00
Mario Zechner cd81f844e4 release: v0.12.4 2025-12-02 13:26:46 +01:00
badlogic 350d9c046d Fix Windows terminal background rendering and add /debug command
- Strip carriage return characters from bash tool output to fix background padding on Windows
- Add hidden /debug command to write rendered lines to debug log for TUI debugging
- Document /debug command in README.md development section
2025-12-02 13:22:54 +01:00