Implementation:0xsline OpenChatCut CLI Summary
Appearance
| Knowledge Sources | |
|---|---|
| Domains | CLI, Formatting |
| Last Updated | 2026-10-22 14:00 GMT |
Overview
Display formatting utility that converts ProjectDoc data into human-readable table rows for CLI output with computed durations and track summaries.
Description
The CLI Summary module converts timeline and item data into `TimelineRow`/`ItemRow` structures with computed durations (frames→human-readable), track summaries, and source labels. Keeps command modules thin by centralizing display formatting.
Usage
- CLI display: All CLI display output for timelines and items flows through here.
Code Reference
Source Location
- Repository: OpenChatCut
- File: cli/summary.ts
- Lines: 1-107
Signature
export function timelineRows(doc: ProjectDoc): TimelineRow[];
export function itemRows(timeline: Timeline): ItemRow[];
export function activeTimelineOf(doc: ProjectDoc): Timeline | undefined;
Import
import { timelineRows, itemRows, activeTimelineOf } from './summary.ts';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| doc | ProjectDoc | Yes | Project document |
| timeline | Timeline | Yes | Timeline object |
Outputs
| Name | Type | Description |
|---|---|---|
| timelineRows() returns | TimelineRow[] | Formatted timeline rows |
| itemRows() returns | ItemRow[] | Formatted item rows |
| activeTimelineOf() returns | undefined | Active timeline |
Usage Examples
Formatting Project Data
import { timelineRows, itemRows } from './summary.ts';
const rows = timelineRows(doc);
for (const row of rows) {
console.log(`${row.name} | ${row.duration} | ${row.itemCount} items`);
}
Related Pages
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment