Mario Zechner
b921298af7
Use exhaustive switch on message.role throughout coding-agent
...
- addMessageToChat: exhaustive switch for all AgentMessage roles
- renderSessionContext: delegates to addMessageToChat, special handling for assistant tool calls and tool results
- export-html formatMessage: exhaustive switch for all AgentMessage roles
- Removed isHookMessage, isBashExecutionMessage type guards in favor of role checks
- Fixed imports and removed unused getLatestCompactionEntry
2025-12-30 22:42:21 +01:00
Mario Zechner
9bba388ec5
Refactor SessionEventBase to pass sessionManager and modelRegistry
...
Breaking changes to hook types:
- SessionEventBase now passes sessionManager and modelRegistry directly
- before_compact: passes preparation, previousCompactions (newest first)
- before_switch: has targetSessionFile; switch: has previousSessionFile
- Removed resolveApiKey (use modelRegistry.getApiKey())
- getSessionFile() returns string | undefined for in-memory sessions
Updated:
- All session event emissions in agent-session.ts
- Hook examples (custom-compaction.ts, auto-commit-on-exit.ts, confirm-destructive.ts)
- Tests (compaction-hooks.test.ts, compaction-hooks-example.test.ts)
- export-html.ts guards for in-memory sessions
2025-12-30 22:42:18 +01:00
Mario Zechner
9851ee3bdb
Add syntax highlighting to HTML export using highlight.js
2025-12-24 12:13:56 +01:00
scutifer
531bb91337
feat: Improve HTML export with markdown rendering and theme support
...
- Render markdown server-side using marked (tables, headings, code blocks, etc.)
- Honor user's chosen theme (light/dark) with appropriate color defaults
- Add image rendering for user messages
- Style code blocks with TUI-like ```language markers
2025-12-24 12:13:15 +01:00
Mario Zechner
d5fd685901
Enable more biome lints and fix things
2025-12-21 22:56:20 +01:00
Mario Zechner
09a48fd1c3
feat: add line number display to HTML export for read tool calls
...
Implements line number display in HTML exports for read tool calls, matching the TUI format.
When offset/limit parameters are provided, displays path:startLine-endLine in yellow color.
Fixes #166
2025-12-10 22:05:14 +01:00
Mario Zechner
14d99b5f86
Move config.ts from utils/ to src/
2025-12-09 01:28:06 +01:00
Mario Zechner
83a6c26969
Reorganize file structure: core/, utils/, modes/interactive/components/, modes/interactive/theme/
2025-12-09 00:51:33 +01:00