feat: add systemMessage support for SessionStart hook and tune defaults

Add systemMessage field to HookResult so SessionStart can display a
colored timeline directly to the user in the CLI. The handler now
parallel-fetches both markdown (for Claude context) and ANSI-colored
(for user display) timelines, appending a viewer URL link.

Also update default settings to hide verbose token columns (read/work
tokens, savings amount) and disable full observation expansion, keeping
the cleaner index-only view by default.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-02-16 00:05:13 -05:00
parent 5ccaf40ad0
commit 34358ab33d
7 changed files with 46 additions and 28 deletions
+5 -1
View File
@@ -17,7 +17,11 @@ export const claudeCodeAdapter: PlatformAdapter = {
},
formatOutput(result) {
if (result.hookSpecificOutput) {
return { hookSpecificOutput: result.hookSpecificOutput };
const output: Record<string, unknown> = { hookSpecificOutput: result.hookSpecificOutput };
if (result.systemMessage) {
output.systemMessage = result.systemMessage;
}
return output;
}
return { continue: result.continue ?? true, suppressOutput: result.suppressOutput ?? true };
}