checkpoint

package
v0.20260525.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 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 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 == "").

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