checkpoint

package
v2026.602.4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bump

func Bump(s *chatstore.Session) int

func FormatCheckpointPrefix

func FormatCheckpointPrefix(cpSeq int, branch string) string

FormatCheckpointPrefix restituisce il checkpoint con due punti finali (es. "[#001]: "). Usato per la prima riga di una tool call (l'intent).

func FormatCheckpointTag

func FormatCheckpointTag(cpSeq int, branch string) string

func FormatLinePrefix

func FormatLinePrefix(cpSeq int, branch string) string

func FormatReplPromptPrefix

func FormatReplPromptPrefix(s *chatstore.Session) string

func NextForkSuffix

func NextForkSuffix(s *chatstore.Session, forkAtDisplay int) string

func SkipStagingIfRunningExecutable

func SkipStagingIfRunningExecutable(abs string) bool

func SplitAtFullID

func SplitAtFullID(msgs []chatstore.Message, id *FullCheckpointID) (keep, drop []chatstore.Message, err error)

SplitAtFullID splits messages at the first message whose CheckpointSeq and CheckpointBranchKey match the given FullCheckpointID exactly. An empty suffix matches only messages on the main branch (CheckpointBranchKey == ""). Tags printed on tool invocations (separate Bump per tool) are stored on ToolCalls; those match here via the parent assistant message index.

func SplitAtInclusiveDisplay

func SplitAtInclusiveDisplay(msgs []chatstore.Message, displayN int) (keep, drop []chatstore.Message, err error)

func StampMsg

func StampMsg(m *chatstore.Message, s *chatstore.Session, seq int)

Types

type FullCheckpointID

type FullCheckpointID struct {
	Seq    int
	Suffix string // e.g. "a", "b", "" (main branch)
	Raw    string // original user input for display
}

FullCheckpointID represents a parsed checkpoint identifier like "#006a".

func ParseFullCheckpointID

func ParseFullCheckpointID(raw string) (*FullCheckpointID, error)

ParseFullCheckpointID parses strings like "#006a", "006a", "#010", "010".

Jump to

Keyboard shortcuts

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