Documentation
¶
Index ¶
- Constants
- Variables
- func AnsiLinesToHTML(lines []string) string
- func AttachJSONLLineReader(reader io.Reader, onLine func(string)) error
- func BuildSDKStreamHeaders(model llm.Model, installTelemetryEnabled bool, ...) map[string]string
- func BuildSystemPrompt(options BuildSystemPromptOptions) string
- func CanonicalizePath(path string) string
- func CheckForNewGiVersion(currentVersion string, options VersionCheckOptions) (string, bool)
- func CheckForNewPiVersion(currentVersion string, options VersionCheckOptions) (string, bool)
- func CheckTmuxKeyboardSetup(ctx context.Context, reader TmuxOptionReader) string
- func CleanPlanStepText(text string) string
- func ClearAPIKeyCache()
- func ClearConfigValueCache()
- func CloseWatcher(watcher FSWatcher)
- func ComparePackageVersions(leftVersion, rightVersion string) (int, bool)
- func CopyToClipboard(text string, options ClipboardCopyOptions) error
- func CreateAgentSessionRuntime(factory CreateAgentSessionRuntimeFactory, options AgentSessionRuntimeOptions) (any, error)
- func DefaultAgentSessionBranchSummarizer(entries []FileEntry, customInstructions string, abort <-chan struct{}) (string, error)
- func DefaultAgentSessionCompactionSummarizer(preparation agentharness.CompactionPreparation, customInstructions string) (agentharness.CompactionResult, error)
- func DefaultAgentSessionResponder(prompt string, context []llm.Message, model llm.Model) (llm.Message, error)
- func DefaultClipboardPasteImageKey() string
- func DefaultSessionExportHTMLName(inputPath string) string
- func DefaultTmuxOptionReader(ctx context.Context, option string) (string, bool)
- func ExpandPath(path string) string
- func ExpandPromptTemplate(text string, templates []PromptTemplate) string
- func ExpandTildePath(path string) string
- func ExportHTMLTemplateCSSWithOptions(options ExportHTMLOptions) string
- func ExportSessionFileToHTML(inputPath, outputPath string) (string, error)
- func ExportSessionFileToHTMLWithOptions(inputPath, outputPath string, options ExportHTMLOptions) (string, error)
- func ExtensionForImageMIMEType(mimeType string) string
- func ExtractDoneSteps(message string) []int
- func FindExactModelReferenceMatch(modelReference string, availableModels []llm.Model) *llm.Model
- func FindMostRecentSession(sessionDir string) string
- func FormatDimensionNote(result ResizedImage) string
- func GetAgentDir(cwd ...string) string
- func GetAgentDirSessionDir(cwd, agentDir string) string
- func GetAttributionHeaders(model llm.Model, installTelemetryEnabled bool) map[string]string
- func GetAuthPath(agentDir ...string) string
- func GetBinDir(agentDir ...string) string
- func GetBundledInteractiveAssetPath(name string, envs ...InstallEnvironment) string
- func GetChangelogPath(envs ...InstallEnvironment) string
- func GetCustomThemesDir(agentDir ...string) string
- func GetCwdRelativePath(path, cwd string) (string, bool)
- func GetDebugLogPath(agentDir ...string) string
- func GetDefaultSessionDir(cwd string) (string, error)
- func GetDocsPath(envs ...InstallEnvironment) string
- func GetExamplesPath(envs ...InstallEnvironment) string
- func GetExportTemplateDir(envs ...InstallEnvironment) string
- func GetGiUserAgent(version string) string
- func GetInteractiveAssetsDir(envs ...InstallEnvironment) string
- func GetLatestGiVersion(currentVersion string, options VersionCheckOptions) (string, bool)
- func GetLatestPiVersion(currentVersion string, options VersionCheckOptions) (string, bool)
- func GetModelsPath(agentDir ...string) string
- func GetPackageDir(envs ...InstallEnvironment) string
- func GetPackageJSONPath(envs ...InstallEnvironment) string
- func GetPackageJsonPath(envs ...InstallEnvironment) string
- func GetPathCommandArgument(text, command string) (string, bool)
- func GetPiUserAgent(version string) string
- func GetPromptsDir(agentDir ...string) string
- func GetReadmePath(envs ...InstallEnvironment) string
- func GetResolvedThemeCSSColors(themeName, agentDir string) (map[string]string, error)
- func GetSelfUpdateUnavailableInstruction(packageName string, env InstallEnvironment, _ []string, ...) string
- func GetSessionsDir(agentDir ...string) string
- func GetSettingsPath(agentDir ...string) string
- func GetShareViewerURL(gistID string) string
- func GetThemesDir(envs ...InstallEnvironment) string
- func GetToolsDir(agentDir ...string) string
- func GetUpdateInstruction(packageName string, env InstallEnvironment) string
- func HasSessionName(session SessionInfo) bool
- func Highlight(code string, options HighlightOptions) string
- func IsAPIKeyLoginProvider(providerID string, oauthProviderIDs, builtInProviderIDs map[string]bool) bool
- func IsAliasModelID(id string) bool
- func IsAnthropicSubscriptionAuthKey(apiKey string) bool
- func IsInstallTelemetryEnabled(settingsManager *SettingsManager) bool
- func IsLocalPath(value string) bool
- func IsNewerPackageVersion(candidateVersion, currentVersion string) bool
- func IsSafePlanCommand(command string) bool
- func IsValidThinkingLevel(level string) bool
- func IsWaylandSession(env map[string]string) bool
- func LoadProtocolExtensionDescriptors(sources []ProtocolExtensionSource, runtime *ProtocolExtensionRuntime) protocolExtensionDescriptorLoadResult
- func MarkCompletedPlanSteps(message string, items []PlanTodoItem) int
- func MigrateKeybindingsConfig(rawConfig map[string]any) (map[string]any, bool)
- func MigrateSessionEntries(entries []FileEntry) bool
- func OfficialPackageNames() []string
- func PackageSourceIdentity(source PackageSource) string
- func ParseCommandArgs(argsString string) []string
- func PreRenderExportHTMLCustomTools(entries []FileEntry, renderer ExportHTMLToolRenderer) map[string]ExportHTMLRenderedTool
- func PrepareEditToolArguments(args any) any
- func PrepareReadToolArguments(args any) any
- func PrepareWriteToolArguments(args any) any
- func RegisterOAuthProvider(provider OAuthProvider)
- func RenderCustomToolResultHTML(lines []string) string
- func RenderDiff(diffText string) string
- func RenderExportHTMLHeaderModels(models []string) string
- func RenderExportHTMLInlineImage(mimeType, data string) string
- func RenderExportHTMLMarkdownImage(src, alt string) string
- func RenderExportHTMLMarkdownLink(href, text string) string
- func RenderExportHTMLSessionEntryAttrs(entryID string) string
- func RenderExportHTMLTreeMetadata(values map[string]string) string
- func RenderExportHTMLUserMessage(text string) string
- func RenderHighlightedHTML(input string, theme HighlightTheme) string
- func RenderSessionManagerHTML(sessionManager *SessionManager) string
- func RenderSessionManagerHTMLWithOptions(sessionManager *SessionManager, options ExportHTMLOptions) string
- func RenderViewTree(view ViewTreeNode, width int) []string
- func ResetOAuthProviders()
- func ResolveConfigValue(config string) (string, bool)
- func ResolveConfigValueUncached(config string) (string, bool)
- func ResolveReadPath(path, cwd string) (string, error)
- func ResolveToCwd(path, cwd string) string
- func RestoreProcessSandboxEnv(isBun bool) bool
- func RestoreSandboxEnv(isBun bool, env map[string]string, readEnviron SandboxEnvReader) bool
- func RunCLI(options CLIOptions) int
- func RunMigrations(agentDir string, cwd ...string) error
- func RunPrintMode(host PrintModeRuntimeHost, options PrintModeOptions) (exitCode int)
- func SerializeJSONLine(record any) (string, error)
- func StripAnsi(value string) string
- func StripFrontmatter(content string) string
- func SubstituteArgs(content string, args []string) string
- func SupportsLanguage(language string) bool
- func TUIThemeSchemaJSON() []byte
- func UnregisterOAuthProvider(providerID string)
- func ValidateViewTreeNode(node ViewTreeNode) error
- func WithFileMutationQueue(filePath string, fn func() error) error
- func WriteCLIUsage(writer io.Writer, extensionFlags ...ProtocolFlagRegistration)
- func WriteListModels(stdout, stderr io.Writer, registry *ModelRegistry, searchPattern string) error
- type AgentContextUsage
- type AgentSession
- func (s *AgentSession) Abort() error
- func (s *AgentSession) AbortBash()
- func (s *AgentSession) AbortBranchSummary()
- func (s *AgentSession) AbortCompaction()
- func (s *AgentSession) AbortRetry()
- func (s *AgentSession) CheckCompaction(assistantMessage llm.Message, skipAbortedCheck ...bool) error
- func (s *AgentSession) ClearQueue() (steering, followUp []string)
- func (s *AgentSession) Compact(customInstructions ...string) (agentharness.CompactionResult, error)
- func (s *AgentSession) Dispose()
- func (s *AgentSession) ExecuteBash(command string, options ...AgentSessionBashOptions) (BashResult, error)
- func (s *AgentSession) FollowUp(text string) error
- func (s *AgentSession) FollowUpWithImages(text string, images []llm.ContentPart) error
- func (s *AgentSession) Fork(entryID string) (AgentSessionForkResult, error)
- func (s *AgentSession) ForkAt(entryID string) (AgentSessionForkResult, error)
- func (s *AgentSession) GetActiveLLMTools() []llm.Tool
- func (s *AgentSession) GetActiveToolNames() []string
- func (s *AgentSession) GetActiveTools() []SDKTool
- func (s *AgentSession) GetAllTools() []SDKTool
- func (s *AgentSession) GetContextUsage() *AgentContextUsage
- func (s *AgentSession) GetFollowUpMessages() []string
- func (s *AgentSession) GetFollowUpQueue() []QueuedUserMessage
- func (s *AgentSession) GetSessionStats() AgentSessionStats
- func (s *AgentSession) GetSteeringMessages() []string
- func (s *AgentSession) GetSteeringQueue() []QueuedUserMessage
- func (s *AgentSession) GetUserMessagesForForking() []AgentSessionForkMessage
- func (s *AgentSession) HasAgentQueuedMessages() bool
- func (s *AgentSession) HasPendingBashMessages() bool
- func (s *AgentSession) IsBashRunning() bool
- func (s *AgentSession) IsBranchSummaryRunning() bool
- func (s *AgentSession) IsCompacting() bool
- func (s *AgentSession) IsRetrying() bool
- func (s *AgentSession) IsStreaming() bool
- func (s *AgentSession) Messages() []llm.Message
- func (s *AgentSession) NavigateTree(targetID string, options AgentSessionNavigateTreeOptions) (AgentSessionNavigateTreeResult, error)
- func (s *AgentSession) PendingMessageCount() int
- func (s *AgentSession) Prompt(text string) error
- func (s *AgentSession) PromptWithImages(text string, images []llm.ContentPart) error
- func (s *AgentSession) QueueAgentMessage(message llm.Message)
- func (s *AgentSession) QueueExtensionUserMessage(text, deliverAs string) error
- func (s *AgentSession) RecordBashResult(command string, result BashResult, options ...AgentSessionBashRecordOptions)
- func (s *AgentSession) RefreshSystemPrompt()
- func (s *AgentSession) RunAutoCompaction(reason string, willRetry bool) error
- func (s *AgentSession) SendCustomMessage(message QueuedCustomMessage, options ProtocolSendCustomMessageOptions) error
- func (s *AgentSession) SetScopedModels(scopedModels []ScopedModel)
- func (s *AgentSession) SetSessionName(name string) error
- func (s *AgentSession) Steer(text string) error
- func (s *AgentSession) SteerWithImages(text string, images []llm.ContentPart) error
- func (s *AgentSession) Subscribe(listener AgentSessionEventListener) func()
- type AgentSessionAutoCompactionRunner
- type AgentSessionBashOptions
- type AgentSessionBashRecordOptions
- type AgentSessionBranchSummarizer
- type AgentSessionCompactionSummarizer
- type AgentSessionContextResourceLoader
- type AgentSessionEvent
- type AgentSessionEventListener
- type AgentSessionForkMessage
- type AgentSessionForkResult
- type AgentSessionNavigateTreeOptions
- type AgentSessionNavigateTreeResult
- type AgentSessionOptions
- type AgentSessionPreflight
- type AgentSessionPromptResourceLoader
- type AgentSessionResourceLoader
- type AgentSessionResponder
- type AgentSessionRetrySettings
- type AgentSessionRuntimeEventListener
- type AgentSessionRuntimeForkOptions
- type AgentSessionRuntimeHost
- func (h *AgentSessionRuntimeHost) Fork(entryID string, options ...AgentSessionRuntimeForkOptions) (AgentSessionForkResult, error)
- func (h *AgentSessionRuntimeHost) NewSession(options ...ProtocolNewSessionOptions) (AgentSessionRuntimeSwitchResult, error)
- func (h *AgentSessionRuntimeHost) OnSessionEvent(listener AgentSessionRuntimeEventListener) func()
- func (h *AgentSessionRuntimeHost) Reload() error
- func (h *AgentSessionRuntimeHost) SetBeforeSessionInvalidate(callback func())
- func (h *AgentSessionRuntimeHost) SetExtensionRuntime(extensionRuntime *ProtocolExtensionRuntime)
- func (h *AgentSessionRuntimeHost) SetRebindSession(callback func(*AgentSession) error)
- func (h *AgentSessionRuntimeHost) SwitchSession(sessionFile string, options ...ProtocolSwitchSessionOptions) (AgentSessionRuntimeSwitchResult, error)
- type AgentSessionRuntimeOptions
- type AgentSessionRuntimeSwitchResult
- type AgentSessionSkillsResult
- type AgentSessionStats
- type AgentSessionStreamResponder
- type AgentSessionSystemPromptResourceLoader
- type AllModelRegistry
- type AnthropicSubscriptionWarningChecker
- type AnthropicWarningSettings
- type Args
- type AssistantContentBlock
- type AssistantMessageComponent
- type AuthCredential
- type AuthSelectorProvider
- type AuthStatus
- type AuthStatusResolver
- type AuthStorage
- func (s *AuthStorage) DrainErrors() []error
- func (s *AuthStorage) Get(provider string) (AuthCredential, bool)
- func (s *AuthStorage) GetAPIKey(provider string) (string, bool)
- func (s *AuthStorage) GetAPIKeyWithOptions(provider string, options AuthStorageOptions) (string, bool)
- func (s *AuthStorage) GetAll() AuthStorageData
- func (s *AuthStorage) GetAuthStatus(provider string) AuthStatus
- func (s *AuthStorage) Has(provider string) bool
- func (s *AuthStorage) HasAuth(provider string) bool
- func (s *AuthStorage) List() []string
- func (s *AuthStorage) Reload()
- func (s *AuthStorage) Remove(provider string)
- func (s *AuthStorage) RemoveRuntimeAPIKey(provider string)
- func (s *AuthStorage) Set(provider string, credential AuthCredential)
- func (s *AuthStorage) SetFallbackResolver(resolver func(provider string) string)
- func (s *AuthStorage) SetRuntimeAPIKey(provider, apiKey string)
- type AuthStorageBackend
- type AuthStorageData
- type AuthStorageLockFunc
- type AuthStorageOptions
- type AutocompleteEditor
- type AutocompleteProvider
- type AutocompleteProviderFactory
- type BashExecOptions
- type BashExecutionCompleteOptions
- type BashExecutionComponent
- func (b *BashExecutionComponent) AppendOutput(chunk string)
- func (b *BashExecutionComponent) GetCommand() string
- func (b *BashExecutionComponent) GetOutput() string
- func (b *BashExecutionComponent) Invalidate()
- func (b *BashExecutionComponent) Output() string
- func (b *BashExecutionComponent) Render(width int) []string
- func (b *BashExecutionComponent) SetComplete(exitCode int, cancelled bool, options ...BashExecutionCompleteOptions)
- func (b *BashExecutionComponent) SetExpanded(expanded bool)
- type BashExecutionOptions
- type BashExecutorOptions
- type BashLocalOperationsOptions
- type BashOperationResult
- type BashOperations
- type BashResult
- type BashTool
- type BashToolInput
- type BashToolOptions
- type BorderedLoaderComponent
- func (c *BorderedLoaderComponent) Aborted() bool
- func (c *BorderedLoaderComponent) Cancelled() bool
- func (c *BorderedLoaderComponent) Context() context.Context
- func (c *BorderedLoaderComponent) Dispose()
- func (c *BorderedLoaderComponent) HandleInput(data string)
- func (c *BorderedLoaderComponent) Invalidate()
- func (c *BorderedLoaderComponent) Render(width int) []string
- func (c *BorderedLoaderComponent) SetOnAbort(fn func())
- func (c *BorderedLoaderComponent) Signal() context.Context
- type BorderedLoaderOptions
- type BuildSystemPromptOptions
- type CLIConfigRuntimeHost
- type CLIInteractiveRuntimeHost
- type CLIInteractiveTUIHost
- func (h *CLIInteractiveTUIHost) AvailableTUIThemes() []TUIThemeInfo
- func (h *CLIInteractiveTUIHost) CurrentTUITheme() string
- func (h *CLIInteractiveTUIHost) EditorCursor() (line, col int, ok bool)
- func (h *CLIInteractiveTUIHost) EditorCustomActive() bool
- func (h *CLIInteractiveTUIHost) EditorFocused() bool
- func (h *CLIInteractiveTUIHost) FocusEditor() error
- func (h *CLIInteractiveTUIHost) InsertEditorText(text string)
- func (h *CLIInteractiveTUIHost) PasteEditorText(text string)
- func (h *CLIInteractiveTUIHost) ReadEditorText() string
- func (h *CLIInteractiveTUIHost) Run() error
- func (h *CLIInteractiveTUIHost) RunContext(ctx context.Context) (runErr error)
- func (h *CLIInteractiveTUIHost) RunTUIDialog(request TUIDialogRequest) (TUIDialogResult, error)
- func (h *CLIInteractiveTUIHost) SetEditorText(text string)
- func (h *CLIInteractiveTUIHost) SetHiddenThinkingLabel(label string) error
- func (h *CLIInteractiveTUIHost) SetTUIStatus(key, text string) error
- func (h *CLIInteractiveTUIHost) SetTUITheme(name string) error
- func (h *CLIInteractiveTUIHost) SetTUITitle(title string) error
- func (h *CLIInteractiveTUIHost) SetTUIToolsExpanded(expanded bool) error
- func (h *CLIInteractiveTUIHost) SetTUIWorking(update TUIWorkingUpdate) error
- func (h *CLIInteractiveTUIHost) Stop()
- func (h *CLIInteractiveTUIHost) SubmitEditorText() error
- func (h *CLIInteractiveTUIHost) TUIToolsExpanded() bool
- type CLIInteractiveTUIHostOptions
- type CLIOptions
- type CLIStartupMigrationResult
- type ClipboardCopyOperations
- type ClipboardCopyOptions
- type ClipboardImage
- type ClipboardImageCommandOptions
- type ClipboardImageCommandResult
- type ClipboardImageOperations
- type ClipboardImageOptions
- type ClipboardTextCommandOptions
- type CodingAgentFauxState
- type CodingAgentTestHarness
- type CodingAgentTestHarnessModelOverride
- type CodingAgentTestHarnessOptions
- type CodingAgentTestHarnessResponse
- type CodingAgentTestHarnessToolCall
- type CodingModelRegistry
- type ConfiguredPackage
- type ConvertedImage
- type CreateAgentSessionRuntimeFactory
- type DefaultAgentSessionResourceLoader
- func (l *DefaultAgentSessionResourceLoader) GetAgentsFiles() ResourceAgentsFilesResult
- func (l *DefaultAgentSessionResourceLoader) GetAppendSystemPrompt() string
- func (l *DefaultAgentSessionResourceLoader) GetPrompts() ResourcePromptsResult
- func (l *DefaultAgentSessionResourceLoader) GetSkills() AgentSessionSkillsResult
- func (l *DefaultAgentSessionResourceLoader) GetSystemPrompt() string
- type DefaultPackageManager
- func (m *DefaultPackageManager) CheckForAvailableUpdates() ([]PackageUpdate, error)
- func (m *DefaultPackageManager) GetInstalledPath(source, scope string) string
- func (m *DefaultPackageManager) GetPackageIdentity(source string) string
- func (m *DefaultPackageManager) Install(source string, project bool) error
- func (m *DefaultPackageManager) ListConfiguredPackages() []ConfiguredPackage
- func (m *DefaultPackageManager) ListPackageResourceToggles() ([]PackageResourceToggleItem, error)
- func (m *DefaultPackageManager) ListResourceToggles() ([]PackageResourceToggleItem, error)
- func (m *DefaultPackageManager) ListTopLevelResourceToggles() []PackageResourceToggleItem
- func (m *DefaultPackageManager) ParseSource(source string) PackageSource
- func (m *DefaultPackageManager) Remove(source string, project bool) error
- func (m *DefaultPackageManager) RemoveAndPersist(source string, project bool) (bool, error)
- func (m *DefaultPackageManager) ResolveConfiguredProtocolPackageResources() (ProtocolPackageResources, error)
- func (m *DefaultPackageManager) ResolveExtensionSources(sources []string, options ResolveExtensionSourcesOptions) ([]string, error)
- func (m *DefaultPackageManager) ResolveProtocolPackageResources(sources []string) (ProtocolPackageResources, error)
- func (m *DefaultPackageManager) ResolveProtocolPackageSourceSpecs(specs []ProtocolPackageSourceSpec) (ProtocolPackageResources, error)
- func (m *DefaultPackageManager) RunSelfUpdate(options SelfUpdateOptions) (SelfUpdateResult, error)
- func (m *DefaultPackageManager) SetPackageResourceEnabled(toggle PackageResourceToggle) (bool, error)
- func (m *DefaultPackageManager) SetProgressCallback(callback func(PackageProgressEvent))
- func (m *DefaultPackageManager) SetTopLevelResourceEnabled(toggle TopLevelResourceToggle) (bool, error)
- func (m *DefaultPackageManager) Update(sources ...string) error
- type DefaultResourceLoader
- func (l *DefaultResourceLoader) ApplyExtensionFlagValues(values map[string]any, allowDeferred bool) []ProtocolExtensionDiscoveryError
- func (l *DefaultResourceLoader) ExtendResources(resources ResourceExtension)
- func (l *DefaultResourceLoader) GetAgentsFiles() ResourceAgentsFilesResult
- func (l *DefaultResourceLoader) GetAppendSystemPrompt() string
- func (l *DefaultResourceLoader) GetExtensions() ResourceExtensionsResult
- func (l *DefaultResourceLoader) GetPrompts() ResourcePromptsResult
- func (l *DefaultResourceLoader) GetSkills() ResourceSkillsResult
- func (l *DefaultResourceLoader) GetSystemPrompt() string
- func (l *DefaultResourceLoader) GetThemes() ResourceThemesResult
- func (l *DefaultResourceLoader) Reload()
- type DefaultResourceLoaderOptions
- type Diagnostic
- type Edit
- type EditDiffResult
- type EditTool
- type EditToolInput
- type ExportHTMLOptions
- type ExportHTMLRenderedTool
- type ExportHTMLSessionData
- type ExportHTMLSidebarEntry
- type ExportHTMLSkillBlock
- type ExportHTMLToolDefinition
- type ExportHTMLToolRenderResult
- type ExportHTMLToolRenderer
- type ExportHTMLToolRendererDeps
- type ExtensionSelectorComponent
- func (c *ExtensionSelectorComponent) Focused() bool
- func (c *ExtensionSelectorComponent) HandleInput(input string)
- func (c *ExtensionSelectorComponent) Invalidate()
- func (c *ExtensionSelectorComponent) Render(width int) []string
- func (c *ExtensionSelectorComponent) SetFocused(focused bool)
- func (c *ExtensionSelectorComponent) SetTitle(title string)
- func (c *ExtensionSelectorComponent) Title() string
- type FSWatchListener
- type FSWatchOptions
- type FSWatcher
- type FileAuthStorageBackend
- type FileEntry
- type FileToolDetails
- type FileToolOperations
- type FileToolResult
- type FindInitialModelOptions
- type FindTool
- type FindToolInput
- type FooterComponent
- type FooterDataProvider
- func (p *FooterDataProvider) ClearExtensionStatuses()
- func (p *FooterDataProvider) Dispose()
- func (p *FooterDataProvider) GetAvailableProviderCount() int
- func (p *FooterDataProvider) GetExtensionStatuses() map[string]string
- func (p *FooterDataProvider) GetGitBranch() string
- func (p *FooterDataProvider) OnBranchChange(callback func()) func()
- func (p *FooterDataProvider) SetAvailableProviderCount(count int)
- func (p *FooterDataProvider) SetCwd(cwd string)
- func (p *FooterDataProvider) SetExtensionStatus(key string, text *string)
- type FooterDataProviderOptions
- type FooterGitBranchResolver
- type FooterState
- type FooterUsage
- type FrontmatterResult
- type GitSource
- type GrepTool
- type GrepToolInput
- type HighlightOptions
- type HighlightTheme
- type HostActionError
- type HostActionRequest
- type HostActionResponse
- type HostPolicyDecision
- type HostPolicyRequest
- type HostPolicyRequester
- type HostPolicyRequesterFunc
- type HostProcessExecutor
- type HostProcessExecutorWithOptions
- type HostProcessOptions
- type HostProcessResult
- type ImageResizeOptions
- type InMemoryAuthStorageBackend
- type InProcessComponentContext
- type InProcessComponentFactory
- type InProcessCustomComponentFactory
- type InProcessCustomDone
- type InProcessCustomHandle
- type InProcessCustomOptions
- type InProcessCustomResult
- type InProcessSlotRegistration
- type InProcessUIRegistry
- func (r *InProcessUIRegistry) OnChange(listener func()) func()
- func (r *InProcessUIRegistry) Remove(key string) bool
- func (r *InProcessUIRegistry) SetEditor(key string, factory InProcessComponentFactory)
- func (r *InProcessUIRegistry) SetFooter(key string, factory InProcessComponentFactory)
- func (r *InProcessUIRegistry) SetHeader(key string, factory InProcessComponentFactory)
- func (r *InProcessUIRegistry) SetOverlay(key string, factory InProcessComponentFactory, options ...gitui.OverlayOptions)
- func (r *InProcessUIRegistry) SetSlot(key, slot string, factory InProcessComponentFactory)
- func (r *InProcessUIRegistry) SetWidget(key, slot string, factory InProcessComponentFactory)
- func (r *InProcessUIRegistry) ShowCustom(key string, factory InProcessCustomComponentFactory, ...) (*InProcessCustomHandle, error)
- func (r *InProcessUIRegistry) Slots() []InProcessSlotRegistration
- type InitialMessageInput
- type InitialMessageResult
- type InitialModelResult
- type InstallEnvironment
- type InstallMethod
- type InteractiveContainer
- type InteractiveContextFile
- type InteractiveDefaultEditor
- type InteractiveEditor
- type InteractiveExpandable
- type InteractiveExtensionResource
- type InteractiveExtensionUIContext
- func (c InteractiveExtensionUIContext) AddAutocompleteProvider(wrapper AutocompleteProviderFactory)
- func (c InteractiveExtensionUIContext) GetToolsExpanded() bool
- func (c InteractiveExtensionUIContext) SetTheme(theme string) InteractiveThemeResult
- func (c InteractiveExtensionUIContext) SetToolsExpanded(expanded bool)
- type InteractiveFlushCompactionOptions
- type InteractiveFooter
- type InteractiveForkOptions
- type InteractiveForkResult
- type InteractiveImportResult
- type InteractiveIndexedTextContainer
- type InteractiveLoadedResources
- type InteractiveMessage
- type InteractiveMode
- func (m *InteractiveMode) CreateExtensionUIContext() InteractiveExtensionUIContext
- func (m *InteractiveMode) FormatLoadedResources(options InteractiveShowLoadedResourcesOptions) string
- func (m *InteractiveMode) GetPathCommandArgument(text, command string) (string, bool)
- func (m *InteractiveMode) HandleCloneCommand() error
- func (m *InteractiveMode) HandleCtrlZ() error
- func (m *InteractiveMode) HandleEvent(event AgentSessionEvent) error
- func (m *InteractiveMode) HandleImportCommand(text string) error
- func (m *InteractiveMode) RenderSessionContext(context SessionContext)
- func (m *InteractiveMode) SetToolsExpanded(expanded bool)
- func (m *InteractiveMode) SetupAutocompleteProvider()
- func (m *InteractiveMode) ShowLoadedResources(options InteractiveShowLoadedResourcesOptions)
- func (m *InteractiveMode) ShowStatusMessage(message string)
- type InteractivePromptResource
- type InteractiveResourceDiagnostic
- type InteractiveRuntimeHost
- type InteractiveSessionLeafProvider
- type InteractiveSettings
- type InteractiveShowLoadedResourcesOptions
- type InteractiveSkillResource
- type InteractiveSourceInfo
- type InteractiveStatusChat
- type InteractiveStopper
- type InteractiveSuspendOperations
- type InteractiveTerminal
- type InteractiveThemeResource
- type InteractiveThemeResult
- type InteractiveThemeSettings
- type InteractiveUI
- type KeybindingsConfig
- type KeybindingsManager
- type LatestGiRelease
- type LatestPiRelease
- type LoadPromptTemplatesOptions
- type LocalHostProcessExecutor
- type LoginDialogComponent
- func (c *LoginDialogComponent) Focused() bool
- func (c *LoginDialogComponent) HandleInput(input string)
- func (c *LoginDialogComponent) Invalidate()
- func (c *LoginDialogComponent) Render(width int) []string
- func (c *LoginDialogComponent) SetFocused(focused bool)
- func (c *LoginDialogComponent) ShowAuth(url, instructions, manualPrompt string)
- func (c *LoginDialogComponent) ShowInfo(lines []string)
- type LsTool
- type LsToolInput
- type MigrationResult
- type MissingSessionCwdError
- type MissingSessionCwdIssue
- type Mode
- type ModelCostOverride
- type ModelOverride
- type ModelPatternOptions
- type ModelRegistry
- func (r *ModelRegistry) Find(provider, modelID string) (llm.Model, bool)
- func (r *ModelRegistry) GetAPIKeyAndHeaders(model llm.Model) ResolvedRequestAuth
- func (r *ModelRegistry) GetAPIKeyForProvider(provider string) (string, bool)
- func (r *ModelRegistry) GetAll() []llm.Model
- func (r *ModelRegistry) GetAvailable() []llm.Model
- func (r *ModelRegistry) GetError() string
- func (r *ModelRegistry) GetProviderAuthStatus(provider string) AuthStatus
- func (r *ModelRegistry) GetProviderDisplayName(provider string) string
- func (r *ModelRegistry) HasConfiguredAuth(model llm.Model) bool
- func (r *ModelRegistry) IsUsingOAuth(model llm.Model) bool
- func (r *ModelRegistry) Refresh()
- func (r *ModelRegistry) RegisterProvider(providerName string, config ProviderConfigInput) error
- func (r *ModelRegistry) UnregisterProvider(providerName string)
- type ModelSelectorCallbacks
- type ModelSelectorComponent
- type ModelSelectorConfig
- type NewSessionOptions
- type OAuthProvider
- type OAuthSelector
- type OAuthSelectorComponent
- type PackageCommandOptions
- type PackageManagerOperations
- type PackageManagerOptions
- type PackageProgressEvent
- type PackageResourceConfigOptions
- type PackageResourceToggle
- type PackageResourceToggleItem
- type PackageSource
- type PackageUpdate
- type PackageUpdateChecker
- type PackageUpdateSuggestionError
- type ParsedModelResult
- type PlanTodoItem
- type PrintModeOptions
- type PrintModePromptOptions
- type PrintModeRuntimeHost
- type PrintModeSession
- type ProcessFileArgumentsOptions
- type ProcessedFileArguments
- type PromptTemplate
- type ProtocolAbortSignal
- type ProtocolAutocompleteItem
- type ProtocolAutocompleteProviderDefinition
- type ProtocolAutocompleteProviderRegistration
- type ProtocolAutocompleteRange
- type ProtocolAutocompleteRequest
- type ProtocolAutocompleteResult
- type ProtocolCommandContext
- func (c ProtocolCommandContext) Fork(entryID string, options ...ProtocolForkOptions) (ProtocolCommandForkResult, error)
- func (c ProtocolCommandContext) NewSession(options ...ProtocolNewSessionOptions) (ProtocolCommandSwitchResult, error)
- func (c ProtocolCommandContext) Reload() error
- func (c ProtocolCommandContext) SendUserMessage(text string, options ...ProtocolSendUserMessageOptions) error
- func (c ProtocolCommandContext) SwitchSession(sessionFile string, options ...ProtocolSwitchSessionOptions) (ProtocolCommandSwitchResult, error)
- type ProtocolCommandContextActions
- type ProtocolCommandDefinition
- type ProtocolCommandForkResult
- type ProtocolCommandRegistration
- type ProtocolCommandSwitchResult
- type ProtocolCustomMessage
- type ProtocolErrorListener
- type ProtocolEventHandler
- type ProtocolEventResult
- type ProtocolExtensionContext
- func (c *ProtocolExtensionContext) GetFlag(name string) any
- func (c *ProtocolExtensionContext) GetSystemPrompt() string
- func (c *ProtocolExtensionContext) MountViewTree(mountID, slot string, view ViewTreeNode, options ...ViewTreeMountOptions) error
- func (c *ProtocolExtensionContext) On(eventType string, handler ProtocolEventHandler) error
- func (c *ProtocolExtensionContext) OnInput(handler ProtocolInputHandler) error
- func (c *ProtocolExtensionContext) RegisterAutocompleteProvider(id string, definition ProtocolAutocompleteProviderDefinition) error
- func (c *ProtocolExtensionContext) RegisterCommand(name string, definition ProtocolCommandDefinition) error
- func (c *ProtocolExtensionContext) RegisterFlag(name string, definition ProtocolFlagDefinition) error
- func (c *ProtocolExtensionContext) RegisterMessageRenderer(customType string, renderer ProtocolMessageRenderer) error
- func (c *ProtocolExtensionContext) RegisterProvider(provider string, override ProtocolProviderOverride) error
- func (c *ProtocolExtensionContext) RegisterShortcut(key string, definition ProtocolShortcutDefinition) error
- func (c *ProtocolExtensionContext) RegisterTool(definition ProtocolToolDefinition) error
- func (c *ProtocolExtensionContext) RegisterToolRenderer(toolName string, definition ProtocolToolRendererDefinition) error
- func (c *ProtocolExtensionContext) SendCustomMessage(message ProtocolCustomMessage, options ProtocolSendCustomMessageOptions) error
- func (c *ProtocolExtensionContext) SendUserMessage(text string, options ProtocolSendUserMessageOptions) error
- func (c *ProtocolExtensionContext) SetSessionName(name string) error
- func (c *ProtocolExtensionContext) Signal() *ProtocolAbortSignal
- func (c *ProtocolExtensionContext) UnregisterProvider(provider string) error
- type ProtocolExtensionDiscoveryError
- type ProtocolExtensionDiscoveryResult
- type ProtocolExtensionError
- type ProtocolExtensionFactory
- type ProtocolExtensionFlagDiagnostic
- type ProtocolExtensionProcess
- func (p *ProtocolExtensionProcess) EmitEvent(method string, params map[string]any) error
- func (p *ProtocolExtensionProcess) RequestEvent(ctx context.Context, method string, params any) (json.RawMessage, error)
- func (p *ProtocolExtensionProcess) Start(ctx context.Context, host *RPCSessionHost, timeout time.Duration) error
- func (p *ProtocolExtensionProcess) Stop(ctx context.Context, timeout time.Duration) error
- type ProtocolExtensionProcessSupervisor
- func (s *ProtocolExtensionProcessSupervisor) BindSession(session *AgentSession)
- func (s *ProtocolExtensionProcessSupervisor) DiscoverResources(ctx context.Context, reason, cwd string) (ResourceExtension, error)
- func (s *ProtocolExtensionProcessSupervisor) EmitEvent(method string, params map[string]any) error
- func (s *ProtocolExtensionProcessSupervisor) EmitSessionEvent(event ProtocolSessionEvent) error
- func (s *ProtocolExtensionProcessSupervisor) EmitTerminalInput(data string) error
- func (s *ProtocolExtensionProcessSupervisor) EmitUserBash(ctx context.Context, params map[string]any) (*BashResult, bool, error)
- func (s *ProtocolExtensionProcessSupervisor) Processes() []*ProtocolExtensionProcess
- func (s *ProtocolExtensionProcessSupervisor) Start(ctx context.Context) error
- func (s *ProtocolExtensionProcessSupervisor) Stop(ctx context.Context) error
- type ProtocolExtensionRuntime
- func (r *ProtocolExtensionRuntime) ActiveToolNames() []string
- func (r *ProtocolExtensionRuntime) AppendCustomEntry(customType string, data any) (string, error)
- func (r *ProtocolExtensionRuntime) ApplyToSession(session *AgentSession)
- func (r *ProtocolExtensionRuntime) AutocompleteProviders() []ProtocolAutocompleteProviderRegistration
- func (r *ProtocolExtensionRuntime) BindCommandContext(actions ProtocolCommandContextActions)
- func (r *ProtocolExtensionRuntime) BindHostActionHost(host *RPCSessionHost)
- func (r *ProtocolExtensionRuntime) BindModelRegistry(registry *ModelRegistry)
- func (r *ProtocolExtensionRuntime) BindSession(session *AgentSession)
- func (r *ProtocolExtensionRuntime) BindViewTreeHost(host *ViewTreeHost)
- func (r *ProtocolExtensionRuntime) CommandInvocationNames() []string
- func (r *ProtocolExtensionRuntime) CreateCommandContext() ProtocolCommandContext
- func (r *ProtocolExtensionRuntime) EmitInput(text string, images []llm.ContentPart, source string) ProtocolInputResult
- func (r *ProtocolExtensionRuntime) EmitSessionEvent(event ProtocolSessionEvent) (ProtocolEventResult, error)
- func (r *ProtocolExtensionRuntime) FlagDiagnostics() []ProtocolExtensionFlagDiagnostic
- func (r *ProtocolExtensionRuntime) FlagValue(name string) any
- func (r *ProtocolExtensionRuntime) Flags() []ProtocolFlagRegistration
- func (r *ProtocolExtensionRuntime) GetCommand(invocationName string) *ProtocolCommandRegistration
- func (r *ProtocolExtensionRuntime) GetMessageRenderer(customType string) ProtocolMessageRenderer
- func (r *ProtocolExtensionRuntime) GetRegisteredToolDefinition(toolName string) ToolDefinition
- func (r *ProtocolExtensionRuntime) GetSystemPrompt() string
- func (r *ProtocolExtensionRuntime) GetToolRenderer(toolName string) *ProtocolToolRendererRegistration
- func (r *ProtocolExtensionRuntime) HasHandlers(eventType string) bool
- func (r *ProtocolExtensionRuntime) InvalidateCommandContexts()
- func (r *ProtocolExtensionRuntime) LoadFactories(factories []ProtocolExtensionFactory) error
- func (r *ProtocolExtensionRuntime) OnAutocompleteProvidersChanged(callback func()) func()
- func (r *ProtocolExtensionRuntime) OnCommandsChanged(callback func()) func()
- func (r *ProtocolExtensionRuntime) OnError(listener ProtocolErrorListener) func()
- func (r *ProtocolExtensionRuntime) OnMessageRenderersChanged(callback func()) func()
- func (r *ProtocolExtensionRuntime) PendingProviderRegistrations() []ProtocolProviderRegistration
- func (r *ProtocolExtensionRuntime) RegisteredCommands() []ProtocolCommandRegistration
- func (r *ProtocolExtensionRuntime) RegisteredTools() []SDKTool
- func (r *ProtocolExtensionRuntime) RemoveSource(source ProtocolSourceInfo)
- func (r *ProtocolExtensionRuntime) SendCustomMessage(message ProtocolCustomMessage, options ProtocolSendCustomMessageOptions) error
- func (r *ProtocolExtensionRuntime) SendUserMessage(text string, options ProtocolSendUserMessageOptions) error
- func (r *ProtocolExtensionRuntime) SessionEntries() []FileEntry
- func (r *ProtocolExtensionRuntime) SetAbortSignal(done <-chan struct{})
- func (r *ProtocolExtensionRuntime) SetCLIFlagValues(values map[string]any) []ProtocolExtensionFlagDiagnostic
- func (r *ProtocolExtensionRuntime) SetFlagValue(name string, value any)
- func (r *ProtocolExtensionRuntime) SetSessionName(name string) error
- func (r *ProtocolExtensionRuntime) Shortcuts(keybindings KeybindingsConfig) ProtocolShortcutsResult
- func (r *ProtocolExtensionRuntime) SuggestAutocomplete(ctx context.Context, request ProtocolAutocompleteRequest) (ProtocolAutocompleteResult, error)
- func (r *ProtocolExtensionRuntime) UnknownCLIFlagDiagnostics() []ProtocolExtensionFlagDiagnostic
- func (r *ProtocolExtensionRuntime) ViewTreeMounts() []ProtocolViewTreeMountRegistration
- type ProtocolExtensionSource
- type ProtocolFlagDefinition
- type ProtocolFlagRegistration
- type ProtocolForkOptions
- type ProtocolInputEvent
- type ProtocolInputHandler
- type ProtocolInputResult
- type ProtocolMessageRenderer
- type ProtocolMessageRendererRegistration
- type ProtocolNewSessionOptions
- type ProtocolPackageProcessExtension
- type ProtocolPackageResource
- type ProtocolPackageResourceFilters
- type ProtocolPackageResources
- type ProtocolPackageSourceSpec
- type ProtocolProviderOverride
- type ProtocolProviderRegistration
- type ProtocolRuntimeError
- type ProtocolSendCustomMessageOptions
- type ProtocolSendUserMessageOptions
- type ProtocolSessionEvent
- type ProtocolShortcutDefinition
- type ProtocolShortcutRegistration
- type ProtocolShortcutWarning
- type ProtocolShortcutsResult
- type ProtocolSourceInfo
- type ProtocolSwitchSessionOptions
- type ProtocolToolDefinition
- type ProtocolToolRendererDefinition
- type ProtocolToolRendererRegistration
- type ProtocolViewTreeMountRegistration
- type ProviderConfigInput
- type ProviderModelDefinition
- type ProviderRequestConfig
- type ProviderRetrySettings
- type QueuedCustomMessage
- type QueuedUserMessage
- type RPCAvailableModelsResult
- type RPCClient
- func (c *RPCClient) Abort(ctx context.Context) error
- func (c *RPCClient) AbortBash(ctx context.Context) error
- func (c *RPCClient) AbortRetry(ctx context.Context) error
- func (c *RPCClient) Bash(ctx context.Context, command string) (BashResult, error)
- func (c *RPCClient) Clone(ctx context.Context) (RPCCloneResult, error)
- func (c *RPCClient) Compact(ctx context.Context, customInstructions string) (agentharness.CompactionResult, error)
- func (c *RPCClient) CycleModel(ctx context.Context) (*RPCCycleModelResult, error)
- func (c *RPCClient) CycleThinkingLevel(ctx context.Context) (*RPCThinkingLevelResult, error)
- func (c *RPCClient) ExportHTML(ctx context.Context, outputPath string) (RPCExportHTMLResult, error)
- func (c *RPCClient) FollowUp(ctx context.Context, message string) error
- func (c *RPCClient) FollowUpWithImages(ctx context.Context, message string, images []llm.ContentPart) error
- func (c *RPCClient) Fork(ctx context.Context, entryID string) (RPCForkResult, error)
- func (c *RPCClient) GetAvailableModels(ctx context.Context) ([]llm.Model, error)
- func (c *RPCClient) GetCommands(ctx context.Context) ([]RPCSlashCommand, error)
- func (c *RPCClient) GetForkMessages(ctx context.Context) ([]AgentSessionForkMessage, error)
- func (c *RPCClient) GetLastAssistantText(ctx context.Context) (*string, error)
- func (c *RPCClient) GetMessages(ctx context.Context) ([]llm.Message, error)
- func (c *RPCClient) GetSessionStats(ctx context.Context) (RPCSessionStats, error)
- func (c *RPCClient) GetState(ctx context.Context) (RPCSessionState, error)
- func (c *RPCClient) NewSession(ctx context.Context, parentSession string) (RPCCloneResult, error)
- func (c *RPCClient) Prompt(ctx context.Context, message string) error
- func (c *RPCClient) PromptWithImages(ctx context.Context, message string, images []llm.ContentPart) error
- func (c *RPCClient) SetAutoCompaction(ctx context.Context, enabled bool) error
- func (c *RPCClient) SetAutoRetry(ctx context.Context, enabled bool) error
- func (c *RPCClient) SetFollowUpMode(ctx context.Context, mode string) error
- func (c *RPCClient) SetModel(ctx context.Context, provider, modelID string) (llm.Model, error)
- func (c *RPCClient) SetSessionName(ctx context.Context, name string) error
- func (c *RPCClient) SetSteeringMode(ctx context.Context, mode string) error
- func (c *RPCClient) SetThinkingLevel(ctx context.Context, level string) error
- func (c *RPCClient) Steer(ctx context.Context, message string) error
- func (c *RPCClient) SteerWithImages(ctx context.Context, message string, images []llm.ContentPart) error
- func (c *RPCClient) SwitchSession(ctx context.Context, sessionPath string) (RPCCloneResult, error)
- type RPCCloneResult
- type RPCCommand
- type RPCCommandSender
- type RPCCommandSenderFunc
- type RPCCommandsResult
- type RPCCycleModelResult
- type RPCExportHTMLResult
- type RPCForkMessagesResult
- type RPCForkResult
- type RPCLastAssistantTextResult
- type RPCLineProcessor
- type RPCMessagesResult
- type RPCResponse
- type RPCScopedModel
- type RPCSessionHost
- func (h *RPCSessionHost) AcceptPrompt(command RPCCommand) error
- func (h *RPCSessionHost) Bash(ctx context.Context, command string) (BashResult, error)
- func (h *RPCSessionHost) Clone() (RPCCloneResult, error)
- func (h *RPCSessionHost) CycleModel() (*RPCCycleModelResult, error)
- func (h *RPCSessionHost) CycleModelDirection(direction string) (*RPCCycleModelResult, error)
- func (h *RPCSessionHost) CycleThinkingLevel() (string, error)
- func (h *RPCSessionHost) ExportHTML(outputPath string) (string, error)
- func (h *RPCSessionHost) ExportJSONL(outputPath string) (string, error)
- func (h *RPCSessionHost) Fork(entryID string) (RPCForkResult, error)
- func (h *RPCSessionHost) GetCommands() RPCCommandsResult
- func (h *RPCSessionHost) GetLastAssistantText() *string
- func (h *RPCSessionHost) GetSessionStats() RPCSessionStats
- func (h *RPCSessionHost) GetState() RPCSessionState
- func (h *RPCSessionHost) HandleCommand(ctx context.Context, command RPCCommand) RPCResponse
- func (h *RPCSessionHost) HandleHostAction(request HostActionRequest) HostActionResponse
- func (h *RPCSessionHost) HandleHostActionContext(ctx context.Context, request HostActionRequest) HostActionResponse
- func (h *RPCSessionHost) OnSessionReplaced(listener func(*AgentSession)) func()
- func (h *RPCSessionHost) SetAutoCompaction(enabled *bool) error
- func (h *RPCSessionHost) SetAutoRetry(enabled *bool) error
- func (h *RPCSessionHost) SetFollowUpMode(mode string) error
- func (h *RPCSessionHost) SetModel(provider, modelID string) (llm.Model, error)
- func (h *RPCSessionHost) SetSteeringMode(mode string) error
- func (h *RPCSessionHost) SetThinkingLevel(level string) error
- func (h *RPCSessionHost) SubscribeEvents(listener func(AgentSessionEvent)) func()
- func (h *RPCSessionHost) SwitchSession(sessionPath string) (RPCCloneResult, error)
- type RPCSessionState
- type RPCSessionStats
- type RPCSessionTokens
- type RPCSlashCommand
- type RPCThinkingLevelResult
- type ReadTool
- type ReadToolInput
- type ReadToolOptions
- type ReadToolTruncation
- type ResizedImage
- type ResolveCLIModelOptions
- type ResolveCLIModelResult
- type ResolveExtensionSourcesOptions
- type ResolvedRequestAuth
- type ResourceAgentsFilesResult
- type ResourceContextFile
- type ResourceExtension
- type ResourceExtensionPath
- type ResourceExtensionsResult
- type ResourcePromptPath
- type ResourcePromptsResult
- type ResourceSkillPath
- type ResourceSkillsResult
- type ResourceTheme
- type ResourceThemePath
- type ResourceThemesResult
- type SDKAgent
- type SDKAgentState
- type SDKContentPart
- type SDKTool
- type SDKToolResult
- type SandboxEnvReader
- type ScopedModel
- type ScopedModelsSelectorCallbacks
- type ScopedModelsSelectorComponent
- func (c *ScopedModelsSelectorComponent) EnabledModelIDs() []string
- func (c *ScopedModelsSelectorComponent) Focused() bool
- func (c *ScopedModelsSelectorComponent) HandleInput(data string)
- func (c *ScopedModelsSelectorComponent) Invalidate()
- func (c *ScopedModelsSelectorComponent) Render(width int) []string
- func (c *ScopedModelsSelectorComponent) SetFocused(focused bool)
- type ScopedModelsSelectorConfig
- type SelfUpdateCommand
- type SelfUpdateCommandStep
- type SelfUpdateOptions
- type SelfUpdateResult
- type SessionContext
- type SessionHeader
- type SessionImportFileNotFoundError
- type SessionInfo
- type SessionListProgress
- type SessionManager
- func ContinueRecentSession(cwd string, sessionDir ...string) (*SessionManager, error)
- func CreateSessionManager(cwd string, sessionDir ...string) (*SessionManager, error)
- func ForkSessionFrom(sourcePath, targetCwd string, sessionDir ...string) (*SessionManager, error)
- func InMemorySessionManager(cwd ...string) (*SessionManager, error)
- func OpenSessionManager(path string, args ...string) (*SessionManager, error)
- func (s *SessionManager) AppendCompaction(summary, firstKeptEntryID string, tokensBefore int) string
- func (s *SessionManager) AppendCustomEntry(customType string, data any) string
- func (s *SessionManager) AppendCustomMessageEntry(customType string, content any, display bool, details any) string
- func (s *SessionManager) AppendCustomMessageEntryWithContext(customType string, content any, display bool, details any, ...) string
- func (s *SessionManager) AppendLabelChange(targetID, label string) (string, error)
- func (s *SessionManager) AppendMessage(message any) string
- func (s *SessionManager) AppendModelChange(provider, modelID string) string
- func (s *SessionManager) AppendSessionInfo(name string) string
- func (s *SessionManager) AppendThinkingLevelChange(thinkingLevel string) string
- func (s *SessionManager) Branch(branchFromID string) error
- func (s *SessionManager) BranchWithSummary(branchFromID *string, summary string) (string, error)
- func (s *SessionManager) BuildSessionContext() SessionContext
- func (s *SessionManager) CreateBranchedSession(leafID string) (string, error)
- func (s *SessionManager) ForkAtEntry(entryID string) (*SessionManager, error)
- func (s *SessionManager) ForkBeforeEntry(entryID string) (*SessionManager, error)
- func (s *SessionManager) GetBranch(fromID ...string) []FileEntry
- func (s *SessionManager) GetCWD() string
- func (s *SessionManager) GetChildren(parentID string) []FileEntry
- func (s *SessionManager) GetCwd() string
- func (s *SessionManager) GetEntries() []FileEntry
- func (s *SessionManager) GetEntry(id string) *FileEntry
- func (s *SessionManager) GetHeader() *SessionHeader
- func (s *SessionManager) GetLabel(id string) (string, bool)
- func (s *SessionManager) GetLeafEntry() *FileEntry
- func (s *SessionManager) GetLeafID() *string
- func (s *SessionManager) GetLeafId() *string
- func (s *SessionManager) GetSessionDir() string
- func (s *SessionManager) GetSessionFile() string
- func (s *SessionManager) GetSessionID() string
- func (s *SessionManager) GetSessionId() string
- func (s *SessionManager) GetSessionName() string
- func (s *SessionManager) GetTree() []*SessionTreeNode
- func (s *SessionManager) IsPersisted() bool
- func (s *SessionManager) NewSession(options ...NewSessionOptions) string
- func (s *SessionManager) ResetLeaf()
- func (s *SessionManager) SetSessionFile(sessionFile string) error
- type SessionModel
- type SessionSelectorComponent
- func (s *SessionSelectorComponent) GetSessionList() *SessionSelectorComponent
- func (s *SessionSelectorComponent) HandleInput(input string)
- func (s *SessionSelectorComponent) Invalidate()
- func (s *SessionSelectorComponent) IsAllLoading() bool
- func (s *SessionSelectorComponent) Render(width int) []string
- func (s *SessionSelectorComponent) Scope() string
- func (s *SessionSelectorComponent) SetNameFilter(filter SessionSelectorNameFilter)
- func (s *SessionSelectorComponent) SetSortMode(mode SessionSelectorSortMode)
- type SessionSelectorLoader
- type SessionSelectorNameFilter
- type SessionSelectorOptions
- type SessionSelectorSortMode
- type SessionTreeNode
- type SettingsError
- type SettingsManager
- func (s *SettingsManager) DrainErrors() []SettingsError
- func (s *SettingsManager) Flush() error
- func (s *SettingsManager) GetAutocompleteMaxVisible() int
- func (s *SettingsManager) GetBlockImages() bool
- func (s *SettingsManager) GetBranchSummarySkipPrompt() bool
- func (s *SettingsManager) GetClearOnShrink() bool
- func (s *SettingsManager) GetCollapseChangelog() bool
- func (s *SettingsManager) GetDefaultModel() string
- func (s *SettingsManager) GetDefaultProvider() string
- func (s *SettingsManager) GetDefaultThinkingLevel() string
- func (s *SettingsManager) GetDoubleEscapeAction() string
- func (s *SettingsManager) GetEditorPaddingX() int
- func (s *SettingsManager) GetEnableInstallTelemetry() bool
- func (s *SettingsManager) GetEnableSkillCommands() bool
- func (s *SettingsManager) GetEnabledModels() []string
- func (s *SettingsManager) GetExtensionPaths() []string
- func (s *SettingsManager) GetHTTPIdleTimeoutMS() int
- func (s *SettingsManager) GetHideThinkingBlock() bool
- func (s *SettingsManager) GetImageAutoResize() bool
- func (s *SettingsManager) GetImageWidthCells() int
- func (s *SettingsManager) GetLastChangelogVersion() string
- func (s *SettingsManager) GetPackages() []any
- func (s *SettingsManager) GetProviderRetrySettings() ProviderRetrySettings
- func (s *SettingsManager) GetQuietStartup() bool
- func (s *SettingsManager) GetRetryEnabled() bool
- func (s *SettingsManager) GetRetrySettings() AgentSessionRetrySettings
- func (s *SettingsManager) GetSessionDir() string
- func (s *SettingsManager) GetShellCommandPrefix() string
- func (s *SettingsManager) GetShowHardwareCursor() bool
- func (s *SettingsManager) GetShowImages() bool
- func (s *SettingsManager) GetShowTerminalProgress() bool
- func (s *SettingsManager) GetTheme() string
- func (s *SettingsManager) GetTransport() string
- func (s *SettingsManager) GetTreeFilterMode() string
- func (s *SettingsManager) GetWarnings() WarningSettings
- func (s *SettingsManager) Reload()
- func (s *SettingsManager) SetAutocompleteMaxVisible(visible int)
- func (s *SettingsManager) SetBlockImages(blocked bool)
- func (s *SettingsManager) SetBranchSummarySkipPrompt(skip bool)
- func (s *SettingsManager) SetClearOnShrink(enabled bool)
- func (s *SettingsManager) SetCollapseChangelog(collapsed bool)
- func (s *SettingsManager) SetDefaultModel(model string)
- func (s *SettingsManager) SetDefaultProvider(provider string)
- func (s *SettingsManager) SetDefaultThinkingLevel(level string)
- func (s *SettingsManager) SetDoubleEscapeAction(action string)
- func (s *SettingsManager) SetEditorPaddingX(padding int)
- func (s *SettingsManager) SetEnableInstallTelemetry(enabled bool)
- func (s *SettingsManager) SetEnableSkillCommands(enabled bool)
- func (s *SettingsManager) SetEnabledModels(models []string)
- func (s *SettingsManager) SetHTTPIdleTimeoutMS(timeoutMS int)
- func (s *SettingsManager) SetHideThinkingBlock(hidden bool)
- func (s *SettingsManager) SetImageAutoResize(enabled bool)
- func (s *SettingsManager) SetImageWidthCells(width int)
- func (s *SettingsManager) SetLastChangelogVersion(version string)
- func (s *SettingsManager) SetPackages(packages []any)
- func (s *SettingsManager) SetProjectExtensionPaths(paths []string)
- func (s *SettingsManager) SetProjectPackages(packages []any)
- func (s *SettingsManager) SetQuietStartup(enabled bool)
- func (s *SettingsManager) SetRetryEnabled(enabled bool)
- func (s *SettingsManager) SetShowHardwareCursor(enabled bool)
- func (s *SettingsManager) SetShowImages(enabled bool)
- func (s *SettingsManager) SetShowTerminalProgress(enabled bool)
- func (s *SettingsManager) SetTheme(theme string)
- func (s *SettingsManager) SetTransport(transport string)
- func (s *SettingsManager) SetTreeFilterMode(mode string)
- func (s *SettingsManager) SetWarningAnthropicExtraUsage(enabled bool)
- func (s *SettingsManager) SetWarnings(warnings WarningSettings)
- type SourceInfo
- type SystemPromptContextFile
- type SystemPromptDocumentationPath
- type SystemPromptSkill
- type TUIDialogHost
- type TUIDialogOption
- type TUIDialogRequest
- type TUIDialogResult
- type TUIEditorCursorHost
- type TUIEditorCustomStateHost
- type TUIEditorFocusHost
- type TUIEditorHost
- type TUIEditorPasteHost
- type TUIStatusHost
- type TUIThemeHost
- type TUIThemeInfo
- type TUIThinkingLabelHost
- type TUITitleHost
- type TUIToolExpansionHost
- type TUIWorkingHost
- type TUIWorkingIndicatorOptions
- type TUIWorkingUpdate
- type ThemeExportColors
- type ThinkingLevel
- type TmuxOptionReader
- type ToolCallRenderer
- type ToolDefinition
- func CreateBashToolDefinition(cwd string, options ...BashToolOptions) ToolDefinition
- func CreateEditToolDefinition(cwd string, operations ...FileToolOperations) ToolDefinition
- func CreateReadToolDefinition(cwd string, operations ...FileToolOperations) ToolDefinition
- func CreateWriteToolDefinition(cwd string, operations ...FileToolOperations) ToolDefinition
- type ToolExecutionComponent
- func (c *ToolExecutionComponent) Invalidate()
- func (c *ToolExecutionComponent) MarkExecutionStarted()
- func (c *ToolExecutionComponent) Render(width int) []string
- func (c *ToolExecutionComponent) SetArgsComplete()
- func (c *ToolExecutionComponent) SetExpanded(expanded bool)
- func (c *ToolExecutionComponent) SetImageWidthCells(width int)
- func (c *ToolExecutionComponent) SetShowImages(show bool)
- func (c *ToolExecutionComponent) UpdateArgs(args any)
- func (c *ToolExecutionComponent) UpdatePartialResult(result FileToolResult, isError bool) bool
- func (c *ToolExecutionComponent) UpdateResult(result FileToolResult, isError bool) bool
- func (c *ToolExecutionComponent) UpdateResultWithOptions(result FileToolResult, isError, isPartial bool) bool
- type ToolExecutionOptions
- type ToolRenderContext
- type ToolRenderResultOptions
- type ToolResultRenderer
- type TopLevelResourceToggle
- type TreeSelectorComponent
- func (s *TreeSelectorComponent) Focused() bool
- func (s *TreeSelectorComponent) GetTreeList() *TreeSelectorList
- func (s *TreeSelectorComponent) HandleInput(input string)
- func (s *TreeSelectorComponent) Invalidate()
- func (s *TreeSelectorComponent) Render(width int) []string
- func (s *TreeSelectorComponent) SetFilter(filter TreeSelectorFilter)
- func (s *TreeSelectorComponent) SetFocused(focused bool)
- type TreeSelectorFilter
- type TreeSelectorList
- type TreeSelectorOptions
- type TriggerCompactExtension
- type UserMessageComponent
- type UserMessageSelectorComponent
- type VersionCheckOptions
- type VersionReleaseChecker
- type ViewTreeChange
- type ViewTreeComponent
- type ViewTreeEvent
- type ViewTreeFocus
- type ViewTreeHost
- func (h *ViewTreeHost) Blur(mountID, nodeID string) error
- func (h *ViewTreeHost) DispatchEvent(mountID, nodeID, event string, data map[string]any) error
- func (h *ViewTreeHost) DispatchResize(width, height int) error
- func (h *ViewTreeHost) DispatchThemeChange(name string) error
- func (h *ViewTreeHost) DispatchTick(frame int64) error
- func (h *ViewTreeHost) DispatchVisibilityChange(mountID string, visible bool, reason string) error
- func (h *ViewTreeHost) Events() []ViewTreeEvent
- func (h *ViewTreeHost) Focus(mountID, nodeID string) error
- func (h *ViewTreeHost) Focused() ViewTreeFocus
- func (h *ViewTreeHost) HasEventSubscription(event string) bool
- func (h *ViewTreeHost) Mount(mountID, slot string, view ViewTreeNode) error
- func (h *ViewTreeHost) MountWithOptions(mountID, slot string, view ViewTreeNode, options ...ViewTreeMountOptions) error
- func (h *ViewTreeHost) Mounted(mountID string) (ViewTreeMount, bool)
- func (h *ViewTreeHost) MountsBySlot(slot string) []ViewTreeMount
- func (h *ViewTreeHost) OnChange(listener func(ViewTreeChange)) func()
- func (h *ViewTreeHost) OnEvent(listener func(ViewTreeEvent)) func()
- func (h *ViewTreeHost) Patch(mountID string, ops []ViewTreePatchOperation) error
- func (h *ViewTreeHost) RenderMount(mountID string, width int) ([]string, error)
- func (h *ViewTreeHost) SetStatus(key, text string, priority int) error
- func (h *ViewTreeHost) Unmount(mountID string) bool
- type ViewTreeItem
- type ViewTreeListItem
- type ViewTreeMount
- type ViewTreeMountOptions
- type ViewTreeNode
- type ViewTreeOverlayMargin
- type ViewTreeOverlayOptions
- type ViewTreePatchOperation
- type ViewTreeSizeValue
- type ViewTreeStyle
- type ViewTreeTableColumn
- type VisualTruncateResult
- type WarningSettings
- type WriteTool
- type WriteToolInput
Constants ¶
View Source
const ( ProtocolEventSessionBeforeSwitch = "session_before_switch" ProtocolEventSessionBeforeFork = "session_before_fork" ProtocolEventSessionShutdown = "session_shutdown" ProtocolEventSessionStart = "session_start" ProtocolEventSessionSwitch = "session_switch" ProtocolEventSessionInfoChanged = "session_info_changed" ProtocolEventSessionBeforeTree = "session_before_tree" ProtocolEventModelSelect = "model_select" ProtocolEventThinkingLevelSelect = "thinking_level_select" ProtocolEventBeforeAgentStart = "before_agent_start" ProtocolEventContext = "context" ProtocolEventToolCall = "tool_call" ProtocolEventToolResult = "tool_result" ProtocolEventToolExecutionUpdate = "tool_execution_update" ProtocolEventMessageStart = "message_start" ProtocolEventMessageUpdate = "message_update" ProtocolEventMessageEnd = "message_end" ProtocolEventUserBash = "user_bash" ProtocolEventResourcesDiscover = "resources_discover" ProtocolEventBeforeProviderRequest = "before_provider_request" ProtocolEventAfterProviderResponse = "after_provider_response" )
View Source
const ( DefaultCodingAgentPackageName = "gi" DefaultCodingAgentVersion = "0.0.3" DefaultCodingAgentAppName = "gi" DefaultCodingAgentAppTitle = "Gi" EnvCodingAgentDir = "GI_CODING_AGENT_DIR" LegacyEnvCodingAgentDir = "PI_CODING_AGENT_DIR" EnvCodingAgentSessionDir = "GI_CODING_AGENT_SESSION_DIR" LegacyEnvCodingAgentSessionDir = "PI_CODING_AGENT_SESSION_DIR" InstallMethodBunBinary InstallMethod = "bun-binary" InstallMethodNPM InstallMethod = "npm" InstallMethodPNPM InstallMethod = "pnpm" InstallMethodYarn InstallMethod = "yarn" InstallMethodBun InstallMethod = "bun" InstallMethodUnknown InstallMethod = "unknown" )
View Source
const ( OSC133ZoneStart = "\x1b]133;A\x07" OSC133ZoneEnd = "\x1b]133;B\x07" OSC133ZoneFinal = "\x1b]133;C\x07" TerminalBGReset = "\x1b[49m" )
View Source
const ( RPCCommandPrompt = "prompt" RPCCommandSteer = "steer" RPCCommandFollowUp = "follow_up" RPCCommandAbort = "abort" RPCCommandNewSession = "new_session" RPCCommandGetState = "get_state" RPCCommandSetModel = "set_model" RPCCommandCycleModel = "cycle_model" RPCCommandSetThinkingLevel = "set_thinking_level" RPCCommandCycleThinkingLevel = "cycle_thinking_level" RPCCommandGetAvailableModels = "get_available_models" RPCCommandSetSteeringMode = "set_steering_mode" RPCCommandSetFollowUpMode = "set_follow_up_mode" RPCCommandCompact = "compact" RPCCommandSetAutoCompaction = "set_auto_compaction" RPCCommandSetAutoRetry = "set_auto_retry" RPCCommandAbortRetry = "abort_retry" RPCCommandBash = "bash" RPCCommandAbortBash = "abort_bash" RPCCommandGetSessionStats = "get_session_stats" RPCCommandExportHTML = "export_html" RPCCommandSwitchSession = "switch_session" RPCCommandFork = "fork" RPCCommandGetForkMessages = "get_fork_messages" RPCCommandGetLastAssistantText = "get_last_assistant_text" RPCCommandSetSessionName = "set_session_name" RPCCommandGetMessages = "get_messages" RPCCommandGetCommands = "get_commands" )
View Source
const ( FauxProvider = "faux" FauxModelID = "faux-1" FauxAPI = "anthropic-messages" )
View Source
const AnthropicSubscriptionAuthWarning = authwarning.AnthropicSubscriptionAuthWarning
View Source
const CapabilityBashIntercept = "bash.intercept"
View Source
const CapabilityCommandsRegister = "commands.register"
View Source
const CapabilityInputEvents = "input.events"
View Source
const CapabilityLifecycleEvents = "lifecycle.events"
View Source
const CapabilityProvidersRegister = "providers.register"
View Source
const CapabilityResourcesDiscover = "resources.discover"
View Source
const CapabilityShortcutsRegister = "shortcuts.register"
View Source
const CapabilitySystemPromptModify = "system_prompt.modify"
View Source
const CapabilityTUIAutocomplete = "tui.autocomplete"
View Source
const CapabilityTUIEditor = "tui.editor"
View Source
const CapabilityTUIHeader = "tui.header"
View Source
const CapabilityTUIMessageRenderer = "tui.message_renderer"
View Source
const CapabilityTUIOverlay = "tui.overlay"
View Source
const CapabilityTUITerminalInput = "tui.terminal_input"
View Source
const CapabilityTUITheme = "tui.theme"
View Source
const CapabilityTUIToolRenderer = "tui.tool_renderer"
View Source
const CapabilityTUIToolsExpanded = "tui.tools_expanded"
View Source
const CapabilityTUIWidget = "tui.widget"
View Source
const CapabilityToolsRegister = "tools.register"
View Source
const ConfigDirName = ".gi"
View Source
const CurrentSessionVersion = 3
View Source
const ExportHTMLTemplateCSS = `` /* 10094-byte string literal not displayed */
View Source
const ExportHTMLTemplateJS = `` /* 47459-byte string literal not displayed */
View Source
const FSWatchRetryDelay = fswatch.FSWatchRetryDelay
View Source
const LatestGiVersionURL = versioncheck.LatestGiVersionURL
View Source
const LatestPiVersionURL = versioncheck.LatestPiVersionURL
View Source
const RPCCommandClone = "clone"
Variables ¶
View Source
var DefaultModelPerProvider = modelresolver.DefaultModelPerProvider
View Source
var ErrAuthStorageLockCompromised = errors.New("auth storage lock was compromised")
View Source
var FauxModel = llm.Model{ ID: FauxModelID, Name: "Faux Model", API: FauxAPI, Provider: FauxProvider, BaseURL: "http://localhost:0", Reasoning: false, Input: []string{"text", "image"}, ContextWindow: 128000, MaxTokens: 16384, }
Functions ¶
func AnsiLinesToHTML ¶
func AttachJSONLLineReader ¶
func BuildSDKStreamHeaders ¶
func BuildSystemPrompt ¶
func BuildSystemPrompt(options BuildSystemPromptOptions) string
func CanonicalizePath ¶
func CheckForNewGiVersion ¶
func CheckForNewGiVersion(currentVersion string, options VersionCheckOptions) (string, bool)
func CheckForNewPiVersion ¶
func CheckForNewPiVersion(currentVersion string, options VersionCheckOptions) (string, bool)
func CheckTmuxKeyboardSetup ¶
func CheckTmuxKeyboardSetup(ctx context.Context, reader TmuxOptionReader) string
func CleanPlanStepText ¶
func ClearAPIKeyCache ¶
func ClearAPIKeyCache()
func ClearConfigValueCache ¶
func ClearConfigValueCache()
func CloseWatcher ¶
func CloseWatcher(watcher FSWatcher)
func ComparePackageVersions ¶
func CopyToClipboard ¶
func CopyToClipboard(text string, options ClipboardCopyOptions) error
func CreateAgentSessionRuntime ¶
func CreateAgentSessionRuntime(factory CreateAgentSessionRuntimeFactory, options AgentSessionRuntimeOptions) (any, error)
func DefaultAgentSessionCompactionSummarizer ¶
func DefaultAgentSessionCompactionSummarizer(preparation agentharness.CompactionPreparation, customInstructions string) (agentharness.CompactionResult, error)
func DefaultClipboardPasteImageKey ¶
func DefaultClipboardPasteImageKey() string
func DefaultTmuxOptionReader ¶
func ExpandPath ¶
func ExpandPromptTemplate ¶
func ExpandPromptTemplate(text string, templates []PromptTemplate) string
func ExpandTildePath ¶
func ExportHTMLTemplateCSSWithOptions ¶
func ExportHTMLTemplateCSSWithOptions(options ExportHTMLOptions) string
func ExportSessionFileToHTML ¶
func ExportSessionFileToHTMLWithOptions ¶
func ExportSessionFileToHTMLWithOptions(inputPath, outputPath string, options ExportHTMLOptions) (string, error)
func ExtractDoneSteps ¶
func FindMostRecentSession ¶
func FormatDimensionNote ¶
func FormatDimensionNote(result ResizedImage) string
func GetAgentDir ¶
func GetAgentDirSessionDir ¶
func GetAttributionHeaders ¶
func GetAuthPath ¶
func GetBundledInteractiveAssetPath ¶
func GetBundledInteractiveAssetPath(name string, envs ...InstallEnvironment) string
func GetChangelogPath ¶
func GetChangelogPath(envs ...InstallEnvironment) string
func GetCustomThemesDir ¶
func GetCwdRelativePath ¶
func GetDebugLogPath ¶
func GetDefaultSessionDir ¶
func GetDocsPath ¶
func GetDocsPath(envs ...InstallEnvironment) string
func GetExamplesPath ¶
func GetExamplesPath(envs ...InstallEnvironment) string
func GetExportTemplateDir ¶
func GetExportTemplateDir(envs ...InstallEnvironment) string
func GetGiUserAgent ¶
func GetInteractiveAssetsDir ¶
func GetInteractiveAssetsDir(envs ...InstallEnvironment) string
func GetLatestGiVersion ¶
func GetLatestGiVersion(currentVersion string, options VersionCheckOptions) (string, bool)
func GetLatestPiVersion ¶
func GetLatestPiVersion(currentVersion string, options VersionCheckOptions) (string, bool)
func GetModelsPath ¶
func GetPackageDir ¶
func GetPackageDir(envs ...InstallEnvironment) string
func GetPackageJSONPath ¶
func GetPackageJSONPath(envs ...InstallEnvironment) string
func GetPackageJsonPath ¶
func GetPackageJsonPath(envs ...InstallEnvironment) string
func GetPathCommandArgument ¶
func GetPiUserAgent ¶
func GetPromptsDir ¶
func GetReadmePath ¶
func GetReadmePath(envs ...InstallEnvironment) string
func GetSelfUpdateUnavailableInstruction ¶
func GetSelfUpdateUnavailableInstruction(packageName string, env InstallEnvironment, _ []string, updatePackageName string) string
func GetSessionsDir ¶
func GetSettingsPath ¶
func GetShareViewerURL ¶
func GetThemesDir ¶
func GetThemesDir(envs ...InstallEnvironment) string
func GetToolsDir ¶
func GetUpdateInstruction ¶
func GetUpdateInstruction(packageName string, env InstallEnvironment) string
func HasSessionName ¶
func HasSessionName(session SessionInfo) bool
func Highlight ¶
func Highlight(code string, options HighlightOptions) string
func IsAPIKeyLoginProvider ¶
func IsAliasModelID ¶
func IsInstallTelemetryEnabled ¶
func IsInstallTelemetryEnabled(settingsManager *SettingsManager) bool
func IsLocalPath ¶
func IsNewerPackageVersion ¶
func IsSafePlanCommand ¶
func IsValidThinkingLevel ¶
func IsWaylandSession ¶
func LoadProtocolExtensionDescriptors ¶
func LoadProtocolExtensionDescriptors(sources []ProtocolExtensionSource, runtime *ProtocolExtensionRuntime) protocolExtensionDescriptorLoadResult
func MarkCompletedPlanSteps ¶
func MarkCompletedPlanSteps(message string, items []PlanTodoItem) int
func MigrateSessionEntries ¶
func OfficialPackageNames ¶
func OfficialPackageNames() []string
func PackageSourceIdentity ¶
func PackageSourceIdentity(source PackageSource) string
func ParseCommandArgs ¶
func PreRenderExportHTMLCustomTools ¶
func PreRenderExportHTMLCustomTools(entries []FileEntry, renderer ExportHTMLToolRenderer) map[string]ExportHTMLRenderedTool
func RegisterOAuthProvider ¶
func RegisterOAuthProvider(provider OAuthProvider)
func RenderDiff ¶
func RenderHighlightedHTML ¶
func RenderHighlightedHTML(input string, theme HighlightTheme) string
func RenderSessionManagerHTML ¶
func RenderSessionManagerHTML(sessionManager *SessionManager) string
func RenderSessionManagerHTMLWithOptions ¶
func RenderSessionManagerHTMLWithOptions(sessionManager *SessionManager, options ExportHTMLOptions) string
func RenderViewTree ¶
func RenderViewTree(view ViewTreeNode, width int) []string
func ResetOAuthProviders ¶
func ResetOAuthProviders()
func ResolveConfigValue ¶
func ResolveReadPath ¶
func ResolveToCwd ¶
func RestoreSandboxEnv ¶
func RestoreSandboxEnv(isBun bool, env map[string]string, readEnviron SandboxEnvReader) bool
func RunCLI ¶
func RunCLI(options CLIOptions) int
func RunMigrations ¶
func RunPrintMode ¶
func RunPrintMode(host PrintModeRuntimeHost, options PrintModeOptions) (exitCode int)
func SerializeJSONLine ¶
func StripFrontmatter ¶
func SubstituteArgs ¶
func SupportsLanguage ¶
func TUIThemeSchemaJSON ¶
func TUIThemeSchemaJSON() []byte
TUIThemeSchemaJSON returns Gi's Pi-compatible TUI theme JSON schema.
func UnregisterOAuthProvider ¶
func UnregisterOAuthProvider(providerID string)
func ValidateViewTreeNode ¶
func ValidateViewTreeNode(node ViewTreeNode) error
func WithFileMutationQueue ¶
func WriteCLIUsage ¶
func WriteCLIUsage(writer io.Writer, extensionFlags ...ProtocolFlagRegistration)
func WriteListModels ¶
func WriteListModels(stdout, stderr io.Writer, registry *ModelRegistry, searchPattern string) error
Types ¶
type AgentContextUsage ¶
type AgentSession ¶
type AgentSession struct {
SessionManager *SessionManager
ResourceLoader AgentSessionResourceLoader
BaseSystemPrompt string
SystemPrompt string
Agent *SDKAgent
CompactionSettings agentharness.CompactionSettings
CompactionSummarizer AgentSessionCompactionSummarizer
BranchSummarizer AgentSessionBranchSummarizer
RetrySettings AgentSessionRetrySettings
AutoCompactionRunner AgentSessionAutoCompactionRunner
AgentContinue func() error
Responder AgentSessionResponder
StreamResponder AgentSessionStreamResponder
Preflight AgentSessionPreflight
ExtensionRuntime *ProtocolExtensionRuntime
DynamicTools []SDKTool
ScopedModels []ScopedModel
Tools []string
ToolsSet bool
NoTools string
SteeringMode string
FollowUpMode string
// contains filtered or unexported fields
}
func CreateAgentSession ¶
func CreateAgentSession(options AgentSessionOptions) (*AgentSession, error)
func (*AgentSession) Abort ¶
func (s *AgentSession) Abort() error
func (*AgentSession) AbortBash ¶
func (s *AgentSession) AbortBash()
func (*AgentSession) AbortBranchSummary ¶
func (s *AgentSession) AbortBranchSummary()
func (*AgentSession) AbortCompaction ¶
func (s *AgentSession) AbortCompaction()
func (*AgentSession) AbortRetry ¶
func (s *AgentSession) AbortRetry()
func (*AgentSession) CheckCompaction ¶
func (s *AgentSession) CheckCompaction(assistantMessage llm.Message, skipAbortedCheck ...bool) error
func (*AgentSession) ClearQueue ¶
func (s *AgentSession) ClearQueue() (steering, followUp []string)
func (*AgentSession) Compact ¶
func (s *AgentSession) Compact(customInstructions ...string) (agentharness.CompactionResult, error)
func (*AgentSession) Dispose ¶
func (s *AgentSession) Dispose()
func (*AgentSession) ExecuteBash ¶
func (s *AgentSession) ExecuteBash(command string, options ...AgentSessionBashOptions) (BashResult, error)
func (*AgentSession) FollowUp ¶
func (s *AgentSession) FollowUp(text string) error
func (*AgentSession) FollowUpWithImages ¶
func (s *AgentSession) FollowUpWithImages(text string, images []llm.ContentPart) error
func (*AgentSession) Fork ¶
func (s *AgentSession) Fork(entryID string) (AgentSessionForkResult, error)
func (*AgentSession) ForkAt ¶
func (s *AgentSession) ForkAt(entryID string) (AgentSessionForkResult, error)
func (*AgentSession) GetActiveLLMTools ¶
func (s *AgentSession) GetActiveLLMTools() []llm.Tool
func (*AgentSession) GetActiveToolNames ¶
func (s *AgentSession) GetActiveToolNames() []string
func (*AgentSession) GetActiveTools ¶
func (s *AgentSession) GetActiveTools() []SDKTool
func (*AgentSession) GetAllTools ¶
func (s *AgentSession) GetAllTools() []SDKTool
func (*AgentSession) GetContextUsage ¶
func (s *AgentSession) GetContextUsage() *AgentContextUsage
func (*AgentSession) GetFollowUpMessages ¶
func (s *AgentSession) GetFollowUpMessages() []string
func (*AgentSession) GetFollowUpQueue ¶
func (s *AgentSession) GetFollowUpQueue() []QueuedUserMessage
func (*AgentSession) GetSessionStats ¶
func (s *AgentSession) GetSessionStats() AgentSessionStats
func (*AgentSession) GetSteeringMessages ¶
func (s *AgentSession) GetSteeringMessages() []string
func (*AgentSession) GetSteeringQueue ¶
func (s *AgentSession) GetSteeringQueue() []QueuedUserMessage
func (*AgentSession) GetUserMessagesForForking ¶
func (s *AgentSession) GetUserMessagesForForking() []AgentSessionForkMessage
func (*AgentSession) HasAgentQueuedMessages ¶
func (s *AgentSession) HasAgentQueuedMessages() bool
func (*AgentSession) HasPendingBashMessages ¶
func (s *AgentSession) HasPendingBashMessages() bool
func (*AgentSession) IsBashRunning ¶
func (s *AgentSession) IsBashRunning() bool
func (*AgentSession) IsBranchSummaryRunning ¶
func (s *AgentSession) IsBranchSummaryRunning() bool
func (*AgentSession) IsCompacting ¶
func (s *AgentSession) IsCompacting() bool
func (*AgentSession) IsRetrying ¶
func (s *AgentSession) IsRetrying() bool
func (*AgentSession) IsStreaming ¶
func (s *AgentSession) IsStreaming() bool
func (*AgentSession) Messages ¶
func (s *AgentSession) Messages() []llm.Message
func (*AgentSession) NavigateTree ¶
func (s *AgentSession) NavigateTree(targetID string, options AgentSessionNavigateTreeOptions) (AgentSessionNavigateTreeResult, error)
func (*AgentSession) PendingMessageCount ¶
func (s *AgentSession) PendingMessageCount() int
func (*AgentSession) Prompt ¶
func (s *AgentSession) Prompt(text string) error
func (*AgentSession) PromptWithImages ¶
func (s *AgentSession) PromptWithImages(text string, images []llm.ContentPart) error
func (*AgentSession) QueueAgentMessage ¶
func (s *AgentSession) QueueAgentMessage(message llm.Message)
func (*AgentSession) QueueExtensionUserMessage ¶
func (s *AgentSession) QueueExtensionUserMessage(text, deliverAs string) error
func (*AgentSession) RecordBashResult ¶
func (s *AgentSession) RecordBashResult(command string, result BashResult, options ...AgentSessionBashRecordOptions)
func (*AgentSession) RefreshSystemPrompt ¶
func (s *AgentSession) RefreshSystemPrompt()
func (*AgentSession) RunAutoCompaction ¶
func (s *AgentSession) RunAutoCompaction(reason string, willRetry bool) error
func (*AgentSession) SendCustomMessage ¶
func (s *AgentSession) SendCustomMessage(message QueuedCustomMessage, options ProtocolSendCustomMessageOptions) error
func (*AgentSession) SetScopedModels ¶
func (s *AgentSession) SetScopedModels(scopedModels []ScopedModel)
func (*AgentSession) SetSessionName ¶
func (s *AgentSession) SetSessionName(name string) error
func (*AgentSession) Steer ¶
func (s *AgentSession) Steer(text string) error
func (*AgentSession) SteerWithImages ¶
func (s *AgentSession) SteerWithImages(text string, images []llm.ContentPart) error
func (*AgentSession) Subscribe ¶
func (s *AgentSession) Subscribe(listener AgentSessionEventListener) func()
type AgentSessionBashOptions ¶
type AgentSessionBashOptions struct {
OnChunk func(string)
ExcludeFromContext bool
Operations BashOperations
Context context.Context
}
type AgentSessionBashRecordOptions ¶
type AgentSessionBashRecordOptions struct {
ExcludeFromContext bool
}
type AgentSessionCompactionSummarizer ¶
type AgentSessionCompactionSummarizer func(preparation agentharness.CompactionPreparation, customInstructions string) (agentharness.CompactionResult, error)
type AgentSessionContextResourceLoader ¶
type AgentSessionContextResourceLoader interface {
GetAgentsFiles() ResourceAgentsFilesResult
}
type AgentSessionEvent ¶
type AgentSessionEvent struct {
Type string `json:"type"`
Reason string `json:"reason,omitempty"`
Result *agentharness.CompactionResult `json:"result,omitempty"`
Aborted bool `json:"aborted,omitempty"`
WillRetry bool `json:"willRetry,omitempty"`
ErrorMessage string `json:"errorMessage,omitempty"`
Message *llm.Message `json:"message,omitempty"`
Attempt int `json:"attempt,omitempty"`
MaxAttempts int `json:"maxAttempts,omitempty"`
DelayMs int `json:"delayMs,omitempty"`
Success bool `json:"success,omitempty"`
FinalError string `json:"finalError,omitempty"`
Steering []string `json:"steering,omitempty"`
FollowUp []string `json:"followUp,omitempty"`
AssistantMessageEvent *llm.AssistantMessageEvent `json:"assistantMessageEvent,omitempty"`
ToolCallID string `json:"toolCallId,omitempty"`
ToolName string `json:"toolName,omitempty"`
Args map[string]any `json:"args,omitempty"`
ToolResult *llm.Message `json:"toolResult,omitempty"`
PartialToolResult *llm.Message `json:"partialToolResult,omitempty"`
Name string `json:"name,omitempty"`
}
type AgentSessionEventListener ¶
type AgentSessionEventListener func(AgentSessionEvent)
type AgentSessionForkMessage ¶
type AgentSessionForkResult ¶
type AgentSessionForkResult struct {
Cancelled bool
SelectedText string
Session *AgentSession
}
type AgentSessionNavigateTreeOptions ¶
type AgentSessionNavigateTreeOptions struct {
}
type AgentSessionNavigateTreeResult ¶
type AgentSessionNavigateTreeResult struct {
}
type AgentSessionOptions ¶
type AgentSessionOptions struct {
CWD string
AgentDir string
Model llm.Model
ThinkingLevel string
Preflight AgentSessionPreflight
SessionManager *SessionManager
ResourceLoader AgentSessionResourceLoader
CompactionSettings *agentharness.CompactionSettings
CompactionSummarizer AgentSessionCompactionSummarizer
BranchSummarizer AgentSessionBranchSummarizer
RetrySettings *AgentSessionRetrySettings
AutoCompactionRunner AgentSessionAutoCompactionRunner
AgentContinue func() error
Responder AgentSessionResponder
StreamResponder AgentSessionStreamResponder
CustomTools []SDKTool
ScopedModels []ScopedModel
Tools []string
ToolsSet bool
NoTools string
}
type AgentSessionPreflight ¶
type AgentSessionPromptResourceLoader ¶
type AgentSessionPromptResourceLoader interface {
GetPrompts() ResourcePromptsResult
}
type AgentSessionResourceLoader ¶
type AgentSessionResourceLoader interface {
GetSkills() AgentSessionSkillsResult
}
type AgentSessionResponder ¶
type AgentSessionRetrySettings ¶
func DefaultAgentSessionRetrySettings ¶
func DefaultAgentSessionRetrySettings() AgentSessionRetrySettings
type AgentSessionRuntimeEventListener ¶
type AgentSessionRuntimeEventListener func(ProtocolSessionEvent) error
type AgentSessionRuntimeForkOptions ¶
type AgentSessionRuntimeForkOptions struct {
Position string
WithSession func(ProtocolCommandContext) error
}
type AgentSessionRuntimeHost ¶
type AgentSessionRuntimeHost struct {
Session *AgentSession
ExtensionRuntime *ProtocolExtensionRuntime
BeforeSessionInvalidate func()
RebindSession func(*AgentSession) error
// contains filtered or unexported fields
}
func NewAgentSessionRuntimeHost ¶
func NewAgentSessionRuntimeHost(session *AgentSession, extensionRuntime *ProtocolExtensionRuntime) (*AgentSessionRuntimeHost, error)
func (*AgentSessionRuntimeHost) Fork ¶
func (h *AgentSessionRuntimeHost) Fork(entryID string, options ...AgentSessionRuntimeForkOptions) (AgentSessionForkResult, error)
func (*AgentSessionRuntimeHost) NewSession ¶
func (h *AgentSessionRuntimeHost) NewSession(options ...ProtocolNewSessionOptions) (AgentSessionRuntimeSwitchResult, error)
func (*AgentSessionRuntimeHost) OnSessionEvent ¶
func (h *AgentSessionRuntimeHost) OnSessionEvent(listener AgentSessionRuntimeEventListener) func()
func (*AgentSessionRuntimeHost) Reload ¶
func (h *AgentSessionRuntimeHost) Reload() error
func (*AgentSessionRuntimeHost) SetBeforeSessionInvalidate ¶
func (h *AgentSessionRuntimeHost) SetBeforeSessionInvalidate(callback func())
func (*AgentSessionRuntimeHost) SetExtensionRuntime ¶
func (h *AgentSessionRuntimeHost) SetExtensionRuntime(extensionRuntime *ProtocolExtensionRuntime)
func (*AgentSessionRuntimeHost) SetRebindSession ¶
func (h *AgentSessionRuntimeHost) SetRebindSession(callback func(*AgentSession) error)
func (*AgentSessionRuntimeHost) SwitchSession ¶
func (h *AgentSessionRuntimeHost) SwitchSession(sessionFile string, options ...ProtocolSwitchSessionOptions) (AgentSessionRuntimeSwitchResult, error)
type AgentSessionRuntimeOptions ¶
type AgentSessionRuntimeOptions struct {
CWD string
AgentDir string
SessionManager *SessionManager
}
type AgentSessionRuntimeSwitchResult ¶
type AgentSessionRuntimeSwitchResult struct {
Cancelled bool `json:"cancelled"`
}
type AgentSessionSkillsResult ¶
type AgentSessionSkillsResult struct {
Skills []agentharness.Skill
Diagnostics []agentharness.SkillDiagnostic
}
type AgentSessionStats ¶
type AgentSessionStats struct {
Tokens llm.Usage `json:"tokens"`
ContextUsage *AgentContextUsage `json:"contextUsage,omitempty"`
}
type AllModelRegistry ¶
type AllModelRegistry = modelresolver.AllModelRegistry
type AnthropicSubscriptionWarningChecker ¶
type AnthropicSubscriptionWarningChecker struct {
Shown bool
Settings AnthropicWarningSettings
AuthStorage *AuthStorage
GetAPIKeyForProvider func(provider string) (string, bool)
}
func (*AnthropicSubscriptionWarningChecker) MaybeWarn ¶
func (c *AnthropicSubscriptionWarningChecker) MaybeWarn(modelProvider string) bool
type AnthropicWarningSettings ¶
type AnthropicWarningSettings struct {
AnthropicExtraUsage *bool
}
type AssistantContentBlock ¶
type AssistantMessageComponent ¶
type AssistantMessageComponent struct {
Content []AssistantContentBlock
HideThinkingBlock bool
HiddenThinkingLabel string
}
func NewAssistantMessageComponent ¶
func NewAssistantMessageComponent(content []AssistantContentBlock) AssistantMessageComponent
func (AssistantMessageComponent) Render ¶
func (c AssistantMessageComponent) Render(width int) []string
type AuthCredential ¶
type AuthSelectorProvider ¶
type AuthStatus ¶
type AuthStatusResolver ¶
type AuthStatusResolver func(providerID string) AuthStatus
type AuthStorage ¶
type AuthStorage struct {
// contains filtered or unexported fields
}
func NewAuthStorage ¶
func NewAuthStorage(authPath string) *AuthStorage
func NewAuthStorageFromBackend ¶
func NewAuthStorageFromBackend(storage AuthStorageBackend) *AuthStorage
func NewInMemoryAuthStorage ¶
func NewInMemoryAuthStorage(data AuthStorageData) *AuthStorage
func (*AuthStorage) DrainErrors ¶
func (s *AuthStorage) DrainErrors() []error
func (*AuthStorage) Get ¶
func (s *AuthStorage) Get(provider string) (AuthCredential, bool)
func (*AuthStorage) GetAPIKeyWithOptions ¶
func (s *AuthStorage) GetAPIKeyWithOptions(provider string, options AuthStorageOptions) (string, bool)
func (*AuthStorage) GetAll ¶
func (s *AuthStorage) GetAll() AuthStorageData
func (*AuthStorage) GetAuthStatus ¶
func (s *AuthStorage) GetAuthStatus(provider string) AuthStatus
func (*AuthStorage) Has ¶
func (s *AuthStorage) Has(provider string) bool
func (*AuthStorage) HasAuth ¶
func (s *AuthStorage) HasAuth(provider string) bool
func (*AuthStorage) List ¶
func (s *AuthStorage) List() []string
func (*AuthStorage) Reload ¶
func (s *AuthStorage) Reload()
func (*AuthStorage) Remove ¶
func (s *AuthStorage) Remove(provider string)
func (*AuthStorage) RemoveRuntimeAPIKey ¶
func (s *AuthStorage) RemoveRuntimeAPIKey(provider string)
func (*AuthStorage) Set ¶
func (s *AuthStorage) Set(provider string, credential AuthCredential)
func (*AuthStorage) SetFallbackResolver ¶
func (s *AuthStorage) SetFallbackResolver(resolver func(provider string) string)
func (*AuthStorage) SetRuntimeAPIKey ¶
func (s *AuthStorage) SetRuntimeAPIKey(provider, apiKey string)
type AuthStorageBackend ¶
type AuthStorageBackend interface {
WithLock(fn AuthStorageLockFunc) error
}
type AuthStorageData ¶
type AuthStorageData map[string]AuthCredential
type AuthStorageLockFunc ¶
type AuthStorageOptions ¶
type AuthStorageOptions struct {
IncludeFallback bool
}
type AutocompleteEditor ¶
type AutocompleteEditor interface {
SetAutocompleteProvider(AutocompleteProvider)
}
type AutocompleteProvider ¶
type AutocompleteProviderFactory ¶
type AutocompleteProviderFactory func(AutocompleteProvider) AutocompleteProvider
type BashExecOptions ¶
type BashExecutionComponent ¶
type BashExecutionComponent struct {
// contains filtered or unexported fields
}
func NewBashExecutionComponent ¶
func NewBashExecutionComponent(command string, options ...BashExecutionOptions) *BashExecutionComponent
func (*BashExecutionComponent) AppendOutput ¶
func (b *BashExecutionComponent) AppendOutput(chunk string)
func (*BashExecutionComponent) GetCommand ¶
func (b *BashExecutionComponent) GetCommand() string
func (*BashExecutionComponent) GetOutput ¶
func (b *BashExecutionComponent) GetOutput() string
func (*BashExecutionComponent) Invalidate ¶
func (b *BashExecutionComponent) Invalidate()
func (*BashExecutionComponent) Output ¶
func (b *BashExecutionComponent) Output() string
func (*BashExecutionComponent) Render ¶
func (b *BashExecutionComponent) Render(width int) []string
func (*BashExecutionComponent) SetComplete ¶
func (b *BashExecutionComponent) SetComplete(exitCode int, cancelled bool, options ...BashExecutionCompleteOptions)
func (*BashExecutionComponent) SetExpanded ¶
func (b *BashExecutionComponent) SetExpanded(expanded bool)
type BashExecutionOptions ¶
type BashExecutionOptions struct {
ExcludeFromContext bool
}
type BashExecutorOptions ¶
type BashLocalOperationsOptions ¶
type BashLocalOperationsOptions struct {
ShellPath string
}
type BashOperationResult ¶
type BashOperations ¶
type BashOperations struct {
Exec func(command, cwd string, options BashExecOptions) (BashOperationResult, error)
}
func CreateLocalBashOperations ¶
func CreateLocalBashOperations(options ...BashLocalOperationsOptions) BashOperations
type BashResult ¶
type BashResult struct {
Output string `json:"output"`
ExitCode int `json:"exitCode"`
Cancelled bool `json:"cancelled"`
Truncated bool `json:"truncated"`
TruncatedBy string `json:"truncatedBy,omitempty"`
FullOutputPath string `json:"fullOutputPath,omitempty"`
TotalLines int `json:"totalLines,omitempty"`
TotalBytes int `json:"totalBytes,omitempty"`
OutputLines int `json:"outputLines,omitempty"`
OutputBytes int `json:"outputBytes,omitempty"`
LastLinePartial bool `json:"lastLinePartial,omitempty"`
}
func ExecuteBash ¶
func ExecuteBash(command, cwd string, options ...BashExecutorOptions) (BashResult, error)
func ExecuteBashWithOperations ¶
func ExecuteBashWithOperations(command, cwd string, operations BashOperations, options ...BashExecutorOptions) (BashResult, error)
type BashTool ¶
type BashTool struct {
// contains filtered or unexported fields
}
func NewBashTool ¶
func NewBashTool(cwd string, options ...BashToolOptions) BashTool
func (BashTool) Execute ¶
func (t BashTool) Execute(_ string, input BashToolInput) (FileToolResult, error)
func (BashTool) ExecuteWithUpdates ¶
func (t BashTool) ExecuteWithUpdates(_ string, input BashToolInput, onUpdate func(FileToolResult)) (FileToolResult, error)
type BashToolInput ¶
type BashToolOptions ¶
type BashToolOptions struct {
CommandPrefix string
Operations BashOperations
ShellPath string
}
type BorderedLoaderComponent ¶
type BorderedLoaderComponent struct {
gitui.FocusState
OnAbort func()
// contains filtered or unexported fields
}
func NewBorderedLoaderComponent ¶
func NewBorderedLoaderComponent(ui *gitui.TUI, message string, options ...BorderedLoaderOptions) *BorderedLoaderComponent
func NewNonCancellableBorderedLoaderComponent ¶
func NewNonCancellableBorderedLoaderComponent(ui *gitui.TUI, message string) *BorderedLoaderComponent
func (*BorderedLoaderComponent) Aborted ¶
func (c *BorderedLoaderComponent) Aborted() bool
func (*BorderedLoaderComponent) Cancelled ¶
func (c *BorderedLoaderComponent) Cancelled() bool
func (*BorderedLoaderComponent) Context ¶
func (c *BorderedLoaderComponent) Context() context.Context
func (*BorderedLoaderComponent) Dispose ¶
func (c *BorderedLoaderComponent) Dispose()
func (*BorderedLoaderComponent) HandleInput ¶
func (c *BorderedLoaderComponent) HandleInput(data string)
func (*BorderedLoaderComponent) Invalidate ¶
func (c *BorderedLoaderComponent) Invalidate()
func (*BorderedLoaderComponent) Render ¶
func (c *BorderedLoaderComponent) Render(width int) []string
func (*BorderedLoaderComponent) SetOnAbort ¶
func (c *BorderedLoaderComponent) SetOnAbort(fn func())
func (*BorderedLoaderComponent) Signal ¶
func (c *BorderedLoaderComponent) Signal() context.Context
type BorderedLoaderOptions ¶
type BorderedLoaderOptions struct {
Cancellable *bool
}
type BuildSystemPromptOptions ¶
type BuildSystemPromptOptions struct {
CustomPrompt string
SelectedTools []string
ToolSnippets map[string]string
PromptGuidelines []string
AppendSystemPrompt string
CWD string
ContextFiles []SystemPromptContextFile
Skills []SystemPromptSkill
DocumentationPaths []SystemPromptDocumentationPath
Now time.Time
}
type CLIConfigRuntimeHost ¶
type CLIConfigRuntimeHost interface {
Run() error
}
type CLIInteractiveRuntimeHost ¶
type CLIInteractiveRuntimeHost interface {
Run() error
}
type CLIInteractiveTUIHost ¶
type CLIInteractiveTUIHost struct {
// contains filtered or unexported fields
}
func NewCLIInteractiveTUIHost ¶
func NewCLIInteractiveTUIHost(options CLIInteractiveTUIHostOptions) (*CLIInteractiveTUIHost, error)
func (*CLIInteractiveTUIHost) AvailableTUIThemes ¶
func (h *CLIInteractiveTUIHost) AvailableTUIThemes() []TUIThemeInfo
func (*CLIInteractiveTUIHost) CurrentTUITheme ¶
func (h *CLIInteractiveTUIHost) CurrentTUITheme() string
func (*CLIInteractiveTUIHost) EditorCursor ¶
func (h *CLIInteractiveTUIHost) EditorCursor() (line, col int, ok bool)
func (*CLIInteractiveTUIHost) EditorCustomActive ¶
func (h *CLIInteractiveTUIHost) EditorCustomActive() bool
func (*CLIInteractiveTUIHost) EditorFocused ¶
func (h *CLIInteractiveTUIHost) EditorFocused() bool
func (*CLIInteractiveTUIHost) FocusEditor ¶
func (h *CLIInteractiveTUIHost) FocusEditor() error
func (*CLIInteractiveTUIHost) InsertEditorText ¶
func (h *CLIInteractiveTUIHost) InsertEditorText(text string)
func (*CLIInteractiveTUIHost) PasteEditorText ¶
func (h *CLIInteractiveTUIHost) PasteEditorText(text string)
func (*CLIInteractiveTUIHost) ReadEditorText ¶
func (h *CLIInteractiveTUIHost) ReadEditorText() string
func (*CLIInteractiveTUIHost) Run ¶
func (h *CLIInteractiveTUIHost) Run() error
func (*CLIInteractiveTUIHost) RunContext ¶
func (h *CLIInteractiveTUIHost) RunContext(ctx context.Context) (runErr error)
func (*CLIInteractiveTUIHost) RunTUIDialog ¶
func (h *CLIInteractiveTUIHost) RunTUIDialog(request TUIDialogRequest) (TUIDialogResult, error)
func (*CLIInteractiveTUIHost) SetEditorText ¶
func (h *CLIInteractiveTUIHost) SetEditorText(text string)
func (*CLIInteractiveTUIHost) SetHiddenThinkingLabel ¶
func (h *CLIInteractiveTUIHost) SetHiddenThinkingLabel(label string) error
func (*CLIInteractiveTUIHost) SetTUIStatus ¶
func (h *CLIInteractiveTUIHost) SetTUIStatus(key, text string) error
func (*CLIInteractiveTUIHost) SetTUITheme ¶
func (h *CLIInteractiveTUIHost) SetTUITheme(name string) error
func (*CLIInteractiveTUIHost) SetTUITitle ¶
func (h *CLIInteractiveTUIHost) SetTUITitle(title string) error
func (*CLIInteractiveTUIHost) SetTUIToolsExpanded ¶
func (h *CLIInteractiveTUIHost) SetTUIToolsExpanded(expanded bool) error
func (*CLIInteractiveTUIHost) SetTUIWorking ¶
func (h *CLIInteractiveTUIHost) SetTUIWorking(update TUIWorkingUpdate) error
func (*CLIInteractiveTUIHost) Stop ¶
func (h *CLIInteractiveTUIHost) Stop()
func (*CLIInteractiveTUIHost) SubmitEditorText ¶
func (h *CLIInteractiveTUIHost) SubmitEditorText() error
func (*CLIInteractiveTUIHost) TUIToolsExpanded ¶
func (h *CLIInteractiveTUIHost) TUIToolsExpanded() bool
type CLIInteractiveTUIHostOptions ¶
type CLIInteractiveTUIHostOptions struct {
RuntimeHost PrintModeRuntimeHost
InitialMessage string
InitialImages []llm.ContentPart
Messages []string
Terminal gitui.Terminal
ViewTreeHost *ViewTreeHost
InProcessUI *InProcessUIRegistry
ClipboardCopy func(string) error
ClipboardImageRead func() *ClipboardImage
ClipboardImageDir string
Suspend InteractiveSuspendOperations
TmuxOptionReader TmuxOptionReader
VerboseStartup bool
ExitAfterInitial bool
ClearScreenOnStart bool
Version string
PackageName string
InstallEnvironment InstallEnvironment
VersionCheck VersionReleaseChecker
VersionCheckOptions VersionCheckOptions
PackageUpdateCheck PackageUpdateChecker
BashOperations BashOperations
ShutdownSignals <-chan os.Signal
StartupWarnings []string
}
type CLIOptions ¶
type CLIOptions struct {
Args []string
Stdout io.Writer
Stderr io.Writer
Stdin io.Reader
CWD string
AgentDir string
Startup func(stderr io.Writer) error
PrintModeHostFactory func(Args) (PrintModeRuntimeHost, error)
InteractiveHostFactory func(Args) (CLIInteractiveRuntimeHost, error)
ConfigHostFactory func(PackageResourceConfigOptions) (CLIConfigRuntimeHost, error)
ModelRegistry *ModelRegistry
PackageManager *DefaultPackageManager
PackageName string
Version string
InstallEnvironment InstallEnvironment
VersionCheck VersionReleaseChecker
VersionCheckOptions VersionCheckOptions
StartupWarnings []string
Responder AgentSessionResponder
}
type CLIStartupMigrationResult ¶
type CLIStartupMigrationResult struct {
StartupWarnings []string
}
type ClipboardCopyOperations ¶
type ClipboardCopyOperations = clip.ClipboardCopyOperations
type ClipboardCopyOptions ¶
type ClipboardCopyOptions = clip.ClipboardCopyOptions
type ClipboardImage ¶
type ClipboardImage = clip.ClipboardImage
func ReadClipboardImage ¶
func ReadClipboardImage(options ClipboardImageOptions) *ClipboardImage
type ClipboardImageCommandOptions ¶
type ClipboardImageCommandOptions = clip.ClipboardImageCommandOptions
type ClipboardImageCommandResult ¶
type ClipboardImageCommandResult = clip.ClipboardImageCommandResult
type ClipboardImageOperations ¶
type ClipboardImageOperations = clip.ClipboardImageOperations
type ClipboardImageOptions ¶
type ClipboardImageOptions = clip.ClipboardImageOptions
type ClipboardTextCommandOptions ¶
type ClipboardTextCommandOptions = clip.ClipboardTextCommandOptions
type CodingAgentFauxState ¶
type CodingAgentTestHarness ¶
type CodingAgentTestHarness struct {
Session *AgentSession
SessionManager *SessionManager
Faux *CodingAgentFauxState
Events []AgentSessionEvent
TempDir string
ExtensionRuntime *ProtocolExtensionRuntime
}
func NewCodingAgentTestHarness ¶
func NewCodingAgentTestHarness(options CodingAgentTestHarnessOptions) (*CodingAgentTestHarness, error)
func NewCodingAgentTestHarnessWithProtocolExtensions ¶
func NewCodingAgentTestHarnessWithProtocolExtensions(options CodingAgentTestHarnessOptions, factories []ProtocolExtensionFactory) (*CodingAgentTestHarness, error)
func (*CodingAgentTestHarness) Cleanup ¶
func (h *CodingAgentTestHarness) Cleanup()
func (*CodingAgentTestHarness) EventsOfType ¶
func (h *CodingAgentTestHarness) EventsOfType(eventType string) []AgentSessionEvent
func (*CodingAgentTestHarness) Messages ¶
func (h *CodingAgentTestHarness) Messages() []llm.Message
type CodingAgentTestHarnessOptions ¶
type CodingAgentTestHarnessOptions struct {
Responses []CodingAgentTestHarnessResponse
Model llm.Model
RetrySettings *AgentSessionRetrySettings
Tools []SDKTool
}
type CodingAgentTestHarnessResponse ¶
type CodingAgentTestHarnessResponse struct {
Text *string
Thinking string
ToolCalls []CodingAgentTestHarnessToolCall
StopReason string
Error string
Usage *llm.Usage
Model *CodingAgentTestHarnessModelOverride
}
func TextHarnessResponse ¶
func TextHarnessResponse(text string) CodingAgentTestHarnessResponse
type CodingModelRegistry ¶
type CodingModelRegistry = modelresolver.CodingModelRegistry
type ConfiguredPackage ¶
type ConvertedImage ¶
type ConvertedImage = imageresize.ConvertedImage
func ConvertToPNG ¶
func ConvertToPNG(base64Data, mimeType string) *ConvertedImage
type CreateAgentSessionRuntimeFactory ¶
type CreateAgentSessionRuntimeFactory func(AgentSessionRuntimeOptions) (any, error)
type DefaultAgentSessionResourceLoader ¶
type DefaultAgentSessionResourceLoader struct {
// contains filtered or unexported fields
}
func NewDefaultAgentSessionResourceLoader ¶
func NewDefaultAgentSessionResourceLoader(cwd, agentDir string) *DefaultAgentSessionResourceLoader
func (*DefaultAgentSessionResourceLoader) GetAgentsFiles ¶
func (l *DefaultAgentSessionResourceLoader) GetAgentsFiles() ResourceAgentsFilesResult
func (*DefaultAgentSessionResourceLoader) GetAppendSystemPrompt ¶
func (l *DefaultAgentSessionResourceLoader) GetAppendSystemPrompt() string
func (*DefaultAgentSessionResourceLoader) GetPrompts ¶
func (l *DefaultAgentSessionResourceLoader) GetPrompts() ResourcePromptsResult
func (*DefaultAgentSessionResourceLoader) GetSkills ¶
func (l *DefaultAgentSessionResourceLoader) GetSkills() AgentSessionSkillsResult
func (*DefaultAgentSessionResourceLoader) GetSystemPrompt ¶
func (l *DefaultAgentSessionResourceLoader) GetSystemPrompt() string
type DefaultPackageManager ¶
type DefaultPackageManager struct {
// contains filtered or unexported fields
}
func NewDefaultPackageManager ¶
func NewDefaultPackageManager(options PackageManagerOptions) *DefaultPackageManager
func (*DefaultPackageManager) CheckForAvailableUpdates ¶
func (m *DefaultPackageManager) CheckForAvailableUpdates() ([]PackageUpdate, error)
func (*DefaultPackageManager) GetInstalledPath ¶
func (m *DefaultPackageManager) GetInstalledPath(source, scope string) string
func (*DefaultPackageManager) GetPackageIdentity ¶
func (m *DefaultPackageManager) GetPackageIdentity(source string) string
func (*DefaultPackageManager) Install ¶
func (m *DefaultPackageManager) Install(source string, project bool) error
func (*DefaultPackageManager) ListConfiguredPackages ¶
func (m *DefaultPackageManager) ListConfiguredPackages() []ConfiguredPackage
func (*DefaultPackageManager) ListPackageResourceToggles ¶
func (m *DefaultPackageManager) ListPackageResourceToggles() ([]PackageResourceToggleItem, error)
func (*DefaultPackageManager) ListResourceToggles ¶
func (m *DefaultPackageManager) ListResourceToggles() ([]PackageResourceToggleItem, error)
func (*DefaultPackageManager) ListTopLevelResourceToggles ¶
func (m *DefaultPackageManager) ListTopLevelResourceToggles() []PackageResourceToggleItem
func (*DefaultPackageManager) ParseSource ¶
func (m *DefaultPackageManager) ParseSource(source string) PackageSource
func (*DefaultPackageManager) Remove ¶
func (m *DefaultPackageManager) Remove(source string, project bool) error
func (*DefaultPackageManager) RemoveAndPersist ¶
func (m *DefaultPackageManager) RemoveAndPersist(source string, project bool) (bool, error)
func (*DefaultPackageManager) ResolveConfiguredProtocolPackageResources ¶
func (m *DefaultPackageManager) ResolveConfiguredProtocolPackageResources() (ProtocolPackageResources, error)
func (*DefaultPackageManager) ResolveExtensionSources ¶
func (m *DefaultPackageManager) ResolveExtensionSources(sources []string, options ResolveExtensionSourcesOptions) ([]string, error)
func (*DefaultPackageManager) ResolveProtocolPackageResources ¶
func (m *DefaultPackageManager) ResolveProtocolPackageResources(sources []string) (ProtocolPackageResources, error)
func (*DefaultPackageManager) ResolveProtocolPackageSourceSpecs ¶
func (m *DefaultPackageManager) ResolveProtocolPackageSourceSpecs(specs []ProtocolPackageSourceSpec) (ProtocolPackageResources, error)
func (*DefaultPackageManager) RunSelfUpdate ¶
func (m *DefaultPackageManager) RunSelfUpdate(options SelfUpdateOptions) (SelfUpdateResult, error)
func (*DefaultPackageManager) SetPackageResourceEnabled ¶
func (m *DefaultPackageManager) SetPackageResourceEnabled(toggle PackageResourceToggle) (bool, error)
func (*DefaultPackageManager) SetProgressCallback ¶
func (m *DefaultPackageManager) SetProgressCallback(callback func(PackageProgressEvent))
func (*DefaultPackageManager) SetTopLevelResourceEnabled ¶
func (m *DefaultPackageManager) SetTopLevelResourceEnabled(toggle TopLevelResourceToggle) (bool, error)
func (*DefaultPackageManager) Update ¶
func (m *DefaultPackageManager) Update(sources ...string) error
type DefaultResourceLoader ¶
type DefaultResourceLoader struct {
// contains filtered or unexported fields
}
func NewDefaultResourceLoader ¶
func NewDefaultResourceLoader(options DefaultResourceLoaderOptions) *DefaultResourceLoader
func (*DefaultResourceLoader) ApplyExtensionFlagValues ¶
func (l *DefaultResourceLoader) ApplyExtensionFlagValues(values map[string]any, allowDeferred bool) []ProtocolExtensionDiscoveryError
func (*DefaultResourceLoader) ExtendResources ¶
func (l *DefaultResourceLoader) ExtendResources(resources ResourceExtension)
func (*DefaultResourceLoader) GetAgentsFiles ¶
func (l *DefaultResourceLoader) GetAgentsFiles() ResourceAgentsFilesResult
func (*DefaultResourceLoader) GetAppendSystemPrompt ¶
func (l *DefaultResourceLoader) GetAppendSystemPrompt() string
func (*DefaultResourceLoader) GetExtensions ¶
func (l *DefaultResourceLoader) GetExtensions() ResourceExtensionsResult
func (*DefaultResourceLoader) GetPrompts ¶
func (l *DefaultResourceLoader) GetPrompts() ResourcePromptsResult
func (*DefaultResourceLoader) GetSkills ¶
func (l *DefaultResourceLoader) GetSkills() ResourceSkillsResult
func (*DefaultResourceLoader) GetSystemPrompt ¶
func (l *DefaultResourceLoader) GetSystemPrompt() string
func (*DefaultResourceLoader) GetThemes ¶
func (l *DefaultResourceLoader) GetThemes() ResourceThemesResult
func (*DefaultResourceLoader) Reload ¶
func (l *DefaultResourceLoader) Reload()
type DefaultResourceLoaderOptions ¶
type DefaultResourceLoaderOptions struct {
CWD string
AgentDir string
SettingsManager *SettingsManager
NoExtensions bool
NoContextFiles bool
NoSkills bool
NoPromptTemplates bool
NoThemes bool
AdditionalExtensionPaths []string
AdditionalSkillPaths []string
AdditionalPromptPaths []string
AdditionalThemePaths []string
SystemPrompt string
AppendSystemPrompt []string
SkillsOverride func() ResourceSkillsResult
SystemPromptOverride func() string
ExtensionFactories []ProtocolExtensionFactory
}
type Diagnostic ¶
type Diagnostic = internalcli.Diagnostic
type EditDiffResult ¶
type EditDiffResult struct {
Diff string `json:"diff,omitempty"`
Error string `json:"error,omitempty"`
}
func ComputeEditsDiff ¶
func ComputeEditsDiff(path string, edits []Edit, cwd string, operations ...FileToolOperations) EditDiffResult
type EditTool ¶
type EditTool struct {
// contains filtered or unexported fields
}
func NewEditTool ¶
func NewEditTool(cwd string, operations ...FileToolOperations) EditTool
func (EditTool) Execute ¶
func (t EditTool) Execute(_ string, input EditToolInput) (FileToolResult, error)
type EditToolInput ¶
type ExportHTMLOptions ¶
type ExportHTMLOptions struct {
ThemeName string
AgentDir string
ToolRenderer ExportHTMLToolRenderer
}
type ExportHTMLRenderedTool ¶
type ExportHTMLSessionData ¶
type ExportHTMLSessionData struct {
Header *SessionHeader `json:"header,omitempty"`
Entries []FileEntry `json:"entries"`
LeafID *string `json:"leafId"`
SystemPrompt string `json:"systemPrompt,omitempty"`
Tools []ExportHTMLToolDefinition `json:"tools,omitempty"`
RenderedTools map[string]ExportHTMLRenderedTool `json:"renderedTools,omitempty"`
}
func BuildExportHTMLSessionData ¶
func BuildExportHTMLSessionData(sessionManager *SessionManager) ExportHTMLSessionData
func BuildExportHTMLSessionDataWithOptions ¶
func BuildExportHTMLSessionDataWithOptions(sessionManager *SessionManager, options ExportHTMLOptions) ExportHTMLSessionData
type ExportHTMLSidebarEntry ¶
func ExportHTMLSidebarEntriesForUserMessage ¶
func ExportHTMLSidebarEntriesForUserMessage(text string) []ExportHTMLSidebarEntry
type ExportHTMLSkillBlock ¶
func ParseExportHTMLSkillBlock ¶
func ParseExportHTMLSkillBlock(text string) (ExportHTMLSkillBlock, bool)
type ExportHTMLToolRenderer ¶
type ExportHTMLToolRenderer interface {
RenderCall(toolCallID, toolName string, args any) string
RenderResult(toolCallID, toolName string, result FileToolResult, isError bool) ExportHTMLToolRenderResult
}
func CreateToolHTMLRenderer ¶
func CreateToolHTMLRenderer(deps ExportHTMLToolRendererDeps) ExportHTMLToolRenderer
type ExtensionSelectorComponent ¶
type ExtensionSelectorComponent struct {
OnSelect func(option string)
OnCancel func()
// contains filtered or unexported fields
}
func NewExtensionSelectorComponent ¶
func NewExtensionSelectorComponent(title string, options []string) *ExtensionSelectorComponent
func (*ExtensionSelectorComponent) Focused ¶
func (c *ExtensionSelectorComponent) Focused() bool
func (*ExtensionSelectorComponent) HandleInput ¶
func (c *ExtensionSelectorComponent) HandleInput(input string)
func (*ExtensionSelectorComponent) Invalidate ¶
func (c *ExtensionSelectorComponent) Invalidate()
func (*ExtensionSelectorComponent) Render ¶
func (c *ExtensionSelectorComponent) Render(width int) []string
func (*ExtensionSelectorComponent) SetFocused ¶
func (c *ExtensionSelectorComponent) SetFocused(focused bool)
func (*ExtensionSelectorComponent) SetTitle ¶
func (c *ExtensionSelectorComponent) SetTitle(title string)
func (*ExtensionSelectorComponent) Title ¶
func (c *ExtensionSelectorComponent) Title() string
type FSWatchListener ¶
type FSWatchListener = fswatch.FSWatchListener
type FSWatchOptions ¶
type FSWatchOptions = fswatch.FSWatchOptions
type FSWatcher ¶
func WatchPathsWithErrorHandler ¶
func WatchPathsWithErrorHandler(paths []string, listener FSWatchListener, onError func(), options ...FSWatchOptions) FSWatcher
func WatchWithErrorHandler ¶
func WatchWithErrorHandler(path string, listener FSWatchListener, onError func(), options ...FSWatchOptions) FSWatcher
type FileAuthStorageBackend ¶
type FileAuthStorageBackend struct {
// contains filtered or unexported fields
}
func NewFileAuthStorageBackend ¶
func NewFileAuthStorageBackend(authPath string) *FileAuthStorageBackend
func (*FileAuthStorageBackend) WithLock ¶
func (b *FileAuthStorageBackend) WithLock(fn AuthStorageLockFunc) error
type FileEntry ¶
type FileEntry struct {
Type string
ID string
Version int
Timestamp string
CWD string
ParentSession string
ParentID *string
Message any
ThinkingLevel string
Provider string
ModelID string
Summary string
FirstKeptID string
TokensBefore int
CustomType string
Data any
Content any
Display bool
Details any
FromHook bool
TargetID string
Label string
Name string
FromID string
// contains filtered or unexported fields
}
func LoadEntriesFromFile ¶
func (FileEntry) MarshalJSON ¶
func (*FileEntry) UnmarshalJSON ¶
type FileToolDetails ¶
type FileToolDetails struct {
Truncation *ReadToolTruncation `json:"truncation,omitempty"`
Diff string `json:"diff,omitempty"`
FirstChangedLine int `json:"firstChangedLine,omitempty"`
FullOutputPath string `json:"fullOutputPath,omitempty"`
MatchLimitReached int `json:"matchLimitReached,omitempty"`
ResultLimitReached int `json:"resultLimitReached,omitempty"`
EntryLimitReached int `json:"entryLimitReached,omitempty"`
SearchLinesTruncated bool `json:"searchLinesTruncated,omitempty"`
}
type FileToolOperations ¶
type FileToolOperations struct {
Access func(path string) error
ReadFile func(path string) ([]byte, error)
WriteFile func(path string, content []byte) error
MkdirAll func(path string) error
ResizeImage func(part llm.ContentPart, options ImageResizeOptions) *ResizedImage
}
type FileToolResult ¶
type FileToolResult struct {
Text string
Content []llm.ContentPart
Details *FileToolDetails
}
type FindInitialModelOptions ¶
type FindInitialModelOptions = modelresolver.FindInitialModelOptions
type FindTool ¶
type FindTool struct {
// contains filtered or unexported fields
}
func NewFindTool ¶
func (FindTool) Execute ¶
func (t FindTool) Execute(_ string, input FindToolInput) (FileToolResult, error)
type FindToolInput ¶
type FooterComponent ¶
type FooterComponent struct {
// contains filtered or unexported fields
}
func NewFooterComponent ¶
func NewFooterComponent(state FooterState) *FooterComponent
func (*FooterComponent) Invalidate ¶
func (f *FooterComponent) Invalidate()
func (*FooterComponent) Render ¶
func (f *FooterComponent) Render(width int) []string
func (*FooterComponent) SetAutoCompactEnabled ¶
func (f *FooterComponent) SetAutoCompactEnabled(enabled bool)
func (*FooterComponent) SetState ¶
func (f *FooterComponent) SetState(state FooterState)
type FooterDataProvider ¶
type FooterDataProvider struct {
// contains filtered or unexported fields
}
func NewFooterDataProvider ¶
func NewFooterDataProvider(cwd string, options ...FooterDataProviderOptions) *FooterDataProvider
func (*FooterDataProvider) ClearExtensionStatuses ¶
func (p *FooterDataProvider) ClearExtensionStatuses()
func (*FooterDataProvider) Dispose ¶
func (p *FooterDataProvider) Dispose()
func (*FooterDataProvider) GetAvailableProviderCount ¶
func (p *FooterDataProvider) GetAvailableProviderCount() int
func (*FooterDataProvider) GetExtensionStatuses ¶
func (p *FooterDataProvider) GetExtensionStatuses() map[string]string
func (*FooterDataProvider) GetGitBranch ¶
func (p *FooterDataProvider) GetGitBranch() string
func (*FooterDataProvider) OnBranchChange ¶
func (p *FooterDataProvider) OnBranchChange(callback func()) func()
func (*FooterDataProvider) SetAvailableProviderCount ¶
func (p *FooterDataProvider) SetAvailableProviderCount(count int)
func (*FooterDataProvider) SetCwd ¶
func (p *FooterDataProvider) SetCwd(cwd string)
func (*FooterDataProvider) SetExtensionStatus ¶
func (p *FooterDataProvider) SetExtensionStatus(key string, text *string)
type FooterDataProviderOptions ¶
type FooterDataProviderOptions struct {
}
type FooterGitBranchResolver ¶
type FooterState ¶
type FooterState struct {
}
type FooterUsage ¶
type FooterUsage struct {
}
type FrontmatterResult ¶
type FrontmatterResult = frontmatter.Result
func ParseFrontmatter ¶
func ParseFrontmatter(content string) (FrontmatterResult, error)
type GitSource ¶
func ParseGitURL ¶
type GrepTool ¶
type GrepTool struct {
// contains filtered or unexported fields
}
func NewGrepTool ¶
func (GrepTool) Execute ¶
func (t GrepTool) Execute(_ string, input GrepToolInput) (FileToolResult, error)
type GrepToolInput ¶
type HighlightOptions ¶
type HighlightOptions = syntaxhighlight.HighlightOptions
type HighlightTheme ¶
type HighlightTheme = syntaxhighlight.HighlightTheme
type HostActionError ¶
type HostActionRequest ¶
type HostActionResponse ¶
type HostActionResponse struct {
Type string `json:"type"`
Protocol string `json:"protocol,omitempty"`
ID string `json:"id"`
Result any `json:"result,omitempty"`
Error *HostActionError `json:"error,omitempty"`
}
type HostPolicyDecision ¶
type HostPolicyRequest ¶
type HostPolicyRequester ¶
type HostPolicyRequester interface {
RequestHostPolicyGrant(request HostPolicyRequest) (HostPolicyDecision, error)
}
type HostPolicyRequesterFunc ¶
type HostPolicyRequesterFunc func(HostPolicyRequest) (HostPolicyDecision, error)
func (HostPolicyRequesterFunc) RequestHostPolicyGrant ¶
func (f HostPolicyRequesterFunc) RequestHostPolicyGrant(request HostPolicyRequest) (HostPolicyDecision, error)
type HostProcessExecutor ¶
type HostProcessExecutor interface {
ExecuteHostProcess(command []string, cwd string) (HostProcessResult, error)
}
type HostProcessExecutorWithOptions ¶
type HostProcessExecutorWithOptions interface {
ExecuteHostProcessWithOptions(command []string, cwd string, options HostProcessOptions) (HostProcessResult, error)
}
type HostProcessOptions ¶
type HostProcessResult ¶
type ImageResizeOptions ¶
type ImageResizeOptions = imageresize.ImageResizeOptions
type InMemoryAuthStorageBackend ¶
type InMemoryAuthStorageBackend struct {
// contains filtered or unexported fields
}
func NewInMemoryAuthStorageBackend ¶
func NewInMemoryAuthStorageBackend(data AuthStorageData) *InMemoryAuthStorageBackend
func (*InMemoryAuthStorageBackend) WithLock ¶
func (b *InMemoryAuthStorageBackend) WithLock(fn AuthStorageLockFunc) error
type InProcessComponentContext ¶
type InProcessComponentContext struct {
Session *AgentSession
RuntimeHost PrintModeRuntimeHost
ViewTree *ViewTreeHost
}
type InProcessComponentFactory ¶
type InProcessComponentFactory func(InProcessComponentContext) (gitui.Component, func(), error)
type InProcessCustomComponentFactory ¶
type InProcessCustomComponentFactory func(InProcessComponentContext, InProcessCustomDone) (gitui.Component, func(), error)
type InProcessCustomDone ¶
type InProcessCustomDone func(result any)
type InProcessCustomHandle ¶
type InProcessCustomHandle struct {
// contains filtered or unexported fields
}
func (*InProcessCustomHandle) Close ¶
func (h *InProcessCustomHandle) Close() bool
func (*InProcessCustomHandle) Done ¶
func (h *InProcessCustomHandle) Done() <-chan InProcessCustomResult
type InProcessCustomOptions ¶
type InProcessCustomOptions struct {
Slot string
Overlay *gitui.OverlayOptions
}
type InProcessCustomResult ¶
type InProcessSlotRegistration ¶
type InProcessSlotRegistration struct {
Key string
Slot string
Factory InProcessComponentFactory
Version int
Overlay *gitui.OverlayOptions
}
type InProcessUIRegistry ¶
type InProcessUIRegistry struct {
// contains filtered or unexported fields
}
func NewInProcessUIRegistry ¶
func NewInProcessUIRegistry() *InProcessUIRegistry
func (*InProcessUIRegistry) OnChange ¶
func (r *InProcessUIRegistry) OnChange(listener func()) func()
func (*InProcessUIRegistry) Remove ¶
func (r *InProcessUIRegistry) Remove(key string) bool
func (*InProcessUIRegistry) SetEditor ¶
func (r *InProcessUIRegistry) SetEditor(key string, factory InProcessComponentFactory)
func (*InProcessUIRegistry) SetFooter ¶
func (r *InProcessUIRegistry) SetFooter(key string, factory InProcessComponentFactory)
func (*InProcessUIRegistry) SetHeader ¶
func (r *InProcessUIRegistry) SetHeader(key string, factory InProcessComponentFactory)
func (*InProcessUIRegistry) SetOverlay ¶
func (r *InProcessUIRegistry) SetOverlay(key string, factory InProcessComponentFactory, options ...gitui.OverlayOptions)
func (*InProcessUIRegistry) SetSlot ¶
func (r *InProcessUIRegistry) SetSlot(key, slot string, factory InProcessComponentFactory)
func (*InProcessUIRegistry) SetWidget ¶
func (r *InProcessUIRegistry) SetWidget(key, slot string, factory InProcessComponentFactory)
func (*InProcessUIRegistry) ShowCustom ¶
func (r *InProcessUIRegistry) ShowCustom(key string, factory InProcessCustomComponentFactory, options ...InProcessCustomOptions) (*InProcessCustomHandle, error)
func (*InProcessUIRegistry) Slots ¶
func (r *InProcessUIRegistry) Slots() []InProcessSlotRegistration
type InitialMessageInput ¶
type InitialMessageInput = internalcli.InitialMessageInput
type InitialMessageResult ¶
type InitialMessageResult = internalcli.InitialMessageResult
func BuildInitialMessage ¶
func BuildInitialMessage(input InitialMessageInput) InitialMessageResult
type InitialModelResult ¶
type InitialModelResult = modelresolver.InitialModelResult
func FindInitialModel ¶
func FindInitialModel(options FindInitialModelOptions) InitialModelResult
type InstallEnvironment ¶
type InstallEnvironment struct {
ExecPath string
PackageDir string
Platform string
HomeDir string
BunBinary bool
BunRuntime bool
CommandOutput func(command string, args []string, requireSuccess bool) (string, bool, error)
}
func DefaultInstallEnvironment ¶
func DefaultInstallEnvironment() InstallEnvironment
type InstallMethod ¶
type InstallMethod string
func DetectInstallMethod ¶
func DetectInstallMethod(env InstallEnvironment) InstallMethod
type InteractiveContainer ¶
type InteractiveContainer interface {
Clear()
AddText(text string)
}
type InteractiveContextFile ¶
type InteractiveDefaultEditor ¶
type InteractiveDefaultEditor struct {
OnEscape func()
}
type InteractiveEditor ¶
type InteractiveEditor interface {
SetText(text string)
}
type InteractiveExpandable ¶
type InteractiveExpandable interface {
SetExpanded(expanded bool)
}
type InteractiveExtensionResource ¶
type InteractiveExtensionResource struct {
Path string
SourceInfo *InteractiveSourceInfo
}
type InteractiveExtensionUIContext ¶
type InteractiveExtensionUIContext struct {
// contains filtered or unexported fields
}
func (InteractiveExtensionUIContext) AddAutocompleteProvider ¶
func (c InteractiveExtensionUIContext) AddAutocompleteProvider(wrapper AutocompleteProviderFactory)
func (InteractiveExtensionUIContext) GetToolsExpanded ¶
func (c InteractiveExtensionUIContext) GetToolsExpanded() bool
func (InteractiveExtensionUIContext) SetTheme ¶
func (c InteractiveExtensionUIContext) SetTheme(theme string) InteractiveThemeResult
func (InteractiveExtensionUIContext) SetToolsExpanded ¶
func (c InteractiveExtensionUIContext) SetToolsExpanded(expanded bool)
type InteractiveFlushCompactionOptions ¶
type InteractiveFlushCompactionOptions struct {
WillRetry bool
}
type InteractiveFooter ¶
type InteractiveFooter interface {
}
type InteractiveForkOptions ¶
type InteractiveForkOptions struct {
Position string
}
type InteractiveForkResult ¶
type InteractiveForkResult struct {
Cancelled bool
}
type InteractiveImportResult ¶
type InteractiveImportResult struct {
Cancelled bool
}
type InteractiveIndexedTextContainer ¶
type InteractiveIndexedTextContainer interface {
InteractiveContainer
Len() int
SetTextAt(index int, text string)
}
type InteractiveLoadedResources ¶
type InteractiveLoadedResources struct {
QuietStartup bool
Verbose bool
ToolOutputExpanded bool
CWD string
ContextFiles []InteractiveContextFile
Extensions []InteractiveExtensionResource
Skills []InteractiveSkillResource
Prompts []InteractivePromptResource
Themes []InteractiveThemeResource
SkillDiagnostics []InteractiveResourceDiagnostic
PromptDiagnostics []InteractiveResourceDiagnostic
ExtensionDiagnostics []InteractiveResourceDiagnostic
ThemeDiagnostics []InteractiveResourceDiagnostic
}
type InteractiveMessage ¶
type InteractiveMode ¶
type InteractiveMode struct {
SessionManager InteractiveSessionLeafProvider
RuntimeHost InteractiveRuntimeHost
UI InteractiveUI
Editor InteractiveEditor
Status InteractiveContainer
Chat InteractiveContainer
Settings InteractiveSettings
LoadingAnimation InteractiveStopper
AutoCompactionLoader InteractiveStopper
DefaultEditor *InteractiveDefaultEditor
AutoCompactionEscapeHandler func()
Suspend InteractiveSuspendOperations
ToolOutputExpanded bool
CustomHeader InteractiveExpandable
BuiltInHeader InteractiveExpandable
ChatExpandables []InteractiveExpandable
ThemeSettings InteractiveThemeSettings
AutocompleteProviderWrappers []AutocompleteProviderFactory
CreateBaseAutocompleteProvider func() AutocompleteProvider
DefaultAutocompleteEditor AutocompleteEditor
AutocompleteEditor AutocompleteEditor
LoadedResources InteractiveLoadedResources
PendingTools map[string]*ToolExecutionComponent
PendingToolChatIndexes map[string]int
RenderCurrentSessionState func()
RebuildChatFromMessages func()
AddMessageToChat func(InteractiveMessage)
GetRegisteredToolDefinition func(toolName string) ToolDefinition
FlushCompactionQueue func(InteractiveFlushCompactionOptions) error
ShowStatus func(string)
ShowError func(string)
ShowExtensionConfirm func(title, message string) (bool, error)
PromptForMissingSessionCwd func(error) (string, error)
HandleFatalRuntimeError func(prefix string, err error) error
// contains filtered or unexported fields
}
func (*InteractiveMode) CreateExtensionUIContext ¶
func (m *InteractiveMode) CreateExtensionUIContext() InteractiveExtensionUIContext
func (*InteractiveMode) FormatLoadedResources ¶
func (m *InteractiveMode) FormatLoadedResources(options InteractiveShowLoadedResourcesOptions) string
func (*InteractiveMode) GetPathCommandArgument ¶
func (m *InteractiveMode) GetPathCommandArgument(text, command string) (string, bool)
func (*InteractiveMode) HandleCloneCommand ¶
func (m *InteractiveMode) HandleCloneCommand() error
func (*InteractiveMode) HandleCtrlZ ¶
func (m *InteractiveMode) HandleCtrlZ() error
func (*InteractiveMode) HandleEvent ¶
func (m *InteractiveMode) HandleEvent(event AgentSessionEvent) error
func (*InteractiveMode) HandleImportCommand ¶
func (m *InteractiveMode) HandleImportCommand(text string) error
func (*InteractiveMode) RenderSessionContext ¶
func (m *InteractiveMode) RenderSessionContext(context SessionContext)
func (*InteractiveMode) SetToolsExpanded ¶
func (m *InteractiveMode) SetToolsExpanded(expanded bool)
func (*InteractiveMode) SetupAutocompleteProvider ¶
func (m *InteractiveMode) SetupAutocompleteProvider()
func (*InteractiveMode) ShowLoadedResources ¶
func (m *InteractiveMode) ShowLoadedResources(options InteractiveShowLoadedResourcesOptions)
func (*InteractiveMode) ShowStatusMessage ¶
func (m *InteractiveMode) ShowStatusMessage(message string)
type InteractivePromptResource ¶
type InteractivePromptResource struct {
FilePath string
Name string
SourceInfo *InteractiveSourceInfo
}
type InteractiveRuntimeHost ¶
type InteractiveRuntimeHost interface {
Fork(entryID string, options InteractiveForkOptions) (InteractiveForkResult, error)
ImportFromJsonl(inputPath string, cwdOverride ...string) (InteractiveImportResult, error)
}
type InteractiveSessionLeafProvider ¶
type InteractiveSessionLeafProvider interface {
GetLeafID() *string
}
type InteractiveSettings ¶
type InteractiveSettings interface {
GetShowTerminalProgress() bool
}
type InteractiveSkillResource ¶
type InteractiveSkillResource struct {
FilePath string
Name string
SourceInfo *InteractiveSourceInfo
}
type InteractiveSourceInfo ¶
type InteractiveStatusChat ¶
type InteractiveStatusChat struct {
Children []string
}
func (*InteractiveStatusChat) AddText ¶
func (c *InteractiveStatusChat) AddText(text string)
func (*InteractiveStatusChat) Clear ¶
func (c *InteractiveStatusChat) Clear()
func (*InteractiveStatusChat) Len ¶
func (c *InteractiveStatusChat) Len() int
func (*InteractiveStatusChat) Render ¶
func (c *InteractiveStatusChat) Render() string
func (*InteractiveStatusChat) SetTextAt ¶
func (c *InteractiveStatusChat) SetTextAt(index int, text string)
type InteractiveStopper ¶
type InteractiveStopper interface {
Stop()
}
type InteractiveSuspendOperations ¶
type InteractiveSuspendOperations struct {
Platform string
SetInterval func(func(), time.Duration) any
ClearInterval func(any)
OnSignal func(signal string, handler func()) any
OnceSignal func(signal string, handler func()) any
RemoveSignalListener func(signal string, subscription any)
KillProcessGroup func(signal string) error
}
type InteractiveTerminal ¶
type InteractiveTerminal interface {
SetProgress(active bool)
}
type InteractiveThemeResource ¶
type InteractiveThemeResource struct {
SourcePath string
Name string
SourceInfo *InteractiveSourceInfo
}
type InteractiveThemeResult ¶
type InteractiveThemeResult struct {
Success bool
}
type InteractiveUI ¶
type InteractiveUI interface {
Start()
Stop()
RequestRender(force ...bool)
Terminal() InteractiveTerminal
}
type KeybindingsConfig ¶
func DefaultProtocolKeybindings ¶
func DefaultProtocolKeybindings() KeybindingsConfig
type KeybindingsManager ¶
type KeybindingsManager struct {
// contains filtered or unexported fields
}
func NewKeybindingsManager ¶
func NewKeybindingsManager(agentDir string) *KeybindingsManager
func (*KeybindingsManager) GetEffectiveConfig ¶
func (m *KeybindingsManager) GetEffectiveConfig() KeybindingsConfig
func (*KeybindingsManager) GetUserBindings ¶
func (m *KeybindingsManager) GetUserBindings() KeybindingsConfig
func (*KeybindingsManager) Reload ¶
func (m *KeybindingsManager) Reload()
type LatestGiRelease ¶
type LatestGiRelease = versioncheck.LatestGiRelease
func GetLatestGiRelease ¶
func GetLatestGiRelease(currentVersion string, options VersionCheckOptions) (LatestGiRelease, bool)
type LatestPiRelease ¶
type LatestPiRelease = versioncheck.LatestPiRelease
func GetLatestPiRelease ¶
func GetLatestPiRelease(currentVersion string, options VersionCheckOptions) (LatestPiRelease, bool)
type LocalHostProcessExecutor ¶
type LocalHostProcessExecutor struct{}
func (LocalHostProcessExecutor) ExecuteHostProcess ¶
func (LocalHostProcessExecutor) ExecuteHostProcess(command []string, cwd string) (HostProcessResult, error)
func (LocalHostProcessExecutor) ExecuteHostProcessWithOptions ¶
func (LocalHostProcessExecutor) ExecuteHostProcessWithOptions(command []string, cwd string, options HostProcessOptions) (HostProcessResult, error)
type LoginDialogComponent ¶
type LoginDialogComponent struct {
OnSubmit func(value string)
OnCancel func()
// contains filtered or unexported fields
}
func NewLoginDialogComponent ¶
func NewLoginDialogComponent(title, message string) *LoginDialogComponent
func (*LoginDialogComponent) Focused ¶
func (c *LoginDialogComponent) Focused() bool
func (*LoginDialogComponent) HandleInput ¶
func (c *LoginDialogComponent) HandleInput(input string)
func (*LoginDialogComponent) Invalidate ¶
func (c *LoginDialogComponent) Invalidate()
func (*LoginDialogComponent) Render ¶
func (c *LoginDialogComponent) Render(width int) []string
func (*LoginDialogComponent) SetFocused ¶
func (c *LoginDialogComponent) SetFocused(focused bool)
func (*LoginDialogComponent) ShowAuth ¶
func (c *LoginDialogComponent) ShowAuth(url, instructions, manualPrompt string)
func (*LoginDialogComponent) ShowInfo ¶
func (c *LoginDialogComponent) ShowInfo(lines []string)
type LsTool ¶
type LsTool struct {
// contains filtered or unexported fields
}
func (LsTool) Execute ¶
func (t LsTool) Execute(_ string, input LsToolInput) (FileToolResult, error)
type LsToolInput ¶
type MigrationResult ¶
func RunMigrationsWithResult ¶
func RunMigrationsWithResult(agentDir string, cwd ...string) (MigrationResult, error)
type MissingSessionCwdError ¶
type MissingSessionCwdError = sessioncwd.MissingError
type MissingSessionCwdIssue ¶
type MissingSessionCwdIssue = sessioncwd.MissingIssue
func GetMissingSessionCwdIssue ¶
func GetMissingSessionCwdIssue(sessionManager *SessionManager, fallbackCwd string) *MissingSessionCwdIssue
type Mode ¶
type Mode = internalcli.Mode
const ( ModeText Mode = internalcli.ModeText ModeJSON Mode = internalcli.ModeJSON ModeRPC Mode = internalcli.ModeRPC )
type ModelCostOverride ¶
type ModelOverride ¶
type ModelPatternOptions ¶
type ModelPatternOptions = modelresolver.ModelPatternOptions
type ModelRegistry ¶
type ModelRegistry struct {
// contains filtered or unexported fields
}
func NewInMemoryModelRegistry ¶
func NewInMemoryModelRegistry(authStorage *AuthStorage) *ModelRegistry
func NewModelRegistry ¶
func NewModelRegistry(authStorage *AuthStorage, modelsJSONPath string) *ModelRegistry
func (*ModelRegistry) Find ¶
func (r *ModelRegistry) Find(provider, modelID string) (llm.Model, bool)
func (*ModelRegistry) GetAPIKeyAndHeaders ¶
func (r *ModelRegistry) GetAPIKeyAndHeaders(model llm.Model) ResolvedRequestAuth
func (*ModelRegistry) GetAPIKeyForProvider ¶
func (r *ModelRegistry) GetAPIKeyForProvider(provider string) (string, bool)
func (*ModelRegistry) GetAll ¶
func (r *ModelRegistry) GetAll() []llm.Model
func (*ModelRegistry) GetAvailable ¶
func (r *ModelRegistry) GetAvailable() []llm.Model
func (*ModelRegistry) GetError ¶
func (r *ModelRegistry) GetError() string
func (*ModelRegistry) GetProviderAuthStatus ¶
func (r *ModelRegistry) GetProviderAuthStatus(provider string) AuthStatus
func (*ModelRegistry) GetProviderDisplayName ¶
func (r *ModelRegistry) GetProviderDisplayName(provider string) string
func (*ModelRegistry) HasConfiguredAuth ¶
func (r *ModelRegistry) HasConfiguredAuth(model llm.Model) bool
func (*ModelRegistry) IsUsingOAuth ¶
func (r *ModelRegistry) IsUsingOAuth(model llm.Model) bool
func (*ModelRegistry) Refresh ¶
func (r *ModelRegistry) Refresh()
func (*ModelRegistry) RegisterProvider ¶
func (r *ModelRegistry) RegisterProvider(providerName string, config ProviderConfigInput) error
func (*ModelRegistry) UnregisterProvider ¶
func (r *ModelRegistry) UnregisterProvider(providerName string)
type ModelSelectorCallbacks ¶
type ModelSelectorComponent ¶
type ModelSelectorComponent struct {
// contains filtered or unexported fields
}
func NewInteractiveModelSelectorComponent ¶
func NewInteractiveModelSelectorComponent(config ModelSelectorConfig, callbacks ModelSelectorCallbacks) *ModelSelectorComponent
func NewModelSelectorComponent ¶
func NewModelSelectorComponent(currentModel llm.Model, scopedModels []ScopedModel) *ModelSelectorComponent
func (*ModelSelectorComponent) Focused ¶
func (c *ModelSelectorComponent) Focused() bool
func (*ModelSelectorComponent) HandleInput ¶
func (c *ModelSelectorComponent) HandleInput(data string)
func (*ModelSelectorComponent) Invalidate ¶
func (c *ModelSelectorComponent) Invalidate()
func (*ModelSelectorComponent) Render ¶
func (c *ModelSelectorComponent) Render(width int) []string
func (*ModelSelectorComponent) SetFocused ¶
func (c *ModelSelectorComponent) SetFocused(focused bool)
type ModelSelectorConfig ¶
type ModelSelectorConfig struct {
CurrentModel llm.Model
AllModels []llm.Model
ScopedModels []ScopedModel
InitialSearch string
Keybindings KeybindingsConfig
}
type NewSessionOptions ¶
type OAuthProvider ¶
type OAuthProvider struct {
ID string
Name string
RefreshToken func(AuthCredential) (AuthCredential, error)
GetAPIKey func(AuthCredential) string
}
func GetOAuthProvider ¶
func GetOAuthProvider(providerID string) (OAuthProvider, bool)
func GetOAuthProviders ¶
func GetOAuthProviders() []OAuthProvider
func (OAuthProvider) APIKey ¶
func (p OAuthProvider) APIKey(credential AuthCredential) string
type OAuthSelector ¶
type OAuthSelector struct {
Mode string
AuthStorage *AuthStorage
Providers []AuthSelectorProvider
StatusResolver AuthStatusResolver
}
func (OAuthSelector) Render ¶
func (s OAuthSelector) Render(width int) []string
type OAuthSelectorComponent ¶
type OAuthSelectorComponent struct {
OnSelect func(providerID string)
OnCancel func()
// contains filtered or unexported fields
}
func NewOAuthSelectorComponent ¶
func NewOAuthSelectorComponent(selector OAuthSelector) *OAuthSelectorComponent
func (*OAuthSelectorComponent) Focused ¶
func (c *OAuthSelectorComponent) Focused() bool
func (*OAuthSelectorComponent) HandleInput ¶
func (c *OAuthSelectorComponent) HandleInput(input string)
func (*OAuthSelectorComponent) Invalidate ¶
func (c *OAuthSelectorComponent) Invalidate()
func (*OAuthSelectorComponent) Render ¶
func (c *OAuthSelectorComponent) Render(width int) []string
func (*OAuthSelectorComponent) SetFocused ¶
func (c *OAuthSelectorComponent) SetFocused(focused bool)
type PackageCommandOptions ¶
type PackageCommandOptions struct {
CWD string
}
type PackageManagerOperations ¶
type PackageManagerOperations struct {
RunCommand func(command string, args []string, options PackageCommandOptions) error
RunCommandCapture func(command string, args []string, options PackageCommandOptions) (string, error)
}
type PackageManagerOptions ¶
type PackageManagerOptions struct {
CWD string
AgentDir string
SettingsManager *SettingsManager
Operations PackageManagerOperations
Progress func(PackageProgressEvent)
}
type PackageProgressEvent ¶
type PackageResourceToggle ¶
type PackageSource ¶
type PackageSource struct {
Type string
Source string
Repo string
Host string
Path string
Ref string
Pinned bool
}
func ParsePackageSource ¶
func ParsePackageSource(source string) PackageSource
type PackageUpdate ¶
type PackageUpdateChecker ¶
type PackageUpdateSuggestionError ¶
func (PackageUpdateSuggestionError) Error ¶
func (e PackageUpdateSuggestionError) Error() string
type ParsedModelResult ¶
type ParsedModelResult = modelresolver.ParsedModelResult
func ParseModelPattern ¶
func ParseModelPattern(pattern string, availableModels []llm.Model, options ...ModelPatternOptions) ParsedModelResult
type PlanTodoItem ¶
type PlanTodoItem = planmode.PlanTodoItem
func ExtractPlanTodoItems ¶
func ExtractPlanTodoItems(message string) []PlanTodoItem
type PrintModeOptions ¶
type PrintModePromptOptions ¶
type PrintModePromptOptions struct {
Images []llm.ContentPart
}
type PrintModeRuntimeHost ¶
type PrintModeRuntimeHost interface {
PrintModeSession() PrintModeSession
Dispose() error
}
type PrintModeSession ¶
type ProcessFileArgumentsOptions ¶
type ProcessFileArgumentsOptions struct {
CWD string
AutoResizeImages *bool
ResizeImage func(part llm.ContentPart, options ImageResizeOptions) *ResizedImage
}
type ProcessedFileArguments ¶
type ProcessedFileArguments struct {
Text string
Images []llm.ContentPart
}
func ProcessFileArguments ¶
func ProcessFileArguments(paths []string, options ...ProcessFileArgumentsOptions) (ProcessedFileArguments, error)
type PromptTemplate ¶
type PromptTemplate struct {
Name string
Description string
ArgumentHint string
Content string
SourceInfo SourceInfo
FilePath string
}
func LoadPromptTemplates ¶
func LoadPromptTemplates(options LoadPromptTemplatesOptions) []PromptTemplate
type ProtocolAbortSignal ¶
type ProtocolAbortSignal struct {
// contains filtered or unexported fields
}
func NewProtocolAbortSignal ¶
func NewProtocolAbortSignal(done <-chan struct{}) *ProtocolAbortSignal
func (*ProtocolAbortSignal) Aborted ¶
func (s *ProtocolAbortSignal) Aborted() bool
func (*ProtocolAbortSignal) Done ¶
func (s *ProtocolAbortSignal) Done() <-chan struct{}
type ProtocolAutocompleteItem ¶
type ProtocolAutocompleteItem struct {
ID string
Value string
Label string
Description string
Kind string
Range *ProtocolAutocompleteRange
Detail *ViewTreeNode
}
type ProtocolAutocompleteProviderDefinition ¶
type ProtocolAutocompleteProviderDefinition struct {
Description string
Priority int
Handler func(context.Context, ProtocolAutocompleteRequest) (ProtocolAutocompleteResult, error)
}
type ProtocolAutocompleteProviderRegistration ¶
type ProtocolAutocompleteProviderRegistration struct {
ID string
Description string
Priority int
SourceInfo ProtocolSourceInfo
Handler func(context.Context, ProtocolAutocompleteRequest) (ProtocolAutocompleteResult, error)
}
type ProtocolAutocompleteResult ¶
type ProtocolAutocompleteResult struct {
Items []ProtocolAutocompleteItem
Prefix string
Start int
End int
}
type ProtocolCommandContext ¶
type ProtocolCommandContext struct {
// contains filtered or unexported fields
}
func (ProtocolCommandContext) Fork ¶
func (c ProtocolCommandContext) Fork(entryID string, options ...ProtocolForkOptions) (ProtocolCommandForkResult, error)
func (ProtocolCommandContext) NewSession ¶
func (c ProtocolCommandContext) NewSession(options ...ProtocolNewSessionOptions) (ProtocolCommandSwitchResult, error)
func (ProtocolCommandContext) Reload ¶
func (c ProtocolCommandContext) Reload() error
func (ProtocolCommandContext) SendUserMessage ¶
func (c ProtocolCommandContext) SendUserMessage(text string, options ...ProtocolSendUserMessageOptions) error
func (ProtocolCommandContext) SwitchSession ¶
func (c ProtocolCommandContext) SwitchSession(sessionFile string, options ...ProtocolSwitchSessionOptions) (ProtocolCommandSwitchResult, error)
type ProtocolCommandContextActions ¶
type ProtocolCommandContextActions struct {
Fork func(entryID string, options ProtocolForkOptions) (ProtocolCommandForkResult, error)
NewSession func(options ProtocolNewSessionOptions) (ProtocolCommandSwitchResult, error)
SwitchSession func(sessionFile string, options ProtocolSwitchSessionOptions) (ProtocolCommandSwitchResult, error)
Reload func() error
}
type ProtocolCommandForkResult ¶
type ProtocolCommandForkResult struct {
Cancelled bool
}
type ProtocolCommandRegistration ¶
type ProtocolCommandRegistration struct {
Name string
InvocationName string
Description string
ArgumentHint string
SourceInfo ProtocolSourceInfo
Handler func(args string) error
HandlerWithContext func(args string, ctx ProtocolCommandContext) error
}
type ProtocolCommandSwitchResult ¶
type ProtocolCommandSwitchResult struct {
Cancelled bool
}
type ProtocolCustomMessage ¶
type ProtocolErrorListener ¶
type ProtocolErrorListener func(ProtocolExtensionError)
type ProtocolEventHandler ¶
type ProtocolEventHandler func(ProtocolSessionEvent) (ProtocolEventResult, error)
type ProtocolEventResult ¶
type ProtocolEventResult struct {
Cancel bool
Block bool
Reason string
Compaction *agentharness.CompactionResult
Messages []llm.Message
MessagesSet bool
Message *llm.Message
MessageSet bool
CustomMessages []ProtocolCustomMessage
CustomMessagesSet bool
SystemPrompt string
SystemPromptSet bool
Content []SDKContentPart
ContentSet bool
Details any
DetailsSet bool
IsError bool
IsErrorSet bool
BashResult *BashResult
BashResultSet bool
Payload any
PayloadSet bool
Resources ResourceExtension
ResourcesSet bool
}
type ProtocolExtensionContext ¶
type ProtocolExtensionContext struct {
// contains filtered or unexported fields
}
func (*ProtocolExtensionContext) GetFlag ¶
func (c *ProtocolExtensionContext) GetFlag(name string) any
func (*ProtocolExtensionContext) GetSystemPrompt ¶
func (c *ProtocolExtensionContext) GetSystemPrompt() string
func (*ProtocolExtensionContext) MountViewTree ¶
func (c *ProtocolExtensionContext) MountViewTree(mountID, slot string, view ViewTreeNode, options ...ViewTreeMountOptions) error
func (*ProtocolExtensionContext) On ¶
func (c *ProtocolExtensionContext) On(eventType string, handler ProtocolEventHandler) error
func (*ProtocolExtensionContext) OnInput ¶
func (c *ProtocolExtensionContext) OnInput(handler ProtocolInputHandler) error
func (*ProtocolExtensionContext) RegisterAutocompleteProvider ¶
func (c *ProtocolExtensionContext) RegisterAutocompleteProvider(id string, definition ProtocolAutocompleteProviderDefinition) error
func (*ProtocolExtensionContext) RegisterCommand ¶
func (c *ProtocolExtensionContext) RegisterCommand(name string, definition ProtocolCommandDefinition) error
func (*ProtocolExtensionContext) RegisterFlag ¶
func (c *ProtocolExtensionContext) RegisterFlag(name string, definition ProtocolFlagDefinition) error
func (*ProtocolExtensionContext) RegisterMessageRenderer ¶
func (c *ProtocolExtensionContext) RegisterMessageRenderer(customType string, renderer ProtocolMessageRenderer) error
func (*ProtocolExtensionContext) RegisterProvider ¶
func (c *ProtocolExtensionContext) RegisterProvider(provider string, override ProtocolProviderOverride) error
func (*ProtocolExtensionContext) RegisterShortcut ¶
func (c *ProtocolExtensionContext) RegisterShortcut(key string, definition ProtocolShortcutDefinition) error
func (*ProtocolExtensionContext) RegisterTool ¶
func (c *ProtocolExtensionContext) RegisterTool(definition ProtocolToolDefinition) error
func (*ProtocolExtensionContext) RegisterToolRenderer ¶
func (c *ProtocolExtensionContext) RegisterToolRenderer(toolName string, definition ProtocolToolRendererDefinition) error
func (*ProtocolExtensionContext) SendCustomMessage ¶
func (c *ProtocolExtensionContext) SendCustomMessage(message ProtocolCustomMessage, options ProtocolSendCustomMessageOptions) error
func (*ProtocolExtensionContext) SendUserMessage ¶
func (c *ProtocolExtensionContext) SendUserMessage(text string, options ProtocolSendUserMessageOptions) error
func (*ProtocolExtensionContext) SetSessionName ¶
func (c *ProtocolExtensionContext) SetSessionName(name string) error
func (*ProtocolExtensionContext) Signal ¶
func (c *ProtocolExtensionContext) Signal() *ProtocolAbortSignal
func (*ProtocolExtensionContext) UnregisterProvider ¶
func (c *ProtocolExtensionContext) UnregisterProvider(provider string) error
type ProtocolExtensionDiscoveryResult ¶
type ProtocolExtensionDiscoveryResult struct {
Extensions []ProtocolExtensionSource
Errors []ProtocolExtensionDiscoveryError
}
func DiscoverProtocolExtensions ¶
func DiscoverProtocolExtensions(explicitPaths []string, cwd, agentDir string) ProtocolExtensionDiscoveryResult
func LoadProtocolExtensionSources ¶
func LoadProtocolExtensionSources(paths []string, cwd string) ProtocolExtensionDiscoveryResult
type ProtocolExtensionError ¶
type ProtocolExtensionFactory ¶
type ProtocolExtensionFactory struct {
Path string
Factory func(*ProtocolExtensionContext) error
}
type ProtocolExtensionProcess ¶
type ProtocolExtensionProcess struct {
Spec ProtocolPackageProcessExtension
// contains filtered or unexported fields
}
func (*ProtocolExtensionProcess) EmitEvent ¶
func (p *ProtocolExtensionProcess) EmitEvent(method string, params map[string]any) error
func (*ProtocolExtensionProcess) RequestEvent ¶
func (p *ProtocolExtensionProcess) RequestEvent(ctx context.Context, method string, params any) (json.RawMessage, error)
func (*ProtocolExtensionProcess) Start ¶
func (p *ProtocolExtensionProcess) Start(ctx context.Context, host *RPCSessionHost, timeout time.Duration) error
type ProtocolExtensionProcessSupervisor ¶
type ProtocolExtensionProcessSupervisor struct {
Host *RPCSessionHost
StartTimeout time.Duration
ShutdownTimeout time.Duration
// contains filtered or unexported fields
}
func NewProtocolExtensionProcessSupervisor ¶
func NewProtocolExtensionProcessSupervisor(host *RPCSessionHost, specs []ProtocolPackageProcessExtension) *ProtocolExtensionProcessSupervisor
func (*ProtocolExtensionProcessSupervisor) BindSession ¶
func (s *ProtocolExtensionProcessSupervisor) BindSession(session *AgentSession)
func (*ProtocolExtensionProcessSupervisor) DiscoverResources ¶
func (s *ProtocolExtensionProcessSupervisor) DiscoverResources(ctx context.Context, reason, cwd string) (ResourceExtension, error)
func (*ProtocolExtensionProcessSupervisor) EmitEvent ¶
func (s *ProtocolExtensionProcessSupervisor) EmitEvent(method string, params map[string]any) error
func (*ProtocolExtensionProcessSupervisor) EmitSessionEvent ¶
func (s *ProtocolExtensionProcessSupervisor) EmitSessionEvent(event ProtocolSessionEvent) error
func (*ProtocolExtensionProcessSupervisor) EmitTerminalInput ¶
func (s *ProtocolExtensionProcessSupervisor) EmitTerminalInput(data string) error
func (*ProtocolExtensionProcessSupervisor) EmitUserBash ¶
func (s *ProtocolExtensionProcessSupervisor) EmitUserBash(ctx context.Context, params map[string]any) (*BashResult, bool, error)
func (*ProtocolExtensionProcessSupervisor) Processes ¶
func (s *ProtocolExtensionProcessSupervisor) Processes() []*ProtocolExtensionProcess
type ProtocolExtensionRuntime ¶
type ProtocolExtensionRuntime struct {
// contains filtered or unexported fields
}
func NewDefaultProtocolExtensionRuntime ¶
func NewDefaultProtocolExtensionRuntime() *ProtocolExtensionRuntime
func NewProtocolExtensionRuntime ¶
func NewProtocolExtensionRuntime(capabilities ...string) *ProtocolExtensionRuntime
func (*ProtocolExtensionRuntime) ActiveToolNames ¶
func (r *ProtocolExtensionRuntime) ActiveToolNames() []string
func (*ProtocolExtensionRuntime) AppendCustomEntry ¶
func (r *ProtocolExtensionRuntime) AppendCustomEntry(customType string, data any) (string, error)
func (*ProtocolExtensionRuntime) ApplyToSession ¶
func (r *ProtocolExtensionRuntime) ApplyToSession(session *AgentSession)
func (*ProtocolExtensionRuntime) AutocompleteProviders ¶
func (r *ProtocolExtensionRuntime) AutocompleteProviders() []ProtocolAutocompleteProviderRegistration
func (*ProtocolExtensionRuntime) BindCommandContext ¶
func (r *ProtocolExtensionRuntime) BindCommandContext(actions ProtocolCommandContextActions)
func (*ProtocolExtensionRuntime) BindHostActionHost ¶
func (r *ProtocolExtensionRuntime) BindHostActionHost(host *RPCSessionHost)
func (*ProtocolExtensionRuntime) BindModelRegistry ¶
func (r *ProtocolExtensionRuntime) BindModelRegistry(registry *ModelRegistry)
func (*ProtocolExtensionRuntime) BindSession ¶
func (r *ProtocolExtensionRuntime) BindSession(session *AgentSession)
func (*ProtocolExtensionRuntime) BindViewTreeHost ¶
func (r *ProtocolExtensionRuntime) BindViewTreeHost(host *ViewTreeHost)
func (*ProtocolExtensionRuntime) CommandInvocationNames ¶
func (r *ProtocolExtensionRuntime) CommandInvocationNames() []string
func (*ProtocolExtensionRuntime) CreateCommandContext ¶
func (r *ProtocolExtensionRuntime) CreateCommandContext() ProtocolCommandContext
func (*ProtocolExtensionRuntime) EmitInput ¶
func (r *ProtocolExtensionRuntime) EmitInput(text string, images []llm.ContentPart, source string) ProtocolInputResult
func (*ProtocolExtensionRuntime) EmitSessionEvent ¶
func (r *ProtocolExtensionRuntime) EmitSessionEvent(event ProtocolSessionEvent) (ProtocolEventResult, error)
func (*ProtocolExtensionRuntime) FlagDiagnostics ¶
func (r *ProtocolExtensionRuntime) FlagDiagnostics() []ProtocolExtensionFlagDiagnostic
func (*ProtocolExtensionRuntime) FlagValue ¶
func (r *ProtocolExtensionRuntime) FlagValue(name string) any
func (*ProtocolExtensionRuntime) Flags ¶
func (r *ProtocolExtensionRuntime) Flags() []ProtocolFlagRegistration
func (*ProtocolExtensionRuntime) GetCommand ¶
func (r *ProtocolExtensionRuntime) GetCommand(invocationName string) *ProtocolCommandRegistration
func (*ProtocolExtensionRuntime) GetMessageRenderer ¶
func (r *ProtocolExtensionRuntime) GetMessageRenderer(customType string) ProtocolMessageRenderer
func (*ProtocolExtensionRuntime) GetRegisteredToolDefinition ¶
func (r *ProtocolExtensionRuntime) GetRegisteredToolDefinition(toolName string) ToolDefinition
func (*ProtocolExtensionRuntime) GetSystemPrompt ¶
func (r *ProtocolExtensionRuntime) GetSystemPrompt() string
func (*ProtocolExtensionRuntime) GetToolRenderer ¶
func (r *ProtocolExtensionRuntime) GetToolRenderer(toolName string) *ProtocolToolRendererRegistration
func (*ProtocolExtensionRuntime) HasHandlers ¶
func (r *ProtocolExtensionRuntime) HasHandlers(eventType string) bool
func (*ProtocolExtensionRuntime) InvalidateCommandContexts ¶
func (r *ProtocolExtensionRuntime) InvalidateCommandContexts()
func (*ProtocolExtensionRuntime) LoadFactories ¶
func (r *ProtocolExtensionRuntime) LoadFactories(factories []ProtocolExtensionFactory) error
func (*ProtocolExtensionRuntime) OnAutocompleteProvidersChanged ¶
func (r *ProtocolExtensionRuntime) OnAutocompleteProvidersChanged(callback func()) func()
func (*ProtocolExtensionRuntime) OnCommandsChanged ¶
func (r *ProtocolExtensionRuntime) OnCommandsChanged(callback func()) func()
func (*ProtocolExtensionRuntime) OnError ¶
func (r *ProtocolExtensionRuntime) OnError(listener ProtocolErrorListener) func()
func (*ProtocolExtensionRuntime) OnMessageRenderersChanged ¶
func (r *ProtocolExtensionRuntime) OnMessageRenderersChanged(callback func()) func()
func (*ProtocolExtensionRuntime) PendingProviderRegistrations ¶
func (r *ProtocolExtensionRuntime) PendingProviderRegistrations() []ProtocolProviderRegistration
func (*ProtocolExtensionRuntime) RegisteredCommands ¶
func (r *ProtocolExtensionRuntime) RegisteredCommands() []ProtocolCommandRegistration
func (*ProtocolExtensionRuntime) RegisteredTools ¶
func (r *ProtocolExtensionRuntime) RegisteredTools() []SDKTool
func (*ProtocolExtensionRuntime) RemoveSource ¶
func (r *ProtocolExtensionRuntime) RemoveSource(source ProtocolSourceInfo)
func (*ProtocolExtensionRuntime) SendCustomMessage ¶
func (r *ProtocolExtensionRuntime) SendCustomMessage(message ProtocolCustomMessage, options ProtocolSendCustomMessageOptions) error
func (*ProtocolExtensionRuntime) SendUserMessage ¶
func (r *ProtocolExtensionRuntime) SendUserMessage(text string, options ProtocolSendUserMessageOptions) error
func (*ProtocolExtensionRuntime) SessionEntries ¶
func (r *ProtocolExtensionRuntime) SessionEntries() []FileEntry
func (*ProtocolExtensionRuntime) SetAbortSignal ¶
func (r *ProtocolExtensionRuntime) SetAbortSignal(done <-chan struct{})
func (*ProtocolExtensionRuntime) SetCLIFlagValues ¶
func (r *ProtocolExtensionRuntime) SetCLIFlagValues(values map[string]any) []ProtocolExtensionFlagDiagnostic
func (*ProtocolExtensionRuntime) SetFlagValue ¶
func (r *ProtocolExtensionRuntime) SetFlagValue(name string, value any)
func (*ProtocolExtensionRuntime) SetSessionName ¶
func (r *ProtocolExtensionRuntime) SetSessionName(name string) error
func (*ProtocolExtensionRuntime) Shortcuts ¶
func (r *ProtocolExtensionRuntime) Shortcuts(keybindings KeybindingsConfig) ProtocolShortcutsResult
func (*ProtocolExtensionRuntime) SuggestAutocomplete ¶
func (r *ProtocolExtensionRuntime) SuggestAutocomplete(ctx context.Context, request ProtocolAutocompleteRequest) (ProtocolAutocompleteResult, error)
func (*ProtocolExtensionRuntime) UnknownCLIFlagDiagnostics ¶
func (r *ProtocolExtensionRuntime) UnknownCLIFlagDiagnostics() []ProtocolExtensionFlagDiagnostic
func (*ProtocolExtensionRuntime) ViewTreeMounts ¶
func (r *ProtocolExtensionRuntime) ViewTreeMounts() []ProtocolViewTreeMountRegistration
type ProtocolExtensionSource ¶
type ProtocolExtensionSource struct {
Path string
BaseDir string
Metadata ProtocolSourceInfo
}
type ProtocolFlagDefinition ¶
type ProtocolFlagRegistration ¶
type ProtocolFlagRegistration struct {
Name string
Description string
Type string
Default any
SourceInfo ProtocolSourceInfo
}
type ProtocolForkOptions ¶
type ProtocolForkOptions struct {
Position string
WithSession func(ProtocolCommandContext) error
}
type ProtocolInputEvent ¶
type ProtocolInputEvent struct {
Type string
Text string
Images []llm.ContentPart
Source string
}
type ProtocolInputHandler ¶
type ProtocolInputHandler func(ProtocolInputEvent) (ProtocolInputResult, error)
type ProtocolInputResult ¶
type ProtocolInputResult struct {
Action string
Text string
Images []llm.ContentPart
ImagesSet bool
}
func ProtocolInputContinue ¶
func ProtocolInputContinue() ProtocolInputResult
func ProtocolInputHandled ¶
func ProtocolInputHandled() ProtocolInputResult
func ProtocolInputTransform ¶
func ProtocolInputTransform(text string) ProtocolInputResult
func ProtocolInputTransformWithImages ¶
func ProtocolInputTransformWithImages(text string, images []llm.ContentPart) ProtocolInputResult
type ProtocolMessageRenderer ¶
type ProtocolMessageRendererRegistration ¶
type ProtocolMessageRendererRegistration struct {
CustomType string
SourceInfo ProtocolSourceInfo
Renderer ProtocolMessageRenderer
}
type ProtocolNewSessionOptions ¶
type ProtocolNewSessionOptions struct {
ParentSession string
WithSession func(ProtocolCommandContext) error
}
type ProtocolPackageResource ¶
type ProtocolPackageResource struct {
Path string
Enabled bool
Metadata ProtocolSourceInfo
}
type ProtocolPackageResources ¶
type ProtocolPackageResources struct {
Extensions []ProtocolPackageResource
ProcessExtensions []ProtocolPackageProcessExtension
Skills []ProtocolPackageResource
Prompts []ProtocolPackageResource
Themes []ProtocolPackageResource
}
type ProtocolPackageSourceSpec ¶
type ProtocolPackageSourceSpec struct {
Source string
Scope string
Filters ProtocolPackageResourceFilters
}
type ProtocolProviderOverride ¶
type ProtocolProviderOverride struct {
BaseURL string
APIKey string
API string
Headers map[string]string
AuthHeader bool
Compat llm.ModelCompat
Models []ProviderModelDefinition
ModelOverrides map[string]ModelOverride
StreamSimple func(llm.Model, llm.Context, llm.SimpleStreamOptions) (*llm.AssistantMessageEventStream, error)
}
type ProtocolProviderRegistration ¶
type ProtocolProviderRegistration struct {
Name string
Config ProtocolProviderOverride
SourceInfo ProtocolSourceInfo
}
type ProtocolRuntimeError ¶
func (ProtocolRuntimeError) Error ¶
func (e ProtocolRuntimeError) Error() string
type ProtocolSendUserMessageOptions ¶
type ProtocolSendUserMessageOptions struct {
DeliverAs string
}
type ProtocolSessionEvent ¶
type ProtocolSessionEvent struct {
Context context.Context
Type string
Reason string
TargetSessionFile string
PreviousSessionFile string
Prompt string
Images []llm.ContentPart
SystemPrompt string
Messages []llm.Message
Message *llm.Message
AssistantMessageEvent *llm.AssistantMessageEvent
EntryID string
Position string
Role string
Model *llm.Model
PreviousModel *llm.Model
SelectSource string
ThinkingLevel string
PreviousLevel string
ToolName string
ToolCallID string
Input map[string]any
Content []SDKContentPart
Details any
IsError bool
Source string
Text string
Command string
CWD string
ExcludeFromContext bool
Steering []string
FollowUp []string
Preparation *agentharness.CompactionPreparation
BranchEntries []FileEntry
CompactionEntry *FileEntry
FromExtension bool
Name string
Payload any
Status int
Headers map[string]string
}
type ProtocolShortcutRegistration ¶
type ProtocolShortcutRegistration struct {
Key string
Description string
SourceInfo ProtocolSourceInfo
Handler func() error
}
type ProtocolShortcutWarning ¶
type ProtocolShortcutsResult ¶
type ProtocolShortcutsResult struct {
Shortcuts map[string]ProtocolShortcutRegistration
Warnings []ProtocolShortcutWarning
}
type ProtocolSourceInfo ¶
type ProtocolSwitchSessionOptions ¶
type ProtocolSwitchSessionOptions struct {
WithSession func(ProtocolCommandContext) error
}
type ProtocolToolDefinition ¶
type ProtocolToolDefinition struct {
Name string
Label string
Description string
Parameters llm.Schema
PromptSnippet string
PromptGuidelines []string
ExecutionMode string
PrepareArguments func(input map[string]any) map[string]any
Execute func(toolCallID string, input map[string]any) (SDKToolResult, error)
ExecuteWithUpdates func(toolCallID string, input map[string]any, onUpdate func(SDKToolResult)) (SDKToolResult, error)
}
type ProtocolToolRendererDefinition ¶
type ProtocolToolRendererDefinition struct {
RenderCall ToolCallRenderer
RenderResult ToolResultRenderer
}
type ProtocolToolRendererRegistration ¶
type ProtocolToolRendererRegistration struct {
Name string
SourceInfo ProtocolSourceInfo
RenderCall ToolCallRenderer
RenderResult ToolResultRenderer
}
type ProtocolViewTreeMountRegistration ¶
type ProtocolViewTreeMountRegistration struct {
MountID string
Slot string
View ViewTreeNode
Priority int
Overlay *ViewTreeOverlayOptions
SourceInfo ProtocolSourceInfo
}
type ProviderConfigInput ¶
type ProviderConfigInput struct {
Name string
BaseURL string
APIKey string
API string
Headers map[string]string
AuthHeader bool
OAuth *OAuthProvider `json:"-"`
StreamSimple func(llm.Model, llm.Context, llm.SimpleStreamOptions) (*llm.AssistantMessageEventStream, error) `json:"-"`
Compat llm.ModelCompat
Models []ProviderModelDefinition
ModelOverrides map[string]ModelOverride
}
type ProviderModelDefinition ¶
type ProviderRequestConfig ¶
type ProviderRetrySettings ¶
type QueuedCustomMessage ¶
type QueuedUserMessage ¶
type QueuedUserMessage struct {
Text string `json:"text"`
Images []llm.ContentPart `json:"images,omitempty"`
Custom *QueuedCustomMessage `json:"custom,omitempty"`
}
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
func NewRPCClient ¶
func NewRPCClient(sender RPCCommandSender) *RPCClient
func (*RPCClient) Compact ¶
func (c *RPCClient) Compact(ctx context.Context, customInstructions string) (agentharness.CompactionResult, error)
func (*RPCClient) CycleModel ¶
func (c *RPCClient) CycleModel(ctx context.Context) (*RPCCycleModelResult, error)
func (*RPCClient) CycleThinkingLevel ¶
func (c *RPCClient) CycleThinkingLevel(ctx context.Context) (*RPCThinkingLevelResult, error)
func (*RPCClient) ExportHTML ¶
func (*RPCClient) FollowUpWithImages ¶
func (*RPCClient) GetAvailableModels ¶
func (*RPCClient) GetCommands ¶
func (c *RPCClient) GetCommands(ctx context.Context) ([]RPCSlashCommand, error)
func (*RPCClient) GetForkMessages ¶
func (c *RPCClient) GetForkMessages(ctx context.Context) ([]AgentSessionForkMessage, error)
func (*RPCClient) GetLastAssistantText ¶
func (*RPCClient) GetMessages ¶
func (*RPCClient) GetSessionStats ¶
func (c *RPCClient) GetSessionStats(ctx context.Context) (RPCSessionStats, error)
func (*RPCClient) GetState ¶
func (c *RPCClient) GetState(ctx context.Context) (RPCSessionState, error)
func (*RPCClient) NewSession ¶
func (*RPCClient) PromptWithImages ¶
func (*RPCClient) SetAutoCompaction ¶
func (*RPCClient) SetAutoRetry ¶
func (*RPCClient) SetFollowUpMode ¶
func (*RPCClient) SetSessionName ¶
func (*RPCClient) SetSteeringMode ¶
func (*RPCClient) SetThinkingLevel ¶
func (*RPCClient) SteerWithImages ¶
func (*RPCClient) SwitchSession ¶
type RPCCloneResult ¶
type RPCCloneResult struct {
Cancelled bool `json:"cancelled"`
}
type RPCCommand ¶
type RPCCommand struct {
ID string `json:"id,omitempty"`
Type string `json:"type"`
Message string `json:"message,omitempty"`
StreamingBehavior string `json:"streamingBehavior,omitempty"`
Provider string `json:"provider,omitempty"`
ModelID string `json:"modelId,omitempty"`
Level string `json:"level,omitempty"`
Mode string `json:"mode,omitempty"`
CustomInstructions string `json:"customInstructions,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Command string `json:"command,omitempty"`
Images []llm.ContentPart `json:"images,omitempty"`
OutputPath string `json:"outputPath,omitempty"`
SessionPath string `json:"sessionPath,omitempty"`
EntryID string `json:"entryId,omitempty"`
Name string `json:"name,omitempty"`
ParentSession string `json:"parentSession,omitempty"`
}
type RPCCommandSender ¶
type RPCCommandSender interface {
SendRPCCommand(context.Context, RPCCommand) (RPCResponse, error)
}
type RPCCommandSenderFunc ¶
type RPCCommandSenderFunc func(context.Context, RPCCommand) (RPCResponse, error)
func (RPCCommandSenderFunc) SendRPCCommand ¶
func (f RPCCommandSenderFunc) SendRPCCommand(ctx context.Context, command RPCCommand) (RPCResponse, error)
type RPCCommandsResult ¶
type RPCCommandsResult struct {
Commands []RPCSlashCommand `json:"commands"`
}
type RPCCycleModelResult ¶
type RPCExportHTMLResult ¶
type RPCExportHTMLResult struct {
Path string `json:"path"`
}
type RPCForkMessagesResult ¶
type RPCForkMessagesResult struct {
Messages []AgentSessionForkMessage `json:"messages"`
}
type RPCForkResult ¶
type RPCLastAssistantTextResult ¶
type RPCLastAssistantTextResult struct {
Text *string `json:"text"`
}
type RPCLineProcessor ¶
type RPCLineProcessor struct {
Host *RPCSessionHost
Runtime *ProtocolExtensionRuntime
SourceInfo ProtocolSourceInfo
WriteLine func(string)
OnBeforeHostAction func(HostActionRequest)
OnHostAction func(HostActionRequest, HostActionResponse)
AllowedCapabilities []string
EnforceCapabilities bool
RequestTimeout time.Duration
// contains filtered or unexported fields
}
func (*RPCLineProcessor) HandleLine ¶
func (p *RPCLineProcessor) HandleLine(ctx context.Context, line string)
func (*RPCLineProcessor) WriteEvent ¶
func (p *RPCLineProcessor) WriteEvent(event AgentSessionEvent)
type RPCMessagesResult ¶
type RPCResponse ¶
type RPCScopedModel ¶
type RPCSessionHost ¶
type RPCSessionHost struct {
Session *AgentSession
Settings *SettingsManager
SteeringMode string
FollowUpMode string
AutoCompactionEnabled bool
AvailableModels []llm.Model
ScopedModels []RPCScopedModel
ProviderAuthStatus AuthStatusResolver
PromptPreflight func(RPCCommand) error
ViewTreeHost *ViewTreeHost
TUIEditor TUIEditorHost
TUIDialog TUIDialogHost
TUITitle TUITitleHost
TUIWorking TUIWorkingHost
TUIThinkingLabel TUIThinkingLabelHost
TUIStatus TUIStatusHost
TUITheme TUIThemeHost
TUIToolExpansion TUIToolExpansionHost
ProcessExecutor HostProcessExecutor
PolicyRequester HostPolicyRequester
ReloadSession func() error
// contains filtered or unexported fields
}
func NewRPCSessionHost ¶
func NewRPCSessionHost(session *AgentSession) *RPCSessionHost
func (*RPCSessionHost) AcceptPrompt ¶
func (h *RPCSessionHost) AcceptPrompt(command RPCCommand) error
func (*RPCSessionHost) Bash ¶
func (h *RPCSessionHost) Bash(ctx context.Context, command string) (BashResult, error)
func (*RPCSessionHost) Clone ¶
func (h *RPCSessionHost) Clone() (RPCCloneResult, error)
func (*RPCSessionHost) CycleModel ¶
func (h *RPCSessionHost) CycleModel() (*RPCCycleModelResult, error)
func (*RPCSessionHost) CycleModelDirection ¶
func (h *RPCSessionHost) CycleModelDirection(direction string) (*RPCCycleModelResult, error)
func (*RPCSessionHost) CycleThinkingLevel ¶
func (h *RPCSessionHost) CycleThinkingLevel() (string, error)
func (*RPCSessionHost) ExportHTML ¶
func (h *RPCSessionHost) ExportHTML(outputPath string) (string, error)
func (*RPCSessionHost) ExportJSONL ¶
func (h *RPCSessionHost) ExportJSONL(outputPath string) (string, error)
func (*RPCSessionHost) Fork ¶
func (h *RPCSessionHost) Fork(entryID string) (RPCForkResult, error)
func (*RPCSessionHost) GetCommands ¶
func (h *RPCSessionHost) GetCommands() RPCCommandsResult
func (*RPCSessionHost) GetLastAssistantText ¶
func (h *RPCSessionHost) GetLastAssistantText() *string
func (*RPCSessionHost) GetSessionStats ¶
func (h *RPCSessionHost) GetSessionStats() RPCSessionStats
func (*RPCSessionHost) GetState ¶
func (h *RPCSessionHost) GetState() RPCSessionState
func (*RPCSessionHost) HandleCommand ¶
func (h *RPCSessionHost) HandleCommand(ctx context.Context, command RPCCommand) RPCResponse
func (*RPCSessionHost) HandleHostAction ¶
func (h *RPCSessionHost) HandleHostAction(request HostActionRequest) HostActionResponse
func (*RPCSessionHost) HandleHostActionContext ¶
func (h *RPCSessionHost) HandleHostActionContext(ctx context.Context, request HostActionRequest) HostActionResponse
func (*RPCSessionHost) OnSessionReplaced ¶
func (h *RPCSessionHost) OnSessionReplaced(listener func(*AgentSession)) func()
func (*RPCSessionHost) SetAutoCompaction ¶
func (h *RPCSessionHost) SetAutoCompaction(enabled *bool) error
func (*RPCSessionHost) SetAutoRetry ¶
func (h *RPCSessionHost) SetAutoRetry(enabled *bool) error
func (*RPCSessionHost) SetFollowUpMode ¶
func (h *RPCSessionHost) SetFollowUpMode(mode string) error
func (*RPCSessionHost) SetModel ¶
func (h *RPCSessionHost) SetModel(provider, modelID string) (llm.Model, error)
func (*RPCSessionHost) SetSteeringMode ¶
func (h *RPCSessionHost) SetSteeringMode(mode string) error
func (*RPCSessionHost) SetThinkingLevel ¶
func (h *RPCSessionHost) SetThinkingLevel(level string) error
func (*RPCSessionHost) SubscribeEvents ¶
func (h *RPCSessionHost) SubscribeEvents(listener func(AgentSessionEvent)) func()
func (*RPCSessionHost) SwitchSession ¶
func (h *RPCSessionHost) SwitchSession(sessionPath string) (RPCCloneResult, error)
type RPCSessionState ¶
type RPCSessionState struct {
Model *llm.Model `json:"model,omitempty"`
ThinkingLevel string `json:"thinkingLevel"`
IsStreaming bool `json:"isStreaming"`
IsCompacting bool `json:"isCompacting"`
SteeringMode string `json:"steeringMode"`
FollowUpMode string `json:"followUpMode"`
SessionFile string `json:"sessionFile,omitempty"`
SessionID string `json:"sessionId"`
SessionName string `json:"sessionName,omitempty"`
AutoCompactionEnabled bool `json:"autoCompactionEnabled"`
MessageCount int `json:"messageCount"`
PendingMessageCount int `json:"pendingMessageCount"`
}
type RPCSessionStats ¶
type RPCSessionStats struct {
SessionFile string `json:"sessionFile,omitempty"`
SessionID string `json:"sessionId"`
UserMessages int `json:"userMessages"`
AssistantMessages int `json:"assistantMessages"`
ToolCalls int `json:"toolCalls"`
ToolResults int `json:"toolResults"`
TotalMessages int `json:"totalMessages"`
Tokens RPCSessionTokens `json:"tokens"`
Cost float64 `json:"cost"`
ContextUsage *AgentContextUsage `json:"contextUsage,omitempty"`
}
type RPCSessionTokens ¶
type RPCSlashCommand ¶
type RPCThinkingLevelResult ¶
type RPCThinkingLevelResult struct {
Level string `json:"level"`
}
type ReadTool ¶
type ReadTool struct {
// contains filtered or unexported fields
}
func NewReadTool ¶
func NewReadTool(cwd string, operations ...FileToolOperations) ReadTool
func NewReadToolWithOptions ¶
func NewReadToolWithOptions(cwd string, options ReadToolOptions, operations ...FileToolOperations) ReadTool
func (ReadTool) Execute ¶
func (t ReadTool) Execute(_ string, input ReadToolInput) (FileToolResult, error)
type ReadToolInput ¶
type ReadToolOptions ¶
type ReadToolOptions struct {
AutoResizeImages *bool
}
type ReadToolTruncation ¶
type ReadToolTruncation struct {
Truncated bool `json:"truncated"`
TruncatedBy string `json:"truncatedBy"`
TotalLines int `json:"totalLines"`
TotalBytes int `json:"totalBytes"`
OutputLines int `json:"outputLines"`
OutputBytes int `json:"outputBytes"`
LastLinePartial bool `json:"lastLinePartial"`
FirstLineExceedsLimit bool `json:"firstLineExceedsLimit"`
MaxLines int `json:"maxLines"`
MaxBytes int `json:"maxBytes"`
}
type ResizedImage ¶
type ResizedImage = imageresize.ResizedImage
func ResizeImage ¶
func ResizeImage(part llm.ContentPart, options ...ImageResizeOptions) *ResizedImage
type ResolveCLIModelOptions ¶
type ResolveCLIModelOptions = modelresolver.ResolveCLIModelOptions
type ResolveCLIModelResult ¶
type ResolveCLIModelResult = modelresolver.ResolveCLIModelResult
func ResolveCLIModel ¶
func ResolveCLIModel(options ResolveCLIModelOptions) ResolveCLIModelResult
type ResolveExtensionSourcesOptions ¶
type ResolveExtensionSourcesOptions struct {
Temporary bool
}
type ResolvedRequestAuth ¶
type ResourceAgentsFilesResult ¶
type ResourceAgentsFilesResult struct {
AgentsFiles []ResourceContextFile
}
type ResourceContextFile ¶
type ResourceExtension ¶
type ResourceExtension struct {
ExtensionPaths []ResourceExtensionPath
SkillPaths []ResourceSkillPath
PromptPaths []ResourcePromptPath
ThemePaths []ResourceThemePath
}
type ResourceExtensionPath ¶
type ResourceExtensionPath struct {
Path string
Metadata ProtocolSourceInfo
}
type ResourceExtensionsResult ¶
type ResourceExtensionsResult struct {
Extensions []ProtocolExtensionSource
ProcessExtensions []ProtocolPackageProcessExtension
Errors []ProtocolExtensionDiscoveryError
Runtime *ProtocolExtensionRuntime
}
type ResourcePromptPath ¶
type ResourcePromptPath struct {
Path string
Metadata ProtocolSourceInfo
}
type ResourcePromptsResult ¶
type ResourcePromptsResult struct {
Prompts []PromptTemplate
}
type ResourceSkillPath ¶
type ResourceSkillPath struct {
Path string
Metadata ProtocolSourceInfo
}
type ResourceSkillsResult ¶
type ResourceSkillsResult = AgentSessionSkillsResult
type ResourceTheme ¶
type ResourceThemePath ¶
type ResourceThemePath struct {
Path string
Metadata ProtocolSourceInfo
}
type ResourceThemesResult ¶
type ResourceThemesResult struct {
Themes []ResourceTheme
Diagnostics []agentharness.SkillDiagnostic
}
type SDKAgent ¶
type SDKAgent struct {
State SDKAgentState
}
type SDKAgentState ¶
type SDKContentPart ¶
type SDKTool ¶
type SDKTool struct {
Name string
Label string
Description string
Parameters llm.Schema
PromptSnippet string
PromptGuidelines []string
ExecutionMode string
SourceInfo ProtocolSourceInfo
PrepareArguments func(input map[string]any) map[string]any
Execute func(toolCallID string, input map[string]any) (SDKToolResult, error)
ExecuteWithUpdates func(toolCallID string, input map[string]any, onUpdate func(SDKToolResult)) (SDKToolResult, error)
}
type SDKToolResult ¶
type SDKToolResult struct {
Content []SDKContentPart
Details any
}
type SandboxEnvReader ¶
type SandboxEnvReader = sandboxenv.Reader
type ScopedModel ¶
type ScopedModel = modelresolver.ScopedModel
func ResolveModelScope ¶
func ResolveModelScope(patterns []string, registry CodingModelRegistry) []ScopedModel
type ScopedModelsSelectorComponent ¶
type ScopedModelsSelectorComponent struct {
// contains filtered or unexported fields
}
func NewScopedModelsSelectorComponent ¶
func NewScopedModelsSelectorComponent(config ScopedModelsSelectorConfig, callbacks ScopedModelsSelectorCallbacks) *ScopedModelsSelectorComponent
func (*ScopedModelsSelectorComponent) EnabledModelIDs ¶
func (c *ScopedModelsSelectorComponent) EnabledModelIDs() []string
func (*ScopedModelsSelectorComponent) Focused ¶
func (c *ScopedModelsSelectorComponent) Focused() bool
func (*ScopedModelsSelectorComponent) HandleInput ¶
func (c *ScopedModelsSelectorComponent) HandleInput(data string)
func (*ScopedModelsSelectorComponent) Invalidate ¶
func (c *ScopedModelsSelectorComponent) Invalidate()
func (*ScopedModelsSelectorComponent) Render ¶
func (c *ScopedModelsSelectorComponent) Render(width int) []string
func (*ScopedModelsSelectorComponent) SetFocused ¶
func (c *ScopedModelsSelectorComponent) SetFocused(focused bool)
type ScopedModelsSelectorConfig ¶
type ScopedModelsSelectorConfig struct {
AllModels []llm.Model
EnabledModelIDs []string
Keybindings KeybindingsConfig
}
type SelfUpdateCommand ¶
type SelfUpdateCommand struct {
Command string
Args []string
Display string
Steps []SelfUpdateCommandStep
}
func GetSelfUpdateCommand ¶
func GetSelfUpdateCommand(packageName string, env InstallEnvironment, _ []string, updatePackageName string) *SelfUpdateCommand
type SelfUpdateCommandStep ¶
type SelfUpdateOptions ¶
type SelfUpdateOptions struct {
PackageName string
CurrentVersion string
Force bool
Environment InstallEnvironment
VersionCheck VersionReleaseChecker
VersionCheckOptions VersionCheckOptions
}
type SelfUpdateResult ¶
type SessionContext ¶
type SessionContext struct {
Messages []any
ThinkingLevel string
Model *SessionModel
}
func BuildSessionContext ¶
func BuildSessionContext(entries []FileEntry, leafID *string, byID map[string]FileEntry) SessionContext
type SessionHeader ¶
type SessionImportFileNotFoundError ¶
type SessionImportFileNotFoundError struct {
Path string
}
func (SessionImportFileNotFoundError) Error ¶
func (e SessionImportFileNotFoundError) Error() string
type SessionInfo ¶
type SessionInfo struct {
Path string
ID string
CWD string
Name string
ParentSessionPath string
Created time.Time
Modified time.Time
MessageCount int
FirstMessage string
AllMessagesText string
}
func BuildSessionInfo ¶
func BuildSessionInfo(filePath string) (*SessionInfo, error)
func FilterAndSortSessions ¶
func FilterAndSortSessions(sessions []SessionInfo, query string, sortMode SessionSelectorSortMode, filters ...SessionSelectorNameFilter) []SessionInfo
func ListAllSessions ¶
func ListAllSessions(args ...any) []SessionInfo
func ListSessions ¶
func ListSessions(cwd string, args ...any) []SessionInfo
type SessionListProgress ¶
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func ContinueRecentSession ¶
func ContinueRecentSession(cwd string, sessionDir ...string) (*SessionManager, error)
func CreateSessionManager ¶
func CreateSessionManager(cwd string, sessionDir ...string) (*SessionManager, error)
func ForkSessionFrom ¶
func ForkSessionFrom(sourcePath, targetCwd string, sessionDir ...string) (*SessionManager, error)
func InMemorySessionManager ¶
func InMemorySessionManager(cwd ...string) (*SessionManager, error)
func OpenSessionManager ¶
func OpenSessionManager(path string, args ...string) (*SessionManager, error)
func (*SessionManager) AppendCompaction ¶
func (s *SessionManager) AppendCompaction(summary, firstKeptEntryID string, tokensBefore int) string
func (*SessionManager) AppendCustomEntry ¶
func (s *SessionManager) AppendCustomEntry(customType string, data any) string
func (*SessionManager) AppendCustomMessageEntry ¶
func (*SessionManager) AppendCustomMessageEntryWithContext ¶
func (*SessionManager) AppendLabelChange ¶
func (s *SessionManager) AppendLabelChange(targetID, label string) (string, error)
func (*SessionManager) AppendMessage ¶
func (s *SessionManager) AppendMessage(message any) string
func (*SessionManager) AppendModelChange ¶
func (s *SessionManager) AppendModelChange(provider, modelID string) string
func (*SessionManager) AppendSessionInfo ¶
func (s *SessionManager) AppendSessionInfo(name string) string
func (*SessionManager) AppendThinkingLevelChange ¶
func (s *SessionManager) AppendThinkingLevelChange(thinkingLevel string) string
func (*SessionManager) Branch ¶
func (s *SessionManager) Branch(branchFromID string) error
func (*SessionManager) BranchWithSummary ¶
func (s *SessionManager) BranchWithSummary(branchFromID *string, summary string) (string, error)
func (*SessionManager) BuildSessionContext ¶
func (s *SessionManager) BuildSessionContext() SessionContext
func (*SessionManager) CreateBranchedSession ¶
func (s *SessionManager) CreateBranchedSession(leafID string) (string, error)
func (*SessionManager) ForkAtEntry ¶
func (s *SessionManager) ForkAtEntry(entryID string) (*SessionManager, error)
func (*SessionManager) ForkBeforeEntry ¶
func (s *SessionManager) ForkBeforeEntry(entryID string) (*SessionManager, error)
func (*SessionManager) GetBranch ¶
func (s *SessionManager) GetBranch(fromID ...string) []FileEntry
func (*SessionManager) GetCWD ¶
func (s *SessionManager) GetCWD() string
func (*SessionManager) GetChildren ¶
func (s *SessionManager) GetChildren(parentID string) []FileEntry
func (*SessionManager) GetCwd ¶
func (s *SessionManager) GetCwd() string
func (*SessionManager) GetEntries ¶
func (s *SessionManager) GetEntries() []FileEntry
func (*SessionManager) GetEntry ¶
func (s *SessionManager) GetEntry(id string) *FileEntry
func (*SessionManager) GetHeader ¶
func (s *SessionManager) GetHeader() *SessionHeader
func (*SessionManager) GetLeafEntry ¶
func (s *SessionManager) GetLeafEntry() *FileEntry
func (*SessionManager) GetLeafID ¶
func (s *SessionManager) GetLeafID() *string
func (*SessionManager) GetLeafId ¶
func (s *SessionManager) GetLeafId() *string
func (*SessionManager) GetSessionDir ¶
func (s *SessionManager) GetSessionDir() string
func (*SessionManager) GetSessionFile ¶
func (s *SessionManager) GetSessionFile() string
func (*SessionManager) GetSessionID ¶
func (s *SessionManager) GetSessionID() string
func (*SessionManager) GetSessionId ¶
func (s *SessionManager) GetSessionId() string
func (*SessionManager) GetSessionName ¶
func (s *SessionManager) GetSessionName() string
func (*SessionManager) GetTree ¶
func (s *SessionManager) GetTree() []*SessionTreeNode
func (*SessionManager) IsPersisted ¶
func (s *SessionManager) IsPersisted() bool
func (*SessionManager) NewSession ¶
func (s *SessionManager) NewSession(options ...NewSessionOptions) string
func (*SessionManager) ResetLeaf ¶
func (s *SessionManager) ResetLeaf()
func (*SessionManager) SetSessionFile ¶
func (s *SessionManager) SetSessionFile(sessionFile string) error
type SessionModel ¶
type SessionSelectorComponent ¶
type SessionSelectorComponent struct {
// contains filtered or unexported fields
}
func NewLoadingSessionSelectorComponent ¶
func NewLoadingSessionSelectorComponent(currentLoader, allLoader SessionSelectorLoader, options SessionSelectorOptions) *SessionSelectorComponent
func NewSessionSelectorComponent ¶
func NewSessionSelectorComponent(sessions []SessionInfo, options SessionSelectorOptions) *SessionSelectorComponent
func (*SessionSelectorComponent) GetSessionList ¶
func (s *SessionSelectorComponent) GetSessionList() *SessionSelectorComponent
func (*SessionSelectorComponent) HandleInput ¶
func (s *SessionSelectorComponent) HandleInput(input string)
func (*SessionSelectorComponent) Invalidate ¶
func (s *SessionSelectorComponent) Invalidate()
func (*SessionSelectorComponent) IsAllLoading ¶
func (s *SessionSelectorComponent) IsAllLoading() bool
func (*SessionSelectorComponent) Render ¶
func (s *SessionSelectorComponent) Render(width int) []string
func (*SessionSelectorComponent) Scope ¶
func (s *SessionSelectorComponent) Scope() string
func (*SessionSelectorComponent) SetNameFilter ¶
func (s *SessionSelectorComponent) SetNameFilter(filter SessionSelectorNameFilter)
func (*SessionSelectorComponent) SetSortMode ¶
func (s *SessionSelectorComponent) SetSortMode(mode SessionSelectorSortMode)
type SessionSelectorLoader ¶
type SessionSelectorLoader func(SessionListProgress) ([]SessionInfo, error)
type SessionSelectorNameFilter ¶
type SessionSelectorNameFilter string
const ( SessionSelectorNameAll SessionSelectorNameFilter = "all" SessionSelectorNameNamed SessionSelectorNameFilter = "named" )
type SessionSelectorOptions ¶
type SessionSelectorOptions struct {
ShowRenameHint bool
RenameSession func(path, name string) error
DeleteSession func(path string) error
Keybindings KeybindingsConfig
OnDeleteConfirmationChange func(path *string)
OnError func(message string)
OnSelect func(path string)
OnCancel func()
RequestRender func()
CurrentSessionPath string
}
type SessionSelectorSortMode ¶
type SessionSelectorSortMode string
const ( SessionSelectorSortThreaded SessionSelectorSortMode = "threaded" SessionSelectorSortRecent SessionSelectorSortMode = "recent" SessionSelectorSortRelevance SessionSelectorSortMode = "relevance" )
type SessionTreeNode ¶
type SessionTreeNode struct {
Entry FileEntry
Children []*SessionTreeNode
Label string
LabelTimestamp string
}
type SettingsError ¶
type SettingsManager ¶
type SettingsManager struct {
// contains filtered or unexported fields
}
func NewInMemorySettingsManager ¶
func NewInMemorySettingsManager(settings map[string]any) *SettingsManager
func NewSettingsManager ¶
func NewSettingsManager(cwd, agentDir string) *SettingsManager
func (*SettingsManager) DrainErrors ¶
func (s *SettingsManager) DrainErrors() []SettingsError
func (*SettingsManager) Flush ¶
func (s *SettingsManager) Flush() error
func (*SettingsManager) GetAutocompleteMaxVisible ¶
func (s *SettingsManager) GetAutocompleteMaxVisible() int
func (*SettingsManager) GetBlockImages ¶
func (s *SettingsManager) GetBlockImages() bool
func (*SettingsManager) GetBranchSummarySkipPrompt ¶
func (s *SettingsManager) GetBranchSummarySkipPrompt() bool
func (*SettingsManager) GetClearOnShrink ¶
func (s *SettingsManager) GetClearOnShrink() bool
func (*SettingsManager) GetCollapseChangelog ¶
func (s *SettingsManager) GetCollapseChangelog() bool
func (*SettingsManager) GetDefaultModel ¶
func (s *SettingsManager) GetDefaultModel() string
func (*SettingsManager) GetDefaultProvider ¶
func (s *SettingsManager) GetDefaultProvider() string
func (*SettingsManager) GetDefaultThinkingLevel ¶
func (s *SettingsManager) GetDefaultThinkingLevel() string
func (*SettingsManager) GetDoubleEscapeAction ¶
func (s *SettingsManager) GetDoubleEscapeAction() string
func (*SettingsManager) GetEditorPaddingX ¶
func (s *SettingsManager) GetEditorPaddingX() int
func (*SettingsManager) GetEnableInstallTelemetry ¶
func (s *SettingsManager) GetEnableInstallTelemetry() bool
func (*SettingsManager) GetEnableSkillCommands ¶
func (s *SettingsManager) GetEnableSkillCommands() bool
func (*SettingsManager) GetEnabledModels ¶
func (s *SettingsManager) GetEnabledModels() []string
func (*SettingsManager) GetExtensionPaths ¶
func (s *SettingsManager) GetExtensionPaths() []string
func (*SettingsManager) GetHTTPIdleTimeoutMS ¶
func (s *SettingsManager) GetHTTPIdleTimeoutMS() int
func (*SettingsManager) GetHideThinkingBlock ¶
func (s *SettingsManager) GetHideThinkingBlock() bool
func (*SettingsManager) GetImageAutoResize ¶
func (s *SettingsManager) GetImageAutoResize() bool
func (*SettingsManager) GetImageWidthCells ¶
func (s *SettingsManager) GetImageWidthCells() int
func (*SettingsManager) GetLastChangelogVersion ¶
func (s *SettingsManager) GetLastChangelogVersion() string
func (*SettingsManager) GetPackages ¶
func (s *SettingsManager) GetPackages() []any
func (*SettingsManager) GetProviderRetrySettings ¶
func (s *SettingsManager) GetProviderRetrySettings() ProviderRetrySettings
func (*SettingsManager) GetQuietStartup ¶
func (s *SettingsManager) GetQuietStartup() bool
func (*SettingsManager) GetRetryEnabled ¶
func (s *SettingsManager) GetRetryEnabled() bool
func (*SettingsManager) GetRetrySettings ¶
func (s *SettingsManager) GetRetrySettings() AgentSessionRetrySettings
func (*SettingsManager) GetSessionDir ¶
func (s *SettingsManager) GetSessionDir() string
func (*SettingsManager) GetShellCommandPrefix ¶
func (s *SettingsManager) GetShellCommandPrefix() string
func (*SettingsManager) GetShowHardwareCursor ¶
func (s *SettingsManager) GetShowHardwareCursor() bool
func (*SettingsManager) GetShowImages ¶
func (s *SettingsManager) GetShowImages() bool
func (*SettingsManager) GetShowTerminalProgress ¶
func (s *SettingsManager) GetShowTerminalProgress() bool
func (*SettingsManager) GetTheme ¶
func (s *SettingsManager) GetTheme() string
func (*SettingsManager) GetTransport ¶
func (s *SettingsManager) GetTransport() string
func (*SettingsManager) GetTreeFilterMode ¶
func (s *SettingsManager) GetTreeFilterMode() string
func (*SettingsManager) GetWarnings ¶
func (s *SettingsManager) GetWarnings() WarningSettings
func (*SettingsManager) Reload ¶
func (s *SettingsManager) Reload()
func (*SettingsManager) SetAutocompleteMaxVisible ¶
func (s *SettingsManager) SetAutocompleteMaxVisible(visible int)
func (*SettingsManager) SetBlockImages ¶
func (s *SettingsManager) SetBlockImages(blocked bool)
func (*SettingsManager) SetBranchSummarySkipPrompt ¶
func (s *SettingsManager) SetBranchSummarySkipPrompt(skip bool)
func (*SettingsManager) SetClearOnShrink ¶
func (s *SettingsManager) SetClearOnShrink(enabled bool)
func (*SettingsManager) SetCollapseChangelog ¶
func (s *SettingsManager) SetCollapseChangelog(collapsed bool)
func (*SettingsManager) SetDefaultModel ¶
func (s *SettingsManager) SetDefaultModel(model string)
func (*SettingsManager) SetDefaultProvider ¶
func (s *SettingsManager) SetDefaultProvider(provider string)
func (*SettingsManager) SetDefaultThinkingLevel ¶
func (s *SettingsManager) SetDefaultThinkingLevel(level string)
func (*SettingsManager) SetDoubleEscapeAction ¶
func (s *SettingsManager) SetDoubleEscapeAction(action string)
func (*SettingsManager) SetEditorPaddingX ¶
func (s *SettingsManager) SetEditorPaddingX(padding int)
func (*SettingsManager) SetEnableInstallTelemetry ¶
func (s *SettingsManager) SetEnableInstallTelemetry(enabled bool)
func (*SettingsManager) SetEnableSkillCommands ¶
func (s *SettingsManager) SetEnableSkillCommands(enabled bool)
func (*SettingsManager) SetEnabledModels ¶
func (s *SettingsManager) SetEnabledModels(models []string)
func (*SettingsManager) SetHTTPIdleTimeoutMS ¶
func (s *SettingsManager) SetHTTPIdleTimeoutMS(timeoutMS int)
func (*SettingsManager) SetHideThinkingBlock ¶
func (s *SettingsManager) SetHideThinkingBlock(hidden bool)
func (*SettingsManager) SetImageAutoResize ¶
func (s *SettingsManager) SetImageAutoResize(enabled bool)
func (*SettingsManager) SetImageWidthCells ¶
func (s *SettingsManager) SetImageWidthCells(width int)
func (*SettingsManager) SetLastChangelogVersion ¶
func (s *SettingsManager) SetLastChangelogVersion(version string)
func (*SettingsManager) SetPackages ¶
func (s *SettingsManager) SetPackages(packages []any)
func (*SettingsManager) SetProjectExtensionPaths ¶
func (s *SettingsManager) SetProjectExtensionPaths(paths []string)
func (*SettingsManager) SetProjectPackages ¶
func (s *SettingsManager) SetProjectPackages(packages []any)
func (*SettingsManager) SetQuietStartup ¶
func (s *SettingsManager) SetQuietStartup(enabled bool)
func (*SettingsManager) SetRetryEnabled ¶
func (s *SettingsManager) SetRetryEnabled(enabled bool)
func (*SettingsManager) SetShowHardwareCursor ¶
func (s *SettingsManager) SetShowHardwareCursor(enabled bool)
func (*SettingsManager) SetShowImages ¶
func (s *SettingsManager) SetShowImages(enabled bool)
func (*SettingsManager) SetShowTerminalProgress ¶
func (s *SettingsManager) SetShowTerminalProgress(enabled bool)
func (*SettingsManager) SetTheme ¶
func (s *SettingsManager) SetTheme(theme string)
func (*SettingsManager) SetTransport ¶
func (s *SettingsManager) SetTransport(transport string)
func (*SettingsManager) SetTreeFilterMode ¶
func (s *SettingsManager) SetTreeFilterMode(mode string)
func (*SettingsManager) SetWarningAnthropicExtraUsage ¶
func (s *SettingsManager) SetWarningAnthropicExtraUsage(enabled bool)
func (*SettingsManager) SetWarnings ¶
func (s *SettingsManager) SetWarnings(warnings WarningSettings)
type SystemPromptContextFile ¶
type SystemPromptSkill ¶
type TUIDialogHost ¶
type TUIDialogHost interface {
RunTUIDialog(request TUIDialogRequest) (TUIDialogResult, error)
}
type TUIDialogOption ¶
type TUIDialogRequest ¶
type TUIDialogRequest struct {
Kind string `json:"kind"`
Type string `json:"type,omitempty"`
Title string `json:"title,omitempty"`
Message string `json:"message,omitempty"`
Placeholder string `json:"placeholder,omitempty"`
Options []TUIDialogOption `json:"options,omitempty"`
DefaultValue any `json:"defaultValue,omitempty"`
Timeout int `json:"timeout,omitempty"`
}
type TUIDialogResult ¶
type TUIEditorCursorHost ¶
type TUIEditorCustomStateHost ¶
type TUIEditorCustomStateHost interface {
EditorCustomActive() bool
}
type TUIEditorFocusHost ¶
type TUIEditorHost ¶
type TUIEditorPasteHost ¶
type TUIEditorPasteHost interface {
PasteEditorText(text string)
}
type TUIStatusHost ¶
type TUIThemeHost ¶
type TUIThemeHost interface {
CurrentTUITheme() string
AvailableTUIThemes() []TUIThemeInfo
SetTUITheme(name string) error
}
type TUIThemeInfo ¶
type TUIThinkingLabelHost ¶
type TUITitleHost ¶
type TUIToolExpansionHost ¶
type TUIWorkingHost ¶
type TUIWorkingHost interface {
SetTUIWorking(update TUIWorkingUpdate) error
}
type TUIWorkingUpdate ¶
type ThemeExportColors ¶
func GetThemeExportColors ¶
func GetThemeExportColors(themeName, agentDir string) (ThemeExportColors, error)
type ThinkingLevel ¶
type ThinkingLevel = internalcli.ThinkingLevel
const ( ThinkingOff ThinkingLevel = internalcli.ThinkingOff ThinkingMinimal ThinkingLevel = internalcli.ThinkingMinimal ThinkingLow ThinkingLevel = internalcli.ThinkingLow ThinkingMedium ThinkingLevel = internalcli.ThinkingMedium ThinkingHigh ThinkingLevel = internalcli.ThinkingHigh ThinkingXHigh ThinkingLevel = internalcli.ThinkingXHigh )
const DefaultThinkingLevel ThinkingLevel = modelresolver.DefaultThinkingLevel
type TmuxOptionReader ¶
type TmuxOptionReader = tmux.OptionReader
type ToolCallRenderer ¶
type ToolCallRenderer func(args any, context ToolRenderContext) []string
type ToolDefinition ¶
type ToolDefinition struct {
Name string
Description string
Parameters llm.Schema
PrepareArguments func(args any) any
Execute func(callID string, args any) (FileToolResult, error)
RenderCall ToolCallRenderer
RenderResult ToolResultRenderer
}
func CreateBashToolDefinition ¶
func CreateBashToolDefinition(cwd string, options ...BashToolOptions) ToolDefinition
func CreateEditToolDefinition ¶
func CreateEditToolDefinition(cwd string, operations ...FileToolOperations) ToolDefinition
func CreateReadToolDefinition ¶
func CreateReadToolDefinition(cwd string, operations ...FileToolOperations) ToolDefinition
func CreateWriteToolDefinition ¶
func CreateWriteToolDefinition(cwd string, operations ...FileToolOperations) ToolDefinition
type ToolExecutionComponent ¶
type ToolExecutionComponent struct {
// contains filtered or unexported fields
}
func NewToolExecutionComponent ¶
func NewToolExecutionComponent(name, callID string, args any, definition ToolDefinition, cwd string, options ...ToolExecutionOptions) *ToolExecutionComponent
func (*ToolExecutionComponent) Invalidate ¶
func (c *ToolExecutionComponent) Invalidate()
func (*ToolExecutionComponent) MarkExecutionStarted ¶
func (c *ToolExecutionComponent) MarkExecutionStarted()
func (*ToolExecutionComponent) Render ¶
func (c *ToolExecutionComponent) Render(width int) []string
func (*ToolExecutionComponent) SetArgsComplete ¶
func (c *ToolExecutionComponent) SetArgsComplete()
func (*ToolExecutionComponent) SetExpanded ¶
func (c *ToolExecutionComponent) SetExpanded(expanded bool)
func (*ToolExecutionComponent) SetImageWidthCells ¶
func (c *ToolExecutionComponent) SetImageWidthCells(width int)
func (*ToolExecutionComponent) SetShowImages ¶
func (c *ToolExecutionComponent) SetShowImages(show bool)
func (*ToolExecutionComponent) UpdateArgs ¶
func (c *ToolExecutionComponent) UpdateArgs(args any)
func (*ToolExecutionComponent) UpdatePartialResult ¶
func (c *ToolExecutionComponent) UpdatePartialResult(result FileToolResult, isError bool) bool
func (*ToolExecutionComponent) UpdateResult ¶
func (c *ToolExecutionComponent) UpdateResult(result FileToolResult, isError bool) bool
func (*ToolExecutionComponent) UpdateResultWithOptions ¶
func (c *ToolExecutionComponent) UpdateResultWithOptions(result FileToolResult, isError, isPartial bool) bool
type ToolExecutionOptions ¶
type ToolRenderContext ¶
type ToolRenderResultOptions ¶
type ToolResultRenderer ¶
type ToolResultRenderer func(result FileToolResult, options ToolRenderResultOptions, context ToolRenderContext) []string
type TopLevelResourceToggle ¶
type TreeSelectorComponent ¶
type TreeSelectorComponent struct {
OnSelect func(entryID string)
OnCancel func()
// contains filtered or unexported fields
}
func NewTreeSelectorComponent ¶
func NewTreeSelectorComponent(roots []*SessionTreeNode, currentLeafID string, options ...TreeSelectorOptions) *TreeSelectorComponent
func (*TreeSelectorComponent) Focused ¶
func (s *TreeSelectorComponent) Focused() bool
func (*TreeSelectorComponent) GetTreeList ¶
func (s *TreeSelectorComponent) GetTreeList() *TreeSelectorList
func (*TreeSelectorComponent) HandleInput ¶
func (s *TreeSelectorComponent) HandleInput(input string)
func (*TreeSelectorComponent) Invalidate ¶
func (s *TreeSelectorComponent) Invalidate()
func (*TreeSelectorComponent) Render ¶
func (s *TreeSelectorComponent) Render(width int) []string
func (*TreeSelectorComponent) SetFilter ¶
func (s *TreeSelectorComponent) SetFilter(filter TreeSelectorFilter)
func (*TreeSelectorComponent) SetFocused ¶
func (s *TreeSelectorComponent) SetFocused(focused bool)
type TreeSelectorFilter ¶
type TreeSelectorFilter string
const ( TreeSelectorDefaultFilter TreeSelectorFilter = "default" TreeSelectorNoToolsFilter TreeSelectorFilter = "no-tools" TreeSelectorUserFilter TreeSelectorFilter = "user" TreeSelectorLabelFilter TreeSelectorFilter = "label" TreeSelectorAllFilter TreeSelectorFilter = "all" )
type TreeSelectorList ¶
type TreeSelectorList struct {
// contains filtered or unexported fields
}
func (*TreeSelectorList) GetSelectedNode ¶
func (l *TreeSelectorList) GetSelectedNode() *SessionTreeNode
func (*TreeSelectorList) Render ¶
func (l *TreeSelectorList) Render(width int) []string
type TreeSelectorOptions ¶
type TreeSelectorOptions struct {
Keybindings KeybindingsConfig
}
type TriggerCompactExtension ¶
type TriggerCompactExtension struct {
ThresholdTokens int
// contains filtered or unexported fields
}
func NewTriggerCompactExtension ¶
func NewTriggerCompactExtension(thresholdTokens int) *TriggerCompactExtension
func (*TriggerCompactExtension) OnTurnEnd ¶
func (e *TriggerCompactExtension) OnTurnEnd(tokens *int, compact func())
type UserMessageComponent ¶
type UserMessageComponent struct {
Text string
}
func NewUserMessageComponent ¶
func NewUserMessageComponent(text string) UserMessageComponent
func (UserMessageComponent) Render ¶
func (c UserMessageComponent) Render(width int) []string
type UserMessageSelectorComponent ¶
type UserMessageSelectorComponent struct {
OnSelect func(entryID string)
OnCancel func()
// contains filtered or unexported fields
}
func NewUserMessageSelectorComponent ¶
func NewUserMessageSelectorComponent(messages []AgentSessionForkMessage, initialSelectedID string) *UserMessageSelectorComponent
func (*UserMessageSelectorComponent) Focused ¶
func (c *UserMessageSelectorComponent) Focused() bool
func (*UserMessageSelectorComponent) HandleInput ¶
func (c *UserMessageSelectorComponent) HandleInput(data string)
func (*UserMessageSelectorComponent) Invalidate ¶
func (c *UserMessageSelectorComponent) Invalidate()
func (*UserMessageSelectorComponent) Render ¶
func (c *UserMessageSelectorComponent) Render(width int) []string
func (*UserMessageSelectorComponent) SetFocused ¶
func (c *UserMessageSelectorComponent) SetFocused(focused bool)
type VersionCheckOptions ¶
type VersionCheckOptions = versioncheck.Options
type VersionReleaseChecker ¶
type VersionReleaseChecker func(currentVersion string, options VersionCheckOptions) (LatestGiRelease, bool)
type ViewTreeChange ¶
type ViewTreeComponent ¶
type ViewTreeComponent struct {
View ViewTreeNode
Host *ViewTreeHost
MountID string
// contains filtered or unexported fields
}
func NewMountedViewTreeComponent ¶
func NewMountedViewTreeComponent(host *ViewTreeHost, mountID string) *ViewTreeComponent
func NewViewTreeComponent ¶
func NewViewTreeComponent(view ViewTreeNode) *ViewTreeComponent
func (*ViewTreeComponent) Focused ¶
func (c *ViewTreeComponent) Focused() bool
func (*ViewTreeComponent) HandleInput ¶
func (c *ViewTreeComponent) HandleInput(data string)
func (*ViewTreeComponent) Invalidate ¶
func (c *ViewTreeComponent) Invalidate()
func (*ViewTreeComponent) Render ¶
func (c *ViewTreeComponent) Render(width int) []string
func (*ViewTreeComponent) SetFocused ¶
func (c *ViewTreeComponent) SetFocused(focused bool)
type ViewTreeEvent ¶
type ViewTreeFocus ¶
type ViewTreeHost ¶
type ViewTreeHost struct {
// contains filtered or unexported fields
}
func NewViewTreeHost ¶
func NewViewTreeHost() *ViewTreeHost
func (*ViewTreeHost) Blur ¶
func (h *ViewTreeHost) Blur(mountID, nodeID string) error
func (*ViewTreeHost) DispatchEvent ¶
func (h *ViewTreeHost) DispatchEvent(mountID, nodeID, event string, data map[string]any) error
func (*ViewTreeHost) DispatchResize ¶
func (h *ViewTreeHost) DispatchResize(width, height int) error
func (*ViewTreeHost) DispatchThemeChange ¶
func (h *ViewTreeHost) DispatchThemeChange(name string) error
func (*ViewTreeHost) DispatchTick ¶
func (h *ViewTreeHost) DispatchTick(frame int64) error
func (*ViewTreeHost) DispatchVisibilityChange ¶
func (h *ViewTreeHost) DispatchVisibilityChange(mountID string, visible bool, reason string) error
func (*ViewTreeHost) Events ¶
func (h *ViewTreeHost) Events() []ViewTreeEvent
func (*ViewTreeHost) Focus ¶
func (h *ViewTreeHost) Focus(mountID, nodeID string) error
func (*ViewTreeHost) Focused ¶
func (h *ViewTreeHost) Focused() ViewTreeFocus
func (*ViewTreeHost) HasEventSubscription ¶
func (h *ViewTreeHost) HasEventSubscription(event string) bool
func (*ViewTreeHost) Mount ¶
func (h *ViewTreeHost) Mount(mountID, slot string, view ViewTreeNode) error
func (*ViewTreeHost) MountWithOptions ¶
func (h *ViewTreeHost) MountWithOptions(mountID, slot string, view ViewTreeNode, options ...ViewTreeMountOptions) error
func (*ViewTreeHost) Mounted ¶
func (h *ViewTreeHost) Mounted(mountID string) (ViewTreeMount, bool)
func (*ViewTreeHost) MountsBySlot ¶
func (h *ViewTreeHost) MountsBySlot(slot string) []ViewTreeMount
func (*ViewTreeHost) OnChange ¶
func (h *ViewTreeHost) OnChange(listener func(ViewTreeChange)) func()
func (*ViewTreeHost) OnEvent ¶
func (h *ViewTreeHost) OnEvent(listener func(ViewTreeEvent)) func()
func (*ViewTreeHost) Patch ¶
func (h *ViewTreeHost) Patch(mountID string, ops []ViewTreePatchOperation) error
func (*ViewTreeHost) RenderMount ¶
func (h *ViewTreeHost) RenderMount(mountID string, width int) ([]string, error)
func (*ViewTreeHost) SetStatus ¶
func (h *ViewTreeHost) SetStatus(key, text string, priority int) error
func (*ViewTreeHost) Unmount ¶
func (h *ViewTreeHost) Unmount(mountID string) bool
type ViewTreeItem ¶
type ViewTreeItem struct {
Node *ViewTreeNode
Item *ViewTreeListItem
}
func (ViewTreeItem) MarshalJSON ¶
func (i ViewTreeItem) MarshalJSON() ([]byte, error)
func (*ViewTreeItem) UnmarshalJSON ¶
func (i *ViewTreeItem) UnmarshalJSON(data []byte) error
type ViewTreeListItem ¶
type ViewTreeListItem struct {
ID string `json:"id"`
Text string `json:"text,omitempty"`
Checked *bool `json:"checked,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Children []ViewTreeListItem `json:"children,omitempty"`
}
type ViewTreeMount ¶
type ViewTreeMount struct {
MountID string
Slot string
View ViewTreeNode
Priority int
Overlay *ViewTreeOverlayOptions
}
type ViewTreeMountOptions ¶
type ViewTreeMountOptions struct {
Priority int
Overlay *ViewTreeOverlayOptions
}
type ViewTreeNode ¶
type ViewTreeNode struct {
Type string `json:"type"`
ID string `json:"id,omitempty"`
Text string `json:"text,omitempty"`
Label string `json:"label,omitempty"`
Value *float64 `json:"value,omitempty"`
Children []ViewTreeNode `json:"children,omitempty"`
Items []ViewTreeItem `json:"items,omitempty"`
Columns []ViewTreeTableColumn `json:"columns,omitempty"`
Rows []map[string]any `json:"rows,omitempty"`
Style *ViewTreeStyle `json:"style,omitempty"`
Fallback *ViewTreeNode `json:"fallback,omitempty"`
Events []string `json:"events,omitempty"`
}
type ViewTreeOverlayMargin ¶
func (*ViewTreeOverlayMargin) UnmarshalJSON ¶
func (m *ViewTreeOverlayMargin) UnmarshalJSON(data []byte) error
type ViewTreeOverlayOptions ¶
type ViewTreeOverlayOptions struct {
Width ViewTreeSizeValue `json:"width,omitempty"`
MinWidth int `json:"minWidth,omitempty"`
MaxHeight ViewTreeSizeValue `json:"maxHeight,omitempty"`
Anchor string `json:"anchor,omitempty"`
OffsetX int `json:"offsetX,omitempty"`
OffsetY int `json:"offsetY,omitempty"`
Row ViewTreeSizeValue `json:"row,omitempty"`
Col ViewTreeSizeValue `json:"col,omitempty"`
Margin ViewTreeOverlayMargin `json:"margin,omitempty"`
NonCapturing bool `json:"nonCapturing,omitempty"`
}
type ViewTreePatchOperation ¶
type ViewTreeSizeValue ¶
func (*ViewTreeSizeValue) UnmarshalJSON ¶
func (v *ViewTreeSizeValue) UnmarshalJSON(data []byte) error
type ViewTreeStyle ¶
type ViewTreeTableColumn ¶
type VisualTruncateResult ¶
func TruncateToVisualLines ¶
func TruncateToVisualLines(text string, maxVisualLines, width, paddingX int) VisualTruncateResult
type WarningSettings ¶
type WarningSettings struct {
AnthropicExtraUsage bool
}
type WriteTool ¶
type WriteTool struct {
// contains filtered or unexported fields
}
func NewWriteTool ¶
func NewWriteTool(cwd string, operations ...FileToolOperations) WriteTool
func (WriteTool) Execute ¶
func (t WriteTool) Execute(_ string, input WriteToolInput) (FileToolResult, error)
type WriteToolInput ¶
Source Files
¶
- agent_session_auto_compaction.go
- agent_session_bash.go
- agent_session_branching.go
- agent_session_runtime.go
- agent_session_runtime_events.go
- agent_session_tree_navigation.go
- anthropic_warning.go
- auth_guidance.go
- auth_storage.go
- bash_execution.go
- bash_executor.go
- bash_output_accumulator.go
- bash_process_unix.go
- bash_tool.go
- bash_tool_definition.go
- changelog.go
- changelog_embed.go
- cli.go
- cli_api.go
- cli_config.go
- cli_interactive_auth.go
- cli_interactive_autocomplete.go
- cli_interactive_dialog_host.go
- cli_interactive_editor_host.go
- cli_interactive_help.go
- cli_interactive_keybindings.go
- cli_interactive_mode.go
- cli_interactive_model.go
- cli_interactive_reload.go
- cli_interactive_resources.go
- cli_interactive_session.go
- cli_interactive_settings.go
- cli_interactive_signals_unix.go
- cli_interactive_status.go
- cli_interactive_terminal_errors.go
- cli_interactive_terminal_errors_unix.go
- cli_interactive_tui.go
- cli_message_components.go
- cli_missing_cwd.go
- cli_model_registry.go
- cli_print_mode.go
- cli_resume_selector.go
- cli_session_manager.go
- cli_tui_dialog.go
- clipboard.go
- clipboard_image.go
- config.go
- diff_render.go
- edit_tool_definition.go
- export_html.go
- extension_discovery.go
- extension_selector.go
- file_arguments.go
- file_mutation_queue.go
- file_tool_definitions.go
- file_tools.go
- footer.go
- footer_data_provider.go
- fs_watch.go
- git.go
- host_actions.go
- host_process_unix.go
- image_resize.go
- inprocess_components.go
- interactive_mode.go
- interactive_status.go
- interactive_suspend_unix.go
- keybindings.go
- list_models.go
- login_dialog.go
- mcp_stdio.go
- message_components.go
- model_registry.go
- model_resolver.go
- model_selector_component.go
- oauth_anthropic.go
- oauth_github_copilot.go
- oauth_login.go
- oauth_openai_codex.go
- oauth_selector.go
- official_packages.go
- package_manager.go
- plan_mode_api.go
- print_mode.go
- prompt_templates.go
- protocol_extension_descriptor.go
- protocol_extension_process.go
- protocol_extension_runtime.go
- protocol_package_resolver.go
- resource_loader.go
- restore_sandbox_env.go
- rpc_client.go
- rpc_jsonl.go
- rpc_mode.go
- rpc_session_host.go
- sdk_attribution.go
- sdk_session.go
- search_tools.go
- session_cwd.go
- session_manager.go
- session_selector.go
- session_selector_search.go
- settings_manager.go
- share.go
- startup_timings.go
- syntax_highlight.go
- system_prompt.go
- system_prompt_docs.go
- telemetry.go
- test_harness.go
- theme_export.go
- tmux_keyboard.go
- tool_execution_component.go
- tree_selector.go
- trigger_compact_extension.go
- tui_theme.go
- tui_theme_schema.go
- user_message_selector.go
- utils.go
- version_check.go
- viewtree.go
Click to show internal directories.
Click to hide internal directories.