Documentation
¶
Index ¶
- func Bump(s *chatstore.Session) int
- func FormatCheckpointContinuationPlain(cpSeq int, branch string) string
- func FormatCheckpointPrefix(cpSeq int, branch string) string
- func FormatCheckpointTag(cpSeq int, branch string) string
- func FormatLinePrefix(cpSeq int, branch string) string
- func FormatReplPromptPrefix(s *chatstore.Session) string
- func NextForkSuffix(s *chatstore.Session, forkAtDisplay int) string
- func PruneForkChildCount(m map[int]int, from int) map[int]int
- func ResolveSessionGoto(s *chatstore.Session, id *FullCheckpointID) (messages []chatstore.Message, branches []chatstore.BranchSegment, err error)
- func SkipStagingIfRunningExecutable(abs string) bool
- func SplitAtFullID(msgs []chatstore.Message, id *FullCheckpointID) (keep, drop []chatstore.Message, err error)
- func SplitAtInclusiveDisplay(msgs []chatstore.Message, displayN int) (keep, drop []chatstore.Message, err error)
- func StampMsg(m *chatstore.Message, s *chatstore.Session, seq int)
- type FullCheckpointID
- type RewindPlan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatCheckpointContinuationPlain ¶ added in v2026.613.0
FormatCheckpointContinuationPlain returns continuation dots whose count matches FormatCheckpointTag width (including brackets), plus a trailing space.
func FormatCheckpointPrefix ¶
func FormatCheckpointTag ¶
func FormatLinePrefix ¶
func FormatReplPromptPrefix ¶
func PruneForkChildCount ¶ added in v2026.621.0
func ResolveSessionGoto ¶ added in v2026.621.0
func ResolveSessionGoto(s *chatstore.Session, id *FullCheckpointID) (messages []chatstore.Message, branches []chatstore.BranchSegment, err error)
ResolveSessionGoto computes the active transcript and stored branch segments after jumping to id. It searches both the live branch and Branches so earlier truncated checkpoints remain reachable.
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 ¶
Types ¶
type FullCheckpointID ¶
func ParseFullCheckpointID ¶
func ParseFullCheckpointID(raw string) (*FullCheckpointID, error)
type RewindPlan ¶ added in v2026.621.0
type RewindPlan struct {
Target *FullCheckpointID
Messages []chatstore.Message
Branches []chatstore.BranchSegment
DroppedMsgs int
RemovedBranches int
RemovedBranchMsgs int
}
func PlanSessionRewind ¶ added in v2026.621.0
func PlanSessionRewind(s *chatstore.Session, id *FullCheckpointID) (*RewindPlan, error)
PlanSessionRewind prepares a destructive rewind to id on the active branch only. Messages after id and every stored branch forked at id or later are dropped.