Skip to content

009 full content lib - #15

Merged
S2thend merged 4 commits into
mainfrom
009-full-content-lib
Apr 3, 2026
Merged

S2thend merged 4 commits into
mainfrom
009-full-content-lib

Conversation

@S2thend

@S2thend S2thend commented Apr 3, 2026

Copy link
Copy Markdown
Owner

lib layer must return complete, untruncated content — truncation belongs only in the CLI UI layer #12

S2thend added 4 commits April 3, 2026 16:07
Define the 009-full-content-lib feature workflow so implementation can enforce full-fidelity library output and keep truncation in the CLI formatter layer only.

Included artifacts:
- spec.md with prioritized user stories, requirements, edge cases, and success criteria
- plan.md plus research, data model, CLI/library contracts, and quickstart guidance
- tasks.md with user-story-scoped implementation and validation tasks
- AGENTS.md context update for the new feature branch

Key decisions captured:
- getSession() and related library APIs must return complete message/tool content
- parser warnings must preserve full invalid-line content instead of preview truncation
- default cch view may abbreviate display output only
- cch view --full should disable formatter truncation and preserve no-pager behavior
Return full parser-warning/session content from the library layer and move all human-readable shortening into the CLI formatter.
Thread the existing --full/-f flag into formatSession() so full mode bypasses formatter truncation while default mode keeps the current caps and uses a dedicated display-only marker.
Add long-content regression coverage for parser warnings, session retrieval, JSON/Markdown exports, default/full CLI rendering, and post-view data invariance.

Validation:
- npm run typecheck
- npm test
- npm run lint

Per-file summary:
- specs/009-full-content-lib/quickstart.md: document the formatDisplayPreview() helper introduced by the implementation.
- specs/009-full-content-lib/tasks.md: mark all 17 feature implementation tasks as complete.
- src/cli/commands/view.ts: forward the global --full flag into human-readable session formatting.
- src/cli/formatters/session.ts: add a full-mode option and centralize default-only preview truncation with [...truncated for display].
- src/lib/parser.ts: return full trimmed invalid JSONL content in ParseWarning.content.
- tests/integration/cli/view.test.ts: add long-content default/full/json CLI coverage plus post-view retrieval/export invariance checks.
- tests/integration/export-sessions.test.ts: verify JSON and Markdown exports preserve long message, thinking, tool input, and tool result content.
- tests/integration/get-session.test.ts: verify getSession() and getAgentSession() preserve long text, thinking, tool input, and tool result payloads.
- tests/unit/cli/formatters/session.test.ts: cover full-mode untruncated rendering and default-mode marker/cap previews.
- tests/unit/parser.test.ts: assert parser warnings expose full trimmed long invalid-line content.
@S2thend S2thend self-assigned this Apr 3, 2026
@S2thend
S2thend merged commit d8f347a into main Apr 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant