Repository navigation
009 full content lib - #15
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lib layer must return complete, untruncated content — truncation belongs only in the CLI UI layer #12