Documentation
¶
Index ¶
- Constants
- type ContextCapture
- type HookManager
- func (hm *HookManager) AddSourceLine(configPath, hookPath string) error
- func (hm *HookManager) BackupShellConfig(configPath string) (string, error)
- func (hm *HookManager) GenerateInstallInstructions(shell string) string
- func (hm *HookManager) GetHookPath(shell string) string
- func (hm *HookManager) GetShellConfigPath(shell string) (string, error)
- func (hm *HookManager) InstallHooks(shell string) error
- func (hm *HookManager) InstallHooksAutomatically(shell string, force bool) error
- func (hm *HookManager) IsAlreadyInstalled(configPath string) (bool, error)
- func (hm *HookManager) RemoveSourceLine(configPath string) error
- func (hm *HookManager) UninstallHooks(shell string) error
- type SessionManager
Constants ¶
const ( CCRMarkerStart = "# CommandChronicles Integration - START" CCRMarkerEnd = "# CommandChronicles Integration - END" )
Constants for shell config markers
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextCapture ¶
type ContextCapture struct {
// contains filtered or unexported fields
}
ContextCapture handles capturing rich context for command records
func NewContextCapture ¶
func NewContextCapture() *ContextCapture
NewContextCapture creates a new context capture instance
func (*ContextCapture) EnrichRecord ¶
func (cc *ContextCapture) EnrichRecord(record *storage.CommandRecord)
EnrichRecord enriches a command record with additional context
func (*ContextCapture) GetWorkingDirectoryInfo ¶
func (cc *ContextCapture) GetWorkingDirectoryInfo(workingDir string) map[string]interface{}
GetWorkingDirectoryInfo returns additional working directory context
type HookManager ¶
type HookManager struct {
// contains filtered or unexported fields
}
HookManager manages shell integration hooks
func NewHookManager ¶
func NewHookManager(cfg *config.Config) (*HookManager, error)
NewHookManager creates a new hook manager
func (*HookManager) AddSourceLine ¶
func (hm *HookManager) AddSourceLine(configPath, hookPath string) error
AddSourceLine safely adds a source line to the shell config file
func (*HookManager) BackupShellConfig ¶
func (hm *HookManager) BackupShellConfig(configPath string) (string, error)
BackupShellConfig creates a timestamped backup of the shell config file
func (*HookManager) GenerateInstallInstructions ¶
func (hm *HookManager) GenerateInstallInstructions(shell string) string
GenerateInstallInstructions generates installation instructions for the user
func (*HookManager) GetHookPath ¶
func (hm *HookManager) GetHookPath(shell string) string
GetHookPath returns the path to the hook file for the specified shell
func (*HookManager) GetShellConfigPath ¶
func (hm *HookManager) GetShellConfigPath(shell string) (string, error)
GetShellConfigPath detects the appropriate shell configuration file
func (*HookManager) InstallHooks ¶
func (hm *HookManager) InstallHooks(shell string) error
InstallHooks generates and installs shell hooks for the specified shell
func (*HookManager) InstallHooksAutomatically ¶
func (hm *HookManager) InstallHooksAutomatically(shell string, force bool) error
InstallHooksAutomatically performs complete automatic hook installation
func (*HookManager) IsAlreadyInstalled ¶
func (hm *HookManager) IsAlreadyInstalled(configPath string) (bool, error)
IsAlreadyInstalled checks if CommandChronicles is already integrated in the shell config
func (*HookManager) RemoveSourceLine ¶
func (hm *HookManager) RemoveSourceLine(configPath string) error
RemoveSourceLine removes CommandChronicles integration from shell config file
func (*HookManager) UninstallHooks ¶
func (hm *HookManager) UninstallHooks(shell string) error
UninstallHooks removes CommandChronicles integration from shell
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
SessionManager handles session ID generation and persistence
func NewSessionManager ¶
func NewSessionManager(cfg *config.Config) (*SessionManager, error)
NewSessionManager creates a new session manager
func (*SessionManager) EndCurrentSession ¶
func (sm *SessionManager) EndCurrentSession() error
EndCurrentSession marks the current session as ended
func (*SessionManager) GetCurrentSessionID ¶
func (sm *SessionManager) GetCurrentSessionID() (string, error)
GetCurrentSessionID returns the current session ID, creating one if needed
func (*SessionManager) GetSessionInfo ¶
func (sm *SessionManager) GetSessionInfo() map[string]interface{}
GetSessionInfo returns current session information