Change the default-hidden message categories from [thinking, hook_progress] to [tool_result, system_message, hook_progress, file_snapshot]. This hides the verbose machine-oriented categories by default while keeping thinking blocks visible — they contain useful reasoning context that users typically want to see. Also rename the "summary" category label from "Summaries" to "Compactions" to better reflect what Claude's summary messages actually represent (context-window compaction artifacts). Tests updated to match the new defaults: the filter test now asserts that tool_result, system_message, hook_progress, and file_snapshot are all excluded, producing 5 visible messages instead of the previous 7. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
81 lines
1.7 KiB
TypeScript
81 lines
1.7 KiB
TypeScript
export type MessageCategory =
|
|
| "user_message"
|
|
| "assistant_text"
|
|
| "thinking"
|
|
| "tool_call"
|
|
| "tool_result"
|
|
| "system_message"
|
|
| "hook_progress"
|
|
| "file_snapshot"
|
|
| "summary";
|
|
|
|
export interface ParsedMessage {
|
|
uuid: string;
|
|
category: MessageCategory;
|
|
content: string;
|
|
toolName?: string;
|
|
toolInput?: string;
|
|
timestamp?: string;
|
|
rawIndex: number;
|
|
}
|
|
|
|
export interface SessionEntry {
|
|
id: string;
|
|
summary: string;
|
|
firstPrompt: string;
|
|
project: string;
|
|
created: string;
|
|
modified: string;
|
|
messageCount: number;
|
|
path: string;
|
|
duration?: number; // Duration in milliseconds from first to last message
|
|
}
|
|
|
|
export interface SessionListResponse {
|
|
sessions: SessionEntry[];
|
|
}
|
|
|
|
export interface SessionDetailResponse {
|
|
id: string;
|
|
project: string;
|
|
messages: ParsedMessage[];
|
|
}
|
|
|
|
export interface ExportRequest {
|
|
session: SessionDetailResponse;
|
|
visibleMessageUuids: string[];
|
|
redactedMessageUuids: string[];
|
|
autoRedactEnabled?: boolean;
|
|
}
|
|
|
|
export const ALL_CATEGORIES: MessageCategory[] = [
|
|
"user_message",
|
|
"assistant_text",
|
|
"thinking",
|
|
"tool_call",
|
|
"tool_result",
|
|
"system_message",
|
|
"hook_progress",
|
|
"file_snapshot",
|
|
"summary",
|
|
];
|
|
|
|
export const CATEGORY_LABELS: Record<MessageCategory, string> = {
|
|
user_message: "User Messages",
|
|
assistant_text: "Assistant Text",
|
|
thinking: "Thinking Blocks",
|
|
tool_call: "Tool Calls",
|
|
tool_result: "Tool Results",
|
|
system_message: "System Messages",
|
|
hook_progress: "Hook/Progress",
|
|
file_snapshot: "File Snapshots",
|
|
summary: "Compactions",
|
|
};
|
|
|
|
export const DEFAULT_HIDDEN_CATEGORIES: MessageCategory[] = [
|
|
"tool_result",
|
|
"system_message",
|
|
"hook_progress",
|
|
"file_snapshot",
|
|
];
|