Versions in this module Expand all Collapse all v0 v0.4.10 Jul 30, 2026 Changes in this version + const BranchSummaryPrefix + const BranchSummarySuffix + const CompactionSummaryPrefix + const CompactionSummarySuffix + var BuiltinSlashCommands = []BuiltinSlashCommand + var DefaultActiveToolNames = []string + var ErrSessionDisposed = errors.New("codingagent: session is disposed") + func AuthGuidanceDocPaths() (providersDoc, modelsDoc string) + func BuildSystemPrompt(options SystemPromptOptions) string + func BuiltInToolPromptData(toolNames []string) (map[string]string, []string) + func ConvertToLLM(_ context.Context, messages agent.AgentMessages) (ai.MessageList, error) + func ConvertToLLMWithBlockImages(blockImages func() bool) agent.ConvertToLLMFunc + func DefaultAgentDir() string + func DefaultAvailableModel(provider string, available []ai.Model) *ai.Model + func DefaultModelIDForProvider(provider string) (string, bool) + func ExpandPromptTemplate(text string, templates []PromptTemplate) string + func ExpandSkillCommand(text string, skills []Skill) (string, error) + func FormatChangelog(content string) string + func FormatNoModelsAvailableMessage() string + func FormatSkillInvocation(skill Skill, additionalInstructions string) string + func FormatSkillsForPrompt(skills []Skill) string + func GetExtensionTempFolder(agentDir string) (string, error) + func IsUnknownModel(model *ai.Model) bool + func LoadProjectContextFiles(cwd, agentDir string) ([]ContextFile, []ResourceDiagnostic) + func MarshalSessionEvent(event any) ([]byte, error) + func OpenBrowser(target string) + func ParseCommandArgs(argsString string) []string + func PreferredAvailableModel(available []ai.Model) *ai.Model + func ResolveModelScope(patterns []string, available []ai.Model) ([]ScopedModel, []ModelDiagnostic) + func ResolveProjectTrusted(ctx context.Context, options ResolveProjectTrustedOptions) (bool, error) + func SubstituteArgs(content string, args []string) string + type AgentSession = SessionRuntime + type AgentSessionOptions struct + AgentDir string + AvailableModels func() []ai.Model + CWD string + CustomTools []extensions.ToolDefinition + DeferExtensionStart bool + ExcludeTools []string + ExtensionRegistry *extensions.Registry + GetAPIKey agent.GetAPIKeyFunc + GetModelHeaders agent.GetModelHeadersFunc + GetRequestAuth agent.GetRequestAuthFunc + Model *ai.Model + ModelRegistry *config.ModelRegistry + NoTools string + ProjectTrustContext extensions.ProjectTrustContext + ResourceLoader ResourceLoader + Resources *Resources + ScopedModels []ScopedModel + SessionManager *sessionstore.SessionManager + SessionStartEvent *extensions.SessionStartEvent + Settings *config.SettingsManager + SlashResolver *SlashResolver + StreamFn agent.StreamFn + ThinkingLevel ai.ModelThinkingLevel + ToolOptions *tools.ToolsOptions + Tools []string + type AgentSessionResult struct + Diagnostics []AgentSessionRuntimeDiagnostic + ExtensionRegistry *extensions.Registry + ModelFallbackMessage string + Services *AgentSessionServices + Session *AgentSession + func CreateAgentSessionFromServices(options CreateAgentSessionFromServicesOptions) (*AgentSessionResult, error) + func NewAgentSession(opts AgentSessionOptions) (*AgentSessionResult, error) + type AgentSessionRuntime struct + func NewAgentSessionRuntime(ctx context.Context, options AgentSessionOptions, ...) (*AgentSessionRuntime, error) + func (runtime *AgentSessionRuntime) CWD() string + func (runtime *AgentSessionRuntime) Diagnostics() []AgentSessionRuntimeDiagnostic + func (runtime *AgentSessionRuntime) Dispose(ctx context.Context) + func (runtime *AgentSessionRuntime) Fork(ctx context.Context, entryID string, options *extensions.ForkOptions) (AgentSessionRuntimeForkResult, error) + func (runtime *AgentSessionRuntime) ImportFromJSONL(ctx context.Context, inputPath string, cwdOverride string) (extensions.SessionReplacementResult, error) + func (runtime *AgentSessionRuntime) ModelFallbackMessage() string + func (runtime *AgentSessionRuntime) NewSession(ctx context.Context, options *extensions.NewSessionOptions) (extensions.SessionReplacementResult, error) + func (runtime *AgentSessionRuntime) Services() *AgentSessionServices + func (runtime *AgentSessionRuntime) Session() *AgentSession + func (runtime *AgentSessionRuntime) SetBeforeSessionInvalidate(callback func()) + func (runtime *AgentSessionRuntime) SetRebindSession(rebind func(*AgentSession) error) + func (runtime *AgentSessionRuntime) SwitchSession(ctx context.Context, path string, options *AgentSessionRuntimeSwitchOptions) (extensions.SessionReplacementResult, error) + type AgentSessionRuntimeDiagnostic struct + Message string + Type string + type AgentSessionRuntimeForkResult struct + Cancelled bool + SelectedText *string + type AgentSessionRuntimeSwitchOptions struct + CWDOverride string + ProjectTrustContextFactory func(string) extensions.ProjectTrustContext + WithSession func(context.Context, extensions.ReplacedSessionContext) error + type AgentSessionServices struct + AgentDir string + CWD string + Diagnostics []AgentSessionRuntimeDiagnostic + ExtensionRegistry *extensions.Registry + ModelRegistry *config.ModelRegistry + ResourceLoader ResourceLoader + Resources *Resources + SettingsManager *config.SettingsManager + func CreateAgentSessionServices(options CreateAgentSessionServicesOptions) (*AgentSessionServices, error) + type AgentSettledEvent struct + type AutoRetryEndEvent struct + Attempt int + FinalError *string + Success bool + type AutoRetryStartEvent struct + Attempt int + DelayMS int64 + ErrorMessage string + MaxAttempts int + type BashExecutionUpdateEvent struct + Delta string + ID *string + type BuiltinSlashCommand struct + ArgumentHint string + Description string + Name string + type CLIModelResult struct + Error string + Model *ai.Model + ThinkingLevel *ai.ModelThinkingLevel + Warning string + func ResolveCLIModel(provider, pattern string, cliThinking *ai.ModelThinkingLevel, ...) CLIModelResult + type CompactionEndEvent struct + Aborted bool + ErrorMessage *string + Reason string + Result *sessionstore.CompactionResult + WillRetry bool + type CompactionStartEvent struct + Reason string + type ConfiguredPackage struct + Filtered bool + InstalledPath string + Scope string + Source string + type ContextFile struct + Content string + Path string + type CreateAgentSessionFromServicesOptions struct + CustomTools []extensions.ToolDefinition + ExcludeTools []string + Model *ai.Model + NoTools string + ScopedModels []ScopedModel + Services *AgentSessionServices + SessionManager *sessionstore.SessionManager + SessionStartEvent *extensions.SessionStartEvent + ThinkingLevel ai.ModelThinkingLevel + ToolOptions *tools.ToolsOptions + Tools []string + type CreateAgentSessionRuntimeFactory func(context.Context, AgentSessionOptions) (*AgentSessionResult, error) + type CreateAgentSessionServicesOptions struct + AgentDir string + CWD string + ExtensionFlagValues map[string]any + ExtensionRegistry *extensions.Registry + ModelRegistry *config.ModelRegistry + ResourceLoaderOptions *DefaultResourceLoaderOptions + ResourceLoaderReloadOptions *ResourceLoaderReloadOptions + ResourceOptions *ResourceOptions + SettingsManager *config.SettingsManager + type CustomMessage = extensions.CustomMessage + type DefaultResourceLoader struct + func NewDefaultResourceLoader(options DefaultResourceLoaderOptions) (*DefaultResourceLoader, error) + func (loader *DefaultResourceLoader) ExtendResources(paths ResourceExtensionPaths) + func (loader *DefaultResourceLoader) GetAgentsFiles() ResourceAgentsFilesResult + func (loader *DefaultResourceLoader) GetAppendSystemPrompt() []string + func (loader *DefaultResourceLoader) GetAppendSystemPromptSources() []PromptSource + func (loader *DefaultResourceLoader) GetExtensions() *extensions.Registry + func (loader *DefaultResourceLoader) GetPrompts() ResourcePromptsResult + func (loader *DefaultResourceLoader) GetSkills() ResourceSkillsResult + func (loader *DefaultResourceLoader) GetSystemPrompt() *string + func (loader *DefaultResourceLoader) GetSystemPromptSource() *PromptSource + func (loader *DefaultResourceLoader) GetThemes() ResourceThemesResult + func (loader *DefaultResourceLoader) Reload(ctx context.Context, reloadOptions *ResourceLoaderReloadOptions) error + type DefaultResourceLoaderOptions struct + AdditionalPromptTemplatePaths []string + AdditionalSkillPaths []string + AdditionalThemePaths []string + AgentDir string + AgentsFilesOverride func(ResourceAgentsFilesResult) ResourceAgentsFilesResult + AppendSystemPrompt []string + AppendSystemPromptOverride func([]string) []string + CWD string + ExtensionFactories []extensions.Factory + ExtensionRegistry *extensions.Registry + NoContextFiles bool + NoExtensions bool + NoPromptTemplates bool + NoSkills bool + NoThemes bool + PackagePromptTemplatePaths []string + PackageSkillPaths []string + PackageThemePaths []ResourcePath + PromptsOverride func(ResourcePromptsResult) ResourcePromptsResult + SettingsManager *config.SettingsManager + SkillsOverride func(ResourceSkillsResult) ResourceSkillsResult + SystemPrompt *string + SystemPromptOverride func(*string) *string + ThemesOverride func(ResourceThemesResult) ResourceThemesResult + type EntryAppendedEvent struct + Entry sessionstore.SessionEntry + type FooterSnapshot struct + AutoCompactEnabled bool + ContextUsage *harness.ContextUsage + Cost float64 + Display agent.AgentDisplayState + HasLatestCacheHitRate bool + LatestCacheHitRate float64 + Tokens SessionTokenTotals + type GitSource struct + Host string + Path string + Pinned bool + Ref string + Repo string + func ParseGitURL(source string) *GitSource + type InputAction string + const InputHandled + const InputPass + const InputTransform + type InputResult struct + Action InputAction + Text string + type InteractiveModeSettings struct + AgentDir string + BlockImages bool + DefaultProjectTrust string + EnableSkillCommands bool + ExternalEditor string + GlobalThemePaths []string + HTTPIdleTimeoutMS int64 + ImageAutoResize bool + OutputPad int + ProjectThemePaths []string + ProjectTrusted bool + ShowTerminalProgress bool + ThemeSetting string + Transport ai.Transport + TreeFilterMode string + type InteractiveSettings struct + AutocompleteMaxVisible int + ClearOnShrink bool + DoubleEscapeAction string + EditorPaddingX int + FollowUpMode agent.QueueMode + HideThinkingBlock bool + ImageWidthCells int + QuietStartup bool + ShowCacheMissNotices bool + ShowHardwareCursor bool + ShowImages bool + SteeringMode agent.QueueMode + type LoadPromptTemplatesOptions struct + AgentDir string + CWD string + IncludeDefaults bool + PromptPaths []string + type LoadSkillsFromDirOptions struct + Dir string + Source string + type LoadSkillsOptions struct + AgentDir string + CWD string + IncludeDefaults bool + SkillPaths []string + type LoadSkillsResult struct + Diagnostics []ResourceDiagnostic + Skills []Skill + func LoadSkills(options LoadSkillsOptions) LoadSkillsResult + func LoadSkillsFromDir(options LoadSkillsFromDirOptions) LoadSkillsResult + type MissingSessionCWDError struct + FallbackCWD string + SessionCWD string + SessionFile string + func (failure *MissingSessionCWDError) Error() string + type MissingSourceAction string + const MissingSourceError + const MissingSourceInstall + const MissingSourceSkip + type ModelCycleResult struct + IsScoped bool + Model ai.Model + ThinkingLevel ai.ModelThinkingLevel + type ModelDiagnostic struct + Code string + Message string + Pattern string + Type string + type NavigateTreeOptions struct + CustomInstructions string + Label string + ReplaceInstructions bool + Summarize bool + type NavigateTreeResult struct + Aborted bool + Cancelled bool + EditorText string + SummaryEntry *sessionstore.SessionEntry + type PackageManager struct + func NewPackageManager(options PackageManagerOptions) *PackageManager + func (manager *PackageManager) AddSourceToSettings(source string, local bool) (bool, error) + func (manager *PackageManager) CheckForAvailableUpdates() []PackageUpdate + func (manager *PackageManager) CheckForPackageUpdates(ctx context.Context) (PackageUpdateCheck, error) + func (manager *PackageManager) GetInstalledPath(source, scope string) string + func (manager *PackageManager) Install(source string, local bool) error + func (manager *PackageManager) InstallAndPersist(source string, local bool) error + func (manager *PackageManager) ListConfiguredPackages() []ConfiguredPackage + func (manager *PackageManager) Remove(source string, local bool) error + func (manager *PackageManager) RemoveAndPersist(source string, local bool) (bool, error) + func (manager *PackageManager) RemoveSourceFromSettings(source string, local bool) (bool, error) + func (manager *PackageManager) Resolve(onMissing func(source string) (MissingSourceAction, error)) (*ResolvedPaths, error) + func (manager *PackageManager) ResolveExtensionSources(sources []string, local, temporary bool) (*ResolvedPaths, error) + func (manager *PackageManager) SetProgressCallback(callback ProgressCallback) + func (manager *PackageManager) Update(source string) error + func (manager *PackageManager) UpdateWithResults(source string) ([]PackageVersionUpdate, error) + type PackageManagerOptions struct + AgentDir string + CWD string + Settings *config.SettingsManager + type PackageUpdate struct + DisplayName string + Scope string + Source string + Type string + type PackageUpdateCheck struct + Installed int + Updates []PackageVersionUpdate + type PackageVersionUpdate struct + CurrentVersion string + LatestVersion string + type ParsedModel struct + Model *ai.Model + ThinkingLevel *ai.ModelThinkingLevel + Warning string + func ParseModelPattern(pattern string, available []ai.Model, allowInvalidFallback ...bool) ParsedModel + type ParsedSkillBlock = exporthtml.ParsedSkillBlock + func ParseSkillBlock(text string) (ParsedSkillBlock, bool) + type PathMetadata struct + BaseDir string + Origin string + Scope string + Source string + type ProgressCallback func(ProgressEvent) + type ProgressEvent struct + Action string + Message string + Source string + Type string + type PromptOptions struct + ExpandPromptTemplates *bool + Images []*ai.ImageContent + PreflightResult func(bool) + Source extensions.InputSource + StreamingBehavior extensions.DeliveryMode + type PromptSource struct + Path string + type PromptTemplate struct + ArgumentHint string + Content string + Description string + FilePath string + Name string + SourceInfo SourceInfo + func LoadPromptTemplates(options LoadPromptTemplatesOptions) []PromptTemplate + type QueueUpdateEvent struct + FollowUp []string + Steering []string + type ResolveProjectTrustedOptions struct + CWD string + DefaultProjectTrust string + HasUI bool + OnExtensionError func(message string) + Runner *extensions.Runner + SelectOption func(title string, options []string) (string, bool) + TrustContext extensions.Context + TrustOverride *bool + TrustStore *config.ProjectTrustStore + type ResolvedPaths struct + Extensions []ResolvedResource + Prompts []ResolvedResource + Skills []ResolvedResource + Themes []ResolvedResource + type ResolvedResource struct + Enabled bool + Metadata PathMetadata + Path string + type ResourceAgentsFilesResult struct + AgentsFiles []ContextFile + type ResourceCollision struct + LoserPath string + Name string + ResourceType string + WinnerPath string + type ResourceDiagnostic struct + Collision *ResourceCollision + Message string + Path string + Type string + type ResourceExtensionPaths struct + PromptPaths []ResourcePath + SkillPaths []ResourcePath + ThemePaths []ResourcePath + type ResourceLoader interface + ExtendResources func(ResourceExtensionPaths) + GetAgentsFiles func() ResourceAgentsFilesResult + GetAppendSystemPrompt func() []string + GetAppendSystemPromptSources func() []PromptSource + GetExtensions func() *extensions.Registry + GetPrompts func() ResourcePromptsResult + GetSkills func() ResourceSkillsResult + GetSystemPrompt func() *string + GetSystemPromptSource func() *PromptSource + GetThemes func() ResourceThemesResult + Reload func(context.Context, *ResourceLoaderReloadOptions) error + type ResourceLoaderReloadOptions struct + ResolveProjectTrust func(context.Context, *extensions.Registry) (bool, error) + type ResourceOptions struct + AgentDir string + AppendSystemPrompt []string + CWD string + GlobalPromptTemplatePaths []string + GlobalSkillPaths []string + NoContextFiles bool + NoPromptTemplates bool + NoSkills bool + PackagePromptTemplatePaths []string + PackageSkillPaths []string + ProjectPromptTemplatePaths []string + ProjectSkillPaths []string + ProjectTrusted *bool + PromptPathMetadata map[string]PathMetadata + PromptTemplatePaths []string + SkillPathMetadata map[string]PathMetadata + SkillPaths []string + SystemPrompt *string + type ResourcePath struct + Metadata PathMetadata + Path string + type ResourcePromptsResult struct + Diagnostics []ResourceDiagnostic + Prompts []PromptTemplate + type ResourceSkillsResult struct + Diagnostics []ResourceDiagnostic + Skills []Skill + type ResourceThemesResult struct + Diagnostics []ResourceDiagnostic + Themes []*modetheme.Theme + type Resources struct + AppendSystemPrompt []string + AppendSystemPromptSources []PromptSource + ContextFiles []ContextFile + Diagnostics []ResourceDiagnostic + PromptTemplates []PromptTemplate + Skills []Skill + SystemPrompt *string + SystemPromptSource *PromptSource + func LoadResources(options ResourceOptions) Resources + func (resources Resources) JoinedAppendSystemPrompt() *string + type ScopedModel struct + Model ai.Model + ThinkingLevel *ai.ModelThinkingLevel + type SendCustomMessageOptions = extensions.SendMessageOptions + type SendUserMessageOptions = extensions.SendUserMessageOptions + type SessionAgentEndEvent struct + Messages agent.AgentMessages + WillRetry bool + type SessionEventType string + const EventAgentSettled + const EventAutoRetryEnd + const EventAutoRetryStart + const EventBashExecutionUpdate + const EventCompactionEnd + const EventCompactionStart + const EventEntryAppended + const EventQueueUpdate + const EventSessionInfo + const EventSummarizationRetryAttemptStart + const EventSummarizationRetryFinished + const EventSummarizationRetryScheduled + const EventThinkingLevel + type SessionImportFileNotFoundError struct + FilePath string + func (failure *SessionImportFileNotFoundError) Error() string + type SessionInfoChangedEvent struct + Name *string + type SessionRuntime struct + func NewSessionRuntime(runtimeConfig SessionRuntimeConfig) (*SessionRuntime, error) + func (runtime *SessionRuntime) Abort() + func (runtime *SessionRuntime) AbortBash() + func (runtime *SessionRuntime) AbortBranchSummary() + func (runtime *SessionRuntime) AbortCompaction() + func (runtime *SessionRuntime) AbortRetry() + func (runtime *SessionRuntime) Agent() *agent.Agent + func (runtime *SessionRuntime) AutoCompactionEnabled() bool + func (runtime *SessionRuntime) AutoRetryEnabled() bool + func (runtime *SessionRuntime) AvailableModels() []ai.Model + func (runtime *SessionRuntime) AvailableThinkingLevels() []ai.ModelThinkingLevel + func (runtime *SessionRuntime) BindExtensionUI(ui extensions.UI, mode extensions.Mode) + func (runtime *SessionRuntime) BindExtensions(ctx context.Context) error + func (runtime *SessionRuntime) BindHostCommandActions(actions extensions.CommandActions) + func (runtime *SessionRuntime) ClearQueue() QueueUpdateEvent + func (runtime *SessionRuntime) Commands() []SlashCommandInfo + func (runtime *SessionRuntime) Compact(ctx context.Context, customInstructions string) (*sessionstore.CompactionResult, error) + func (runtime *SessionRuntime) Continue(ctx context.Context) error + func (runtime *SessionRuntime) CycleModel(ctx context.Context) (*ModelCycleResult, error) + func (runtime *SessionRuntime) CycleModelBackward(ctx context.Context) (*ModelCycleResult, error) + func (runtime *SessionRuntime) CycleThinkingLevel() (*ai.ModelThinkingLevel, error) + func (runtime *SessionRuntime) DequeueMessages() []string + func (runtime *SessionRuntime) Dispose() + func (runtime *SessionRuntime) EnabledModels() []string + func (runtime *SessionRuntime) ExecuteBash(ctx context.Context, command string, excludeFromContext *bool) (tools.BashResult, error) + func (runtime *SessionRuntime) ExecuteBashWithID(ctx context.Context, command string, excludeFromContext *bool, id *string) (tools.BashResult, error) + func (runtime *SessionRuntime) ExecuteUserBash(ctx context.Context, command string, excludeFromContext bool, ...) (extensions.BashResult, error) + func (runtime *SessionRuntime) ExecuteUserBashWithID(ctx context.Context, command string, excludeFromContext *bool, id *string) (tools.BashResult, error) + func (runtime *SessionRuntime) ExportHTML(outputPath string) (string, error) + func (runtime *SessionRuntime) ExportJSONL(outputPath string) (string, error) + func (runtime *SessionRuntime) ExtensionResources() extensions.DiscoveredResources + func (runtime *SessionRuntime) ExtensionRunner() *extensions.Runner + func (runtime *SessionRuntime) FollowUp(text string) error + func (runtime *SessionRuntime) FollowUpImages(text string, images []*ai.ImageContent) error + func (runtime *SessionRuntime) FollowUpMode() agent.QueueMode + func (runtime *SessionRuntime) FooterSnapshot() FooterSnapshot + func (runtime *SessionRuntime) GetActiveToolNames() []string + func (runtime *SessionRuntime) GetContextUsage() *harness.ContextUsage + func (runtime *SessionRuntime) GetLastAssistantText() *string + func (runtime *SessionRuntime) GetSessionStats() SessionStats + func (runtime *SessionRuntime) GetToolDefinition(name string) *extensions.ToolDefinition + func (runtime *SessionRuntime) GetUserMessagesForForking() []struct{ ... } + func (runtime *SessionRuntime) InteractiveModeSettings() InteractiveModeSettings + func (runtime *SessionRuntime) InteractiveSettings() InteractiveSettings + func (runtime *SessionRuntime) IsBashRunning() bool + func (runtime *SessionRuntime) IsCompacting() bool + func (runtime *SessionRuntime) IsIdle() bool + func (runtime *SessionRuntime) Manager() *sessionstore.SessionManager + func (runtime *SessionRuntime) NavigateTree(ctx context.Context, targetID string, options NavigateTreeOptions) (NavigateTreeResult, error) + func (runtime *SessionRuntime) PendingMessageCount() int + func (runtime *SessionRuntime) PendingMessages() QueueUpdateEvent + func (runtime *SessionRuntime) Prompt(ctx context.Context, input any, images ...*ai.ImageContent) error + func (runtime *SessionRuntime) PromptAfterPreflight(ctx context.Context, input any, images ...*ai.ImageContent) error + func (runtime *SessionRuntime) PromptPreflight(ctx context.Context) error + func (runtime *SessionRuntime) PromptSync(ctx context.Context, text string) error + func (runtime *SessionRuntime) PromptWithOptions(ctx context.Context, text string, options *PromptOptions) error + func (runtime *SessionRuntime) ProviderAPIKey(ctx context.Context, provider ai.ProviderID) (string, error) + func (runtime *SessionRuntime) QueueInteractive(ctx context.Context, text string, images []*ai.ImageContent, ...) error + func (runtime *SessionRuntime) RefreshCurrentModelFromRegistry(registry extensions.ModelRegistry) + func (runtime *SessionRuntime) RefreshModels() error + func (runtime *SessionRuntime) RegisteredTool(name string) agent.AgentTool + func (runtime *SessionRuntime) Reload(ctx context.Context) error + func (runtime *SessionRuntime) ResourceLoader() ResourceLoader + func (runtime *SessionRuntime) ScopedModels() []ScopedModel + func (runtime *SessionRuntime) SendCustomMessage(ctx context.Context, message CustomMessage, options *SendCustomMessageOptions) error + func (runtime *SessionRuntime) SendUserMessage(ctx context.Context, content ai.UserContent, options *SendUserMessageOptions) error + func (runtime *SessionRuntime) SetActiveToolsByName(names []string) error + func (runtime *SessionRuntime) SetAutoCompactionEnabled(enabled bool) + func (runtime *SessionRuntime) SetAutoRetryEnabled(enabled bool) + func (runtime *SessionRuntime) SetAutocompleteMaxVisible(visible int) + func (runtime *SessionRuntime) SetBlockImages(blocked bool) + func (runtime *SessionRuntime) SetClearOnShrink(enabled bool) + func (runtime *SessionRuntime) SetDefaultProjectTrust(value string) + func (runtime *SessionRuntime) SetDoubleEscapeAction(action string) + func (runtime *SessionRuntime) SetEditorPaddingX(padding int) + func (runtime *SessionRuntime) SetEnableSkillCommands(enabled bool) + func (runtime *SessionRuntime) SetEnabledModels(models []string) + func (runtime *SessionRuntime) SetExtensionShutdownHandler(handler func()) + func (runtime *SessionRuntime) SetFollowUpMode(mode agent.QueueMode) + func (runtime *SessionRuntime) SetHTTPIdleTimeoutMS(timeoutMS int64) + func (runtime *SessionRuntime) SetHideThinkingBlock(hidden bool) + func (runtime *SessionRuntime) SetImageAutoResize(enabled bool) + func (runtime *SessionRuntime) SetImageWidthCells(width int) + func (runtime *SessionRuntime) SetModel(ctx context.Context, model ai.Model) error + func (runtime *SessionRuntime) SetOutputPad(padding int) + func (runtime *SessionRuntime) SetQuietStartup(enabled bool) + func (runtime *SessionRuntime) SetScopedModels(models []ScopedModel) + func (runtime *SessionRuntime) SetSessionName(name string) error + func (runtime *SessionRuntime) SetShowCacheMissNotices(show bool) + func (runtime *SessionRuntime) SetShowHardwareCursor(enabled bool) + func (runtime *SessionRuntime) SetShowImages(show bool) + func (runtime *SessionRuntime) SetShowTerminalProgress(enabled bool) + func (runtime *SessionRuntime) SetSteeringMode(mode agent.QueueMode) + func (runtime *SessionRuntime) SetTheme(name string) error + func (runtime *SessionRuntime) SetThinkingLevel(level ai.ModelThinkingLevel) error + func (runtime *SessionRuntime) SetTransport(transport ai.Transport) + func (runtime *SessionRuntime) SetTreeFilterMode(value string) + func (runtime *SessionRuntime) ShutdownExtensions(reason extensions.SessionShutdownReason, target *string) + func (runtime *SessionRuntime) StartExtensions() + func (runtime *SessionRuntime) State() agent.AgentState + func (runtime *SessionRuntime) Steer(text string) error + func (runtime *SessionRuntime) SteerImages(text string, images []*ai.ImageContent) error + func (runtime *SessionRuntime) SteeringMode() agent.QueueMode + func (runtime *SessionRuntime) String() string + func (runtime *SessionRuntime) SubmitInteractive(ctx context.Context, text string, images []*ai.ImageContent, ...) error + func (runtime *SessionRuntime) Subscribe(listener func(any)) func() + func (runtime *SessionRuntime) SubscribeChan(bufferSize int) (<-chan any, func()) + func (runtime *SessionRuntime) SyncMessagesFromSession() + func (runtime *SessionRuntime) WaitForIdle(ctx context.Context) error + func (runtime *SessionRuntime) WarnAnthropicExtraUsage() bool + type SessionRuntimeConfig struct + Agent *agent.Agent + AllowedToolNames *[]string + AvailableModels func() []ai.Model + BaseTools []agent.AgentTool + Clock func() int64 + Complete harness.CompleteFunc + DeferExtensionStart bool + DeferSessionStart bool + ExcludedToolNames []string + ExtensionErrorHandler func(extensions.ExtensionError) + ExtensionMode extensions.Mode + ExtensionRegistry *extensions.Registry + ExtensionUI extensions.UI + GetAPIKey agent.GetAPIKeyFunc + GetModelHeaders agent.GetModelHeadersFunc + GetRequestAuth agent.GetRequestAuthFunc + InitialActiveToolNames []string + ModelRegistry extensions.ModelRegistry + RebuildBaseTools func() ([]agent.AgentTool, error) + RegisterProvider func(extensions.Provider) error + RegisterProviderConfig func(string, extensions.ProviderConfig) error + ResourceLoader ResourceLoader + ScopedModels []ScopedModel + SessionManager *sessionstore.SessionManager + SessionStart *extensions.SessionStartEvent + SessionStartEvent *extensions.SessionStartEvent + Settings *config.SettingsManager + SlashResolver *SlashResolver + Sleep func(context.Context, time.Duration) error + StreamFn agent.StreamFn + SystemPromptOptions *SystemPromptOptions + UnregisterProvider func(string) error + type SessionStats struct + AssistantMessages int + ContextUsage *harness.ContextUsage + Cost float64 + SessionFile string + SessionID string + Tokens SessionTokenTotals + ToolCalls int + ToolResults int + TotalMessages int + UserMessages int + type SessionTokenTotals struct + CacheRead int64 + CacheWrite int64 + Input int64 + Output int64 + Total int64 + type Skill struct + AllowedTools string + BaseDir string + Content string + Description string + DisableModelInvocation bool + FilePath string + Name string + SourceInfo SourceInfo + type SlashCommandInfo struct + Description string + Name string + Source SlashCommandSource + SourceInfo SourceInfo + type SlashCommandSource string + const SlashCommandExtension + const SlashCommandPrompt + const SlashCommandSkill + type SlashResolver struct + ExecuteExtension func(name, args string) (bool, error) + ExtensionCommands []SlashCommandInfo + InterceptInput func(text string) (InputResult, error) + OnError func(error) + PromptTemplates []PromptTemplate + Skills []Skill + func (resolver *SlashResolver) Commands(_ bool) []SlashCommandInfo + func (resolver *SlashResolver) Expand(text string) string + func (resolver *SlashResolver) ExpandQueued(text string) (string, error) + func (resolver *SlashResolver) ResolvePrompt(text string) (string, bool) + type SourceInfo struct + BaseDir string + Origin string + Path string + Scope string + Source string + type SummarizationRetryAttemptStartEvent struct + Reason string + Source string + type SummarizationRetryFinishedEvent struct + type SummarizationRetryScheduledEvent struct + Attempt int + DelayMS int64 + ErrorMessage string + MaxAttempts int + type SystemPromptOptions struct + AppendSystemPrompt *string + CWD string + ContextFiles []ContextFile + CustomPrompt *string + PackageDir string + PromptGuidelines []string + SelectedTools []string + Skills []Skill + ToolSnippets map[string]string + type ThinkingLevelChangedEvent struct + Level ai.ModelThinkingLevel + type UsageCostBreakdownEntry struct + Cost float64 + Key string + Tokens int64 + func GetUsageCostBreakdown(entries []sessionstore.SessionEntry) []UsageCostBreakdownEntry