session

package
v0.0.0-...-aa55a41 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager manages ClaudeCode sessions and shell terminals.

func NewManager

func NewManager(rootPath string) *Manager

NewManager creates a new session manager.

func (*Manager) GetAllOutputCache

func (m *Manager) GetAllOutputCache() map[string]*models.SessionOutputCache

GetAllOutputCache returns all cached outputs.

func (*Manager) GetOutputCache

func (m *Manager) GetOutputCache(repoPath string) *models.SessionOutputCache

GetOutputCache returns the cached output for a repository.

func (*Manager) GetPTY

func (m *Manager) GetPTY(sessionID string) (*os.File, error)

GetPTY returns the PTY file for a session (for WebSocket terminal access).

func (*Manager) GetSessionRepoPath

func (m *Manager) GetSessionRepoPath(sessionID string) string

GetSessionRepoPath returns the repository path for a session.

func (*Manager) ListSessions

func (m *Manager) ListSessions() []*models.Session

ListSessions returns all sessions.

func (*Manager) ResumeSession

func (m *Manager) ResumeSession(repoPath string) (*models.Session, error)

ResumeSession resumes a previous ClaudeCode session using claude --resume.

func (*Manager) SetOutputCache

func (m *Manager) SetOutputCache(cache map[string]*models.SessionOutputCache)

SetOutputCache sets the entire output cache.

func (*Manager) StartSession

func (m *Manager) StartSession(repoPath, prompt string, args []string) (*models.Session, error)

StartSession starts a new ClaudeCode session in the specified repository.

func (*Manager) StartShellTerminal

func (m *Manager) StartShellTerminal(repoPath, shell string) (string, error)

StartShellTerminal starts a new shell terminal in the specified directory.

func (*Manager) TerminateSession

func (m *Manager) TerminateSession(sessionID string) error

TerminateSession terminates an active session.

func (*Manager) TerminateShellTerminal

func (m *Manager) TerminateShellTerminal(terminalID string) error

TerminateShellTerminal terminates a shell terminal.

func (*Manager) UpdateOutputCache

func (m *Manager) UpdateOutputCache(repoPath, output string)

UpdateOutputCache updates the latest output for a repository.

Jump to

Keyboard shortcuts

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