Documentation
¶
Overview ¶
Package recall provides terminal output functions for the recall command.
Index ¶
- func Aborted(cmd *cobra.Command)
- func AmbiguousSessionMatch(cmd *cobra.Command, query string, lines []string)
- func AmbiguousSessionMatchWithHint(cmd *cobra.Command, query string, lines []string, hint string)
- func BlankLine(cmd *cobra.Command)
- func CodeBlock(cmd *cobra.Command, content string)
- func ConfirmPrompt(cmd *cobra.Command)
- func ConversationTurn(cmd *cobra.Command, index int, role, timestamp string)
- func ExportFinalSummary(cmd *cobra.Command, exported, updated, renamed, skipped int)
- func ExportedFile(cmd *cobra.Command, filename, suffix string)
- func Hint(cmd *cobra.Command, text string)
- func JournalSyncLocked(cmd *cobra.Command, filename string)
- func JournalSyncNone(cmd *cobra.Command)
- func JournalSyncSummary(cmd *cobra.Command, locked, unlocked int)
- func JournalSyncUnlocked(cmd *cobra.Command, filename string)
- func ListItem(cmd *cobra.Command, format string, args ...any)
- func LockUnlockEntry(cmd *cobra.Command, filename, verb string)
- func LockUnlockNone(cmd *cobra.Command)
- func LockUnlockSummary(cmd *cobra.Command, verb string, count int)
- func MoreTurns(cmd *cobra.Command, remaining int)
- func NoFiltersMatch(cmd *cobra.Command)
- func NoSessionsForProject(cmd *cobra.Command, allProjects bool)
- func NoSessionsWithHint(cmd *cobra.Command, allProjects bool)
- func NumberedItem(cmd *cobra.Command, n int, item string)
- func SectionHeader(cmd *cobra.Command, level int, title string)
- func SessionDetail(cmd *cobra.Command, label, value string)
- func SessionDetailInt(cmd *cobra.Command, label string, value int)
- func SessionListFooter(cmd *cobra.Command, hasMore bool)
- func SessionListHeader(cmd *cobra.Command, total, shown int)
- func SessionListRow(cmd *cobra.Command, format string, values ...any)
- func SessionMetadata(cmd *cobra.Command, info SessionInfo)
- func SkipFile(cmd *cobra.Command, filename, reason string)
- func TextBlock(cmd *cobra.Command, text string)
- type SessionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Aborted ¶
Aborted prints that an operation was aborted.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
func AmbiguousSessionMatch ¶
AmbiguousSessionMatch prints a list of matching sessions to stderr.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- query: the ambiguous query string.
- lines: pre-formatted lines describing each match.
func AmbiguousSessionMatchWithHint ¶
AmbiguousSessionMatchWithHint prints matching sessions with a specific-ID hint.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- query: the ambiguous query string.
- lines: pre-formatted lines describing each match.
- hint: suggested more-specific ID.
func BlankLine ¶
BlankLine prints an empty line to stdout.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
func CodeBlock ¶
CodeBlock prints content wrapped in a fenced code block.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- content: the code content.
func ConfirmPrompt ¶
ConfirmPrompt prints the y/N confirmation prompt.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
func ConversationTurn ¶
ConversationTurn prints a conversation turn header.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- index: 1-based turn number.
- role: display role label (e.g. "User", "Assistant").
- timestamp: formatted time string.
func ExportFinalSummary ¶
ExportFinalSummary prints the final export summary with counts.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- exported: number of new files written.
- updated: number of existing files updated.
- renamed: number of files renamed.
- skipped: number of files skipped.
func ExportedFile ¶
ExportedFile prints that a file was exported or updated.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- filename: the exported file name.
- suffix: optional annotation (e.g. "updated, frontmatter preserved"). Empty string omits the parenthetical.
func Hint ¶
Hint prints a usage hint to stdout.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- text: the hint text.
func JournalSyncLocked ¶
JournalSyncLocked prints a single locked-entry confirmation.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- filename: the journal filename that was locked.
func JournalSyncNone ¶
JournalSyncNone prints the message when no journal entries are found.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
func JournalSyncSummary ¶
JournalSyncSummary prints the sync summary: match, locked count, and/or unlocked count.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- locked: number of newly locked entries.
- unlocked: number of newly unlocked entries.
func JournalSyncUnlocked ¶
JournalSyncUnlocked prints a single unlocked-entry confirmation.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- filename: the journal filename that was unlocked.
func ListItem ¶
ListItem prints a Markdown list item to stdout.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- format: printf format string for the item text.
- args: format arguments.
func LockUnlockEntry ¶
LockUnlockEntry prints the confirmation for a single locked/unlocked entry.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- filename: journal filename.
- verb: "locked" or "unlocked".
func LockUnlockNone ¶
LockUnlockNone prints the message when no journal entries are found (lock/unlock context).
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
func LockUnlockSummary ¶
LockUnlockSummary prints the lock/unlock summary.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- verb: "locked" or "unlocked".
- count: number of entries changed. Zero prints no-changes message.
func MoreTurns ¶
MoreTurns prints the "and N more turns" continuation line.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- remaining: number of remaining turns.
func NoFiltersMatch ¶
NoFiltersMatch prints that no sessions matched the applied filters.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
func NoSessionsForProject ¶
NoSessionsForProject prints guidance when no sessions are found.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- allProjects: if true, show the generic message; otherwise suggest --all-projects.
func NoSessionsWithHint ¶
NoSessionsWithHint prints that no sessions were found with storage hint.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- allProjects: if true, show storage path; otherwise suggest --all-projects.
func NumberedItem ¶
NumberedItem prints a numbered item to stdout.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- n: the item number.
- item: the item text.
func SectionHeader ¶
SectionHeader prints a Markdown section heading to stdout.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- level: heading level (e.g. 1 for "#", 2 for "##").
- title: the heading text.
func SessionDetail ¶
SessionDetail prints a labeled metadata line to stdout.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- label: bold metadata prefix (e.g. "**ID**:").
- value: the value to display.
func SessionDetailInt ¶
SessionDetailInt prints a labeled integer metadata line to stdout.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- label: bold metadata prefix.
- value: the integer value.
func SessionListFooter ¶
SessionListFooter prints the footer hint for recall list.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- hasMore: if true, show the --limit hint.
func SessionListHeader ¶
SessionListHeader prints the session count header for recall list.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- total: total sessions found.
- shown: filtered count (0 to omit the parenthetical).
func SessionListRow ¶
SessionListRow prints a formatted row in the session list table.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- format: printf format string for the row.
- values: column values.
func SessionMetadata ¶
func SessionMetadata(cmd *cobra.Command, info SessionInfo)
SessionMetadata prints the full session metadata block: identity, timing, and token usage sections separated by blank lines.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- info: pre-formatted session metadata.
Types ¶
type SessionInfo ¶
type SessionInfo struct {
Slug string
ID string
Tool string
Project string
Branch string // empty to omit
Model string // empty to omit
Started string
Duration string
Turns int
Messages int
TokensIn string
TokensOut string
TokensAll string
}
SessionInfo holds pre-formatted session metadata for display.