Repository navigation
feat: add 'infer conversations show <id>' subcommand (#547) - #554
Merged
Merged
Conversation
Add a backend-agnostic `conversations show <session-id>` command to inspect a saved conversation's entries chronologically (role, timestamp, content, and tool_call_id for tool results). Entries load through the storage layer so it works on jsonl/sqlite/postgres/redis/memory, not just by reading jsonl files. - `--include-hidden` surfaces internally-injected entries (system reminders, plan-approval prompts, drained background-task results, the verify message) that are persisted with Hidden: true; off by default. - `--format text|json`: text is the human-readable default; json emits one object per line (NDJSON) for jq, matching the `infer agent` stdout shape. - Session id resolution mirrors `infer agent --session-id` via the rollover manager: literal UUIDs pass through, other values resolve a session group key. Filtering and formatting live in pure helpers (filterConversationEntries, buildConversationShowText, buildConversationShowJSON) with unit tests covering hidden-vs-shown filtering and the json/text split. Docs added to README and docs/commands-reference.md.
4 tasks
claude Bot
added a commit
to inference-gateway/docs
that referenced
this pull request
May 29, 2026
Update the Conversation Management section in cli.md to reflect the real CLI surface today: - Use the plural `infer conversations` command group instead of singular `conversation`. - Document the `list` and `show` subcommands; drop references to non-existent `export` and `delete` subcommands (including the stale `infer conversation export` example in Cost Tracking). - Document `infer conversations show <session-id>` with the `--include-hidden` and `--format text|json` flags. - Document session-id resolution (UUID passthrough plus session group key lookup, mirroring `infer agent --session-id`). - Add example commands matching the in-repo CLI docs. - Update the command summary table to use the plural group. Refs: inference-gateway/cli#547, inference-gateway/cli#554. Closes #87. Co-authored-by: Eden Reich <[email protected]>
edenreich
added a commit
to inference-gateway/docs
that referenced
this pull request
May 29, 2026
Update the Conversation Management section in cli.md to reflect the real CLI surface today: - Use the plural `infer conversations` command group instead of singular `conversation`. - Document the `list` and `show` subcommands; drop references to non-existent `export` and `delete` subcommands (including the stale `infer conversation export` example in Cost Tracking). - Document `infer conversations show <session-id>` with the `--include-hidden` and `--format text|json` flags. - Document session-id resolution (UUID passthrough plus session group key lookup, mirroring `infer agent --session-id`). - Add example commands matching the in-repo CLI docs. - Update the command summary table to use the plural group. Refs: inference-gateway/cli#547, inference-gateway/cli#554. Closes #87. Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Eden Reich <[email protected]>
edenreich
force-pushed
the
feat/conversations-show-547
branch
from
May 29, 2026 18:33
a386086 to
9b49467
Compare
inference-gateway-releaser Bot
pushed a commit
that referenced
this pull request
May 29, 2026
## [0.115.0](v0.114.0...v0.115.0) (2026-05-29) ### 🚀 Features * add 'infer conversations show <id>' subcommand ([#547](#547)) ([#554](#554)) ([41e06d5](41e06d5)), closes [#n](https://github.com/inference-gateway/cli/issues/n) * **agent:** emit session_stats summary on stream completion ([#553](#553)) ([892203b](892203b))
Contributor
|
🎉 This PR is included in version 0.115.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closed
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.
Summary
Closes #547.
Adds a backend-agnostic
infer conversations show <session-id>subcommand to inspect a saved conversation's entries chronologically. Until nowinfer conversationsonly hadlist, so inspecting a session (including hiddensystem_reminderentries) meant grepping raw.jsonlfiles — undiscoverable andjsonl-only.Behavior
infer conversations show <session-id>prints entries chronologically with role, timestamp, content, andtool_call_id(for tool results).storage.ConversationStorage.LoadConversation(same path aslist), so it works on all backends:jsonl,sqlite,postgres,redis,memory— not by reading files directly.--include-hidden(default off) surfaces entries persisted withHidden: true: system reminders, plan-approval prompts, drained background-task results, and the synthetic verify message injected byinfer agent.--format text|json:text(default) is human-readable with per-entry headers (#n [role] timestamp [hidden] [tool_call_id=…] [model=…]);jsonemits one object per line (NDJSON) forjq, matching theinfer agentstdout shape.infer agent --session-idvia the rollover manager: literal UUIDs pass through, other values resolve a session group key (so you can show by group name, e.g.channel-telegram-12345).Implementation
filterConversationEntries,buildConversationShowText,buildConversationShowJSON) with thin print wrappers — mirroring the existingrenderConversationsTablebuild-then-print split, which keeps the handler small and the logic unit-testable.formatting.ExtractTextFromContentfor content (handles multimodal/image-only) andSessionRolloverManager.ResolveSessionIDfor id resolution. No new domain interfaces → no mock regen.Acceptance criteria
show <session-id>prints entries chronologically (role, timestamp, content, tool_call_id).--include-hiddencontrolsHidden: trueemission (default off).--format jsonis one JSON object per line;--format text(default) is human-readable.cmd/conversations.goalongsideconversationsListCmd.infer agent --session-id(UUID passthrough + group-key lookup).Testing
task build, fullgo test ./..., andtask lint(0 issues) pass; 9 new unit tests added.jsonlbackend (seeded a 4-entry conversation incl. a hidden reminder): text omits hidden (3 shown) /--include-hiddenshows 4 with[hidden];--format jsonis valid NDJSON parsed byjq; not-found returnsfailed to load conversation: conversation not found: <id>.Notes
ResolveSessionIDpathinfer agentuses (intentional parity, not a divergent read-only variant).README.md,docs/commands-reference.md). A matching[DOCS]follow-up will be filed againstinference-gateway/docs.