co-mono/packages/coding-agent/test
Prateek Sunal 9b2aa4a683
Hooks can render custom status (#385)
* Add ctx.ui.setStatus(key, text) API for hooks to display status in footer

- Add setStatus to HookUIContext interface
- Implement in interactive mode (FooterComponent)
- Implement in RPC mode (fire-and-forget)
- Add no-op implementations for headless contexts
- Multiple statuses displayed on single line, sorted by key
- Supports ANSI styling (hooks handle their own colors)

* Remove setStatus from changelog for now

* Fix hook status API to follow TUI rules

- Sanitize status text: replace newlines, tabs, carriage returns with spaces
- Truncate combined status line to terminal width using truncateToWidth
- Update JSDoc to document sanitization and truncation behavior
- Remove unused createHookUIContext method
- Add missing setStatus to test mock

* Add setStatus to changelog

* Use dim ellipsis for hook status truncation for consistency with footer style

---------

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-01-01 21:35:37 +01:00
..
fixtures Fix syntax highlighting stderr spam with malformed markdown, fixes #274 2025-12-22 00:23:01 +01:00
session-manager Rework custom tools API with CustomToolContext 2025-12-31 12:05:24 +01:00
agent-session-branching.test.ts Change branch() to use entryId instead of entryIndex 2025-12-31 13:47:34 +01:00
agent-session-compaction.test.ts Add tree navigation tests and shared test utilities 2025-12-30 22:42:23 +01:00
agent-session-tree-navigation.test.ts Add tree navigation tests and shared test utilities 2025-12-30 22:42:23 +01:00
args.test.ts Add --version/-v flag to CLI (#170) 2025-12-12 00:01:06 +01:00
compaction-hooks-example.test.ts Rework custom tools API with CustomToolContext 2025-12-31 12:05:24 +01:00
compaction-hooks.test.ts Hooks can render custom status (#385) 2026-01-01 21:35:37 +01:00
compaction.test.ts refactor(coding-agent): fix compaction for branched sessions, consolidate hook context types 2025-12-31 02:24:24 +01:00
fuzzy.test.ts Reorganize file structure: core/, utils/, modes/interactive/components/, modes/interactive/theme/ 2025-12-09 00:51:33 +01:00
interactive-mode-status.test.ts Coalesce sequential status messages 2026-01-01 00:28:37 +01:00
model-resolver.test.ts refactor(hooks): split session events into individual typed events 2025-12-30 22:42:22 +01:00
rpc-example.ts Update RPC example to use RpcClient 2025-12-09 14:44:13 +01:00
rpc.test.ts refactor(hooks): split session events into individual typed events 2025-12-30 22:42:22 +01:00
skills.test.ts Enable more biome lints and fix things 2025-12-21 22:56:20 +01:00
streaming-render-debug.ts Fix syntax highlighting stderr spam with malformed markdown, fixes #274 2025-12-22 00:23:01 +01:00
test-theme-colors.ts Reorganize file structure: core/, utils/, modes/interactive/components/, modes/interactive/theme/ 2025-12-09 00:51:33 +01:00
tools.test.ts Fix edit tool failing on Windows due to CRLF line endings 2025-12-30 02:32:16 +05:30
truncate-to-width.test.ts fix: TUI crash with Unicode characters in branch selector 2025-12-05 11:59:39 +01:00
utilities.ts Add tree navigation tests and shared test utilities 2025-12-30 22:42:23 +01:00