claude

package
v0.0.0-...-8e51be1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaudeDir

func ClaudeDir() string

func EmptyTrash

func EmptyTrash() error

func EnsureTrashDir

func EnsureTrashDir() error

func MoveToTrash

func MoveToTrash(session *Session) error

func PermanentlyDelete

func PermanentlyDelete(session *Session) error

func ProjectDir

func ProjectDir(session *Session) string

func ProjectsDir

func ProjectsDir() string

func ReassignProjectPath

func ReassignProjectPath(oldPath, newPath string) (int, error)

func ReassignSessionPath

func ReassignSessionPath(session *Session, newPath string) error

func RenameSession

func RenameSession(session *Session, newSummary string) error

func RestoreFromTrash

func RestoreFromTrash(session *Session) error

func SearchPreview

func SearchPreview(preview *PreviewContent, query string) []int

func TrashDir

func TrashDir() string

Types

type AssistantMessage

type AssistantMessage struct {
	Role    string         `json:"role"`
	Content []ContentBlock `json:"content"`
}

type ContentBlock

type ContentBlock struct {
	Type     string `json:"type"`
	Text     string `json:"text,omitempty"`
	Thinking string `json:"thinking,omitempty"`
	Name     string `json:"name,omitempty"`
	Input    any    `json:"input,omitempty"`
}

type PreviewContent

type PreviewContent struct {
	Messages []PreviewMessage
	Error    string
}

func LoadSessionPreview

func LoadSessionPreview(session *Session, maxMessages int) PreviewContent

type PreviewMessage

type PreviewMessage struct {
	Role    string
	Content string
}

type RawMessage

type RawMessage struct {
	Type    string          `json:"type"`
	Message json.RawMessage `json:"message"`
}

type SearchResult

type SearchResult struct {
	Session       *Session
	MessageIndex  int
	Role          string
	Content       string
	MatchPosition int
}

func SearchAllSessions

func SearchAllSessions(sessions []Session, query string) []SearchResult

type Session

type Session struct {
	SessionID    string    `json:"sessionId"`
	FullPath     string    `json:"fullPath"`
	FirstPrompt  string    `json:"firstPrompt"`
	Summary      string    `json:"summary"`
	MessageCount int       `json:"messageCount"`
	Created      time.Time `json:"created"`
	Modified     time.Time `json:"modified"`
	GitBranch    string    `json:"gitBranch"`
	ProjectPath  string    `json:"projectPath"`
	IsSidechain  bool      `json:"isSidechain"`
	ProjectName  string    `json:"-"`
	InTrash      bool      `json:"-"`
}

func LoadAllSessions

func LoadAllSessions() ([]Session, error)

type SessionIndex

type SessionIndex struct {
	Version      int       `json:"version"`
	Entries      []Session `json:"entries"`
	OriginalPath string    `json:"originalPath"`
}

type UserMessage

type UserMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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