sessions

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package sessions provides interactive session picking via fzf or bubbletea.

Index

Constants

This section is empty.

Variables

View Source
var ErrCancelled = fmt.Errorf("selection cancelled")

ErrCancelled is returned when the user cancels the picker.

Functions

func FormatLine

func FormatLine(s history.Session) string

FormatLine formats a session as a single display line for the picker.

func FormatPreview

func FormatPreview(s history.Session) string

FormatPreview returns a second line with the first prompt in dim text, shown below the main FormatLine for extra context.

func ParseSelectedID

func ParseSelectedID(line string) string

ParseSelectedID extracts the session ID from a picker output line. Strips ANSI escape codes first, then takes the first whitespace-delimited field.

func PickSession

func PickSession(sessions []history.Session) (history.Session, error)

PickSession presents an interactive picker for the given sessions. Uses fzf if available, falls back to a bubbletea list. Returns the selected session or ErrCancelled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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