recall

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package recall provides terminal output functions for the recall command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aborted

func Aborted(cmd *cobra.Command)

Aborted prints that an operation was aborted.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.

func AmbiguousSessionMatch

func AmbiguousSessionMatch(cmd *cobra.Command, query string, lines []string)

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

func AmbiguousSessionMatchWithHint(cmd *cobra.Command, query string, lines []string, hint string)

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

func BlankLine(cmd *cobra.Command)

BlankLine prints an empty line to stdout.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.

func CodeBlock

func CodeBlock(cmd *cobra.Command, content string)

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

func ConfirmPrompt(cmd *cobra.Command)

ConfirmPrompt prints the y/N confirmation prompt.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.

func ConversationTurn

func ConversationTurn(cmd *cobra.Command, index int, role, timestamp string)

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

func ExportFinalSummary(cmd *cobra.Command, exported, updated, renamed, skipped int)

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

func ExportedFile(cmd *cobra.Command, filename, suffix string)

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

func Hint(cmd *cobra.Command, text string)

Hint prints a usage hint to stdout.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • text: the hint text.

func JournalSyncLocked

func JournalSyncLocked(cmd *cobra.Command, filename string)

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

func JournalSyncNone(cmd *cobra.Command)

JournalSyncNone prints the message when no journal entries are found.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.

func JournalSyncSummary

func JournalSyncSummary(cmd *cobra.Command, locked, unlocked int)

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

func JournalSyncUnlocked(cmd *cobra.Command, filename string)

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

func ListItem(cmd *cobra.Command, format string, args ...any)

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

func LockUnlockEntry(cmd *cobra.Command, filename, verb string)

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

func LockUnlockNone(cmd *cobra.Command)

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

func LockUnlockSummary(cmd *cobra.Command, verb string, count int)

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

func MoreTurns(cmd *cobra.Command, remaining int)

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

func NoFiltersMatch(cmd *cobra.Command)

NoFiltersMatch prints that no sessions matched the applied filters.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.

func NoSessionsForProject

func NoSessionsForProject(cmd *cobra.Command, allProjects bool)

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

func NoSessionsWithHint(cmd *cobra.Command, allProjects bool)

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

func NumberedItem(cmd *cobra.Command, n int, item string)

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

func SectionHeader(cmd *cobra.Command, level int, title string)

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

func SessionDetail(cmd *cobra.Command, label, value string)

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

func SessionDetailInt(cmd *cobra.Command, label string, value int)

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

func SessionListFooter(cmd *cobra.Command, hasMore bool)

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

func SessionListHeader(cmd *cobra.Command, total, shown int)

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

func SessionListRow(cmd *cobra.Command, format string, values ...any)

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.

func SkipFile

func SkipFile(cmd *cobra.Command, filename, reason string)

SkipFile prints that a file was skipped during export.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • filename: the skipped file name.
  • reason: why it was skipped (e.g. "locked", "exists").

func TextBlock

func TextBlock(cmd *cobra.Command, text string)

TextBlock prints a text block followed by a blank line.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • text: the text content to print.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL