session

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ActiveSessionFileSuffix = ".active"

Variables

This section is empty.

Functions

func Delete

func Delete(appDir string, recordID int) error

Delete removes the specified session

func DeleteAll

func DeleteAll(appDir string) error

DeleteAll removes all stashed sessions

func Read

func Read(appDir string) ([]gemini.Transaction, error)

Read returns all messages in the active session

func Restore

func Restore(appDir string, recordID int) error

Restore sets the specified stashed session as the active session

func Stash

func Stash(appDir string) error

Stash saves the current session and starts a new one

func Write

func Write(appDir string, transaction gemini.Transaction) error

Write adds the specified entry to the active session

Types

type Entry

type Entry struct {
	Prompt   gemini.Input
	Response gemini.Output
}

type Record

type Record struct {
	ID        int
	Name      string
	Summary   string
	TimeStamp time.Time
	Active    bool
}

func List

func List(appDir string) ([]Record, error)

List returns summary and meta data for all saved sessions and the active one

Jump to

Keyboard shortcuts

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