/** * Display formatters for the session browser and inspect tools. * * Shape only: durations, timestamps, counts, truncation and markdown cells all * delegate to the canonical primitives in `src/utils/text-format.ts`, so every * render path is total (no thrown `RangeError`, no `NaN`/`Infinity` text) and * locale-independent. */ import type { SessionInfo, Message, FileDiff, Todo, SessionStats, SearchMatch } from "./types.ts"; /** * Format an epoch-millisecond timestamp as `YYYY-MM-DD HH:mm:ss` (UTC). * * Total: a missing, non-finite or out-of-range value renders as `unknown` * instead of throwing `RangeError: Invalid Date`. Session records are read from * disk, so a single damaged `time.created` must not kill the tool call. */ export declare function formatDate(ms: number): string; /** * Format a millisecond duration in the session-table style: * `0s` · `42s` · `1m 5s` · `1h 0m` · `25h 0m`. * * Non-finite and negative input degrades to `0s`. */ export declare function formatDuration(ms: number): string; /** * Seconds-ago rendering for a session timestamp. * * Re-exported from the canonical module under this module's historical name so * existing session-tool imports keep working; non-finite input is `unknown`. */ export { formatRelativeTime as relativeTime } from "../utils/text-format.ts"; /** * Markdown table of sessions. `renderMarkdownTable` applies the canonical * `escapeMarkdownTableCell` to every cell, so a title containing `|` or a * newline stays inside its own row. */ export declare function formatSessionTable(sessions: SessionInfo[]): string; export declare function formatSessionListTable(sessions: SessionInfo[], messageCounts: Record): string; export declare function formatMessages(messages: Message[], options?: { includeThinking?: boolean; includeToolResults?: boolean; roleFilter?: "user" | "assistant"; toolFilter?: string; offset?: number; }): string; export declare function formatStats(stats: SessionStats): string; export declare function formatDiff(diffs: FileDiff[]): string; export declare function formatSearchResults(matches: SearchMatch[], totalMatches: number, sessionCount: number): string; export declare function formatTodoList(todos: Todo[]): string; //# sourceMappingURL=formatters.d.ts.map