Documentation
¶
Index ¶
- Constants
- func CenterPosition(screenWidth, screenHeight, dialogWidth, dialogHeight int) (row, col int)
- func CloseWithElicitationResponse(action tools.ElicitationAction, content map[string]any, elicitationID string) tea.Cmd
- func ContentEndRow(dialogRow, dialogHeight int) int
- func ContentStartRow(dialogRow int, headerContent string) int
- func HandleConfirmKeys(msg tea.KeyPressMsg, keyMap ConfirmKeyMap, ...) (layout.Model, tea.Cmd, bool)
- func HandleQuit(msg tea.KeyPressMsg) tea.Cmd
- func HelpKeysWidth(bindings ...string) int
- func IsCommandPalette(d Dialog) bool
- func RenderGroupSeparator(label string, contentWidth int) string
- func RenderHelp(text string, contentWidth int) string
- func RenderHelpKeys(contentWidth int, bindings ...string) string
- func RenderSeparator(contentWidth int) string
- func RenderTitle(title string, contentWidth int, style lipgloss.Style) string
- type BaseDialog
- func (b *BaseDialog) CenterDialog(renderedDialog string) (row, col int)
- func (b *BaseDialog) ComputeDialogWidth(percent, minWidth, maxWidth int) int
- func (b *BaseDialog) ContentWidth(dialogWidth, paddingX int) int
- func (b *BaseDialog) Height() int
- func (b *BaseDialog) SetSize(width, height int) tea.Cmd
- func (b *BaseDialog) Width() int
- type Broadcastable
- type CloseAllDialogsMsg
- type CloseDialogMsg
- type ClosePlanDetailMsg
- type ConfirmKeyMap
- type ConfirmationSessionState
- type Content
- func (dc *Content) AddContent(content string) *Content
- func (dc *Content) AddHelp(text string) *Content
- func (dc *Content) AddHelpKeys(bindings ...string) *Content
- func (dc *Content) AddQuestion(question string) *Content
- func (dc *Content) AddSeparator() *Content
- func (dc *Content) AddSpace() *Content
- func (dc *Content) AddTitle(title string) *Content
- func (dc *Content) Build() string
- type Dialog
- func NewAgentDetailsDialog(a runtime.AgentDetails, cfg runtime.AgentConfigInfo, usage *runtime.Usage, ...) Dialog
- func NewCommandPaletteDialog(categories []commands.Category) Dialog
- func NewContextDialog(breakdown *runtime.ContextBreakdown, liveSessions ...runtime.LiveSession) Dialog
- func NewCostDialog(sess *session.Session) Dialog
- func NewEffortPickerDialog(levels []effort.Level, current effort.Level) Dialog
- func NewElicitationDialog(message string, schema any, meta map[string]any, elicitationID ...string) Dialog
- func NewExitConfirmationDialog() Dialog
- func NewFilePickerDialog(initialPath string) Dialog
- func NewHelpDialog(bindings []key.Binding) Dialog
- func NewMCPPromptInputDialog(promptName string, promptInfo mcptools.PromptInfo) Dialog
- func NewMaxIterationsDialog(maxIterations int, appInstance *app.App) Dialog
- func NewModelPickerDialog(models []runtime.ModelChoice) Dialog
- func NewModelPickerDialogWithQuery(models []runtime.ModelChoice, query string) Dialog
- func NewMultiChoiceDialog(config MultiChoiceConfig) Dialog
- func NewOAuthAuthorizationDialog(ctx context.Context, serverURL string, appInstance *app.App, ...) Dialog
- func NewPermissionsDialog(perms *runtime.PermissionsInfo, yoloEnabled bool) Dialog
- func NewPlanBrowserDialog(result plans.ListResult) Dialog
- func NewPlanDetailDialog(p plans.Plan) Dialog
- func NewSessionBrowserDialog(sessions []session.Summary, workspaceDir string) Dialog
- func NewSettingsDialog(preferences messages.Preferences, showVisuals bool) Dialog
- func NewSkillsDialog(skillList []skills.Skill) Dialog
- func NewSnapshotsDialog(fileCounts []int) Dialog
- func NewThemePickerDialog(themes []ThemeChoice, originalThemeRef string) Dialog
- func NewToolConfirmationDialog(ar *animation.Runtime, msg *runtime.ToolCallConfirmationEvent, ...) Dialog
- func NewToolRejectionReasonDialog() Dialog
- func NewToolsDialog(toolsets []tools.ToolsetStatus, toolList []tools.Tool) Dialog
- func NewTourOfferDialog(showTelemetryNotice bool) Dialog
- func NewURLElicitationDialog(ctx context.Context, message, url string, elicitationID ...string) Dialog
- func NewWorkingDirPickerDialog(ctx context.Context, recentDirs, favoriteDirs []string, store *tuistate.Store, ...) Dialog
- type ElicitationDialog
- type ElicitationField
- type ExitConfirmedMsg
- type MCPPromptInputDialog
- type Manager
- type MultiChoiceConfig
- type MultiChoiceOption
- type MultiChoiceResult
- type MultiChoiceResultMsg
- type OpenDialogMsg
- type PlanBrowserDataMsg
- type PlanBrowserViewer
- type PlanDetailDataMsg
- type PlanDetailViewer
- type PlanDialog
- type RuntimeResumeMsg
- type ThemeChoice
- type ToolConfirmationResponse
- type TourOfferChoice
- type TourOfferResultMsg
- type URLElicitationDialog
Constants ¶
const ToolRejectionDialogID = "tool-rejection-reason"
ToolRejectionDialogID is the unique identifier for the tool rejection reason dialog.
Variables ¶
This section is empty.
Functions ¶
func CenterPosition ¶
CenterPosition calculates the centered position for a dialog given screen and dialog dimensions. Returns (row, col) suitable for use in Dialog.Position().
func CloseWithElicitationResponse ¶
func CloseWithElicitationResponse(action tools.ElicitationAction, content map[string]any, elicitationID string) tea.Cmd
CloseWithElicitationResponse returns a command that closes the dialog and sends an elicitation response.
func ContentEndRow ¶
ContentEndRow returns the absolute Y row of the last content line inside a dialog. dialogRow is the top-left row and dialogHeight is the total rendered height. The dialog frame (border + padding) is accounted for automatically using DialogStyle.
func ContentStartRow ¶
ContentStartRow returns the absolute Y row where content begins inside a dialog. dialogRow is the top-left row of the dialog, and headerContent is the rendered header text above the target content area. The dialog frame (border + padding) is accounted for automatically using DialogStyle.
func HandleConfirmKeys ¶
func HandleConfirmKeys(msg tea.KeyPressMsg, keyMap ConfirmKeyMap, onYes, onNo func() (layout.Model, tea.Cmd)) (layout.Model, tea.Cmd, bool)
HandleConfirmKeys handles Yes/No key presses for confirmation dialogs. Returns the command to execute and whether a key was matched.
func HandleQuit ¶
func HandleQuit(msg tea.KeyPressMsg) tea.Cmd
HandleQuit checks for the configured quit key and returns tea.Quit if matched.
func HelpKeysWidth ¶ added in v1.94.0
HelpKeysWidth returns the rendered width of the given key bindings laid out on a single line, using the same formatting as RenderHelpKeys. It returns 0 for empty or malformed input.
func IsCommandPalette ¶ added in v1.98.0
IsCommandPalette reports whether d is the command palette dialog. It lets observers (e.g. the getting-started tour) detect the palette opening without coupling to the unexported concrete type.
func RenderGroupSeparator ¶ added in v1.53.0
RenderGroupSeparator renders a labelled section separator inside a list, like "── Custom themes ──────────────". It is used to visually divide groups of items in a picker list.
func RenderHelp ¶
RenderHelp renders help text at the bottom of a dialog in italic muted style.
func RenderHelpKeys ¶
RenderHelpKeys renders key bindings in the same style as the main TUI's status bar. Each binding is a pair of [key, description] strings.
func RenderSeparator ¶
RenderSeparator renders a horizontal separator line.
Types ¶
type BaseDialog ¶
type BaseDialog struct {
// contains filtered or unexported fields
}
BaseDialog provides common functionality for dialog implementations. It handles size management, position calculation, and common UI patterns.
func (*BaseDialog) CenterDialog ¶
func (b *BaseDialog) CenterDialog(renderedDialog string) (row, col int)
CenterDialog returns the (row, col) position to center a rendered dialog.
func (*BaseDialog) ComputeDialogWidth ¶
func (b *BaseDialog) ComputeDialogWidth(percent, minWidth, maxWidth int) int
ComputeDialogWidth calculates dialog width based on screen percentage with bounds.
func (*BaseDialog) ContentWidth ¶
func (b *BaseDialog) ContentWidth(dialogWidth, paddingX int) int
ContentWidth calculates the inner content width given dialog width and padding.
type Broadcastable ¶ added in v1.119.0
type Broadcastable interface {
BroadcastToDialogs()
}
Broadcastable marks messages the manager delivers to every dialog in the stack instead of only the topmost one. Data-refresh messages implement it so dialogs buried under another dialog (e.g. the plan browser under its detail dialog) stay fresh.
type CloseAllDialogsMsg ¶
type CloseAllDialogsMsg struct{}
CloseAllDialogsMsg is sent to close all dialogs in the stack
type CloseDialogMsg ¶
type CloseDialogMsg struct{}
CloseDialogMsg is sent to close the current (topmost) dialog
type ClosePlanDetailMsg ¶ added in v1.119.0
ClosePlanDetailMsg closes the topmost dialog only when it is a plan detail dialog showing exactly Ref. The manager checks the current top when the message is applied — not when it was emitted — so duplicated closes for the same vanished plan pop at most one dialog, and a close arriving after the detail was already closed (or covered by another dialog) is a no-op instead of popping the wrong dialog.
type ConfirmKeyMap ¶
ConfirmKeyMap defines key bindings for confirmation dialogs (Yes/No).
func DefaultConfirmKeyMap ¶
func DefaultConfirmKeyMap() ConfirmKeyMap
DefaultConfirmKeyMap returns the standard Yes/No key bindings.
type ConfirmationSessionState ¶ added in v1.109.0
type ConfirmationSessionState interface {
messages.SessionState
SetYoloMode(yoloMode bool)
}
ConfirmationSessionState is the session-state surface the confirmation dialog needs: the message list's surface for rendering the tool call, plus the session-wide approval flip for the "all tools" decision.
type Content ¶
type Content struct {
// contains filtered or unexported fields
}
Content helps build dialog content with consistent structure.
func NewContent ¶
NewContent creates a new dialog content builder.
func (*Content) AddContent ¶
AddContent adds raw content to the dialog.
func (*Content) AddHelpKeys ¶
AddHelpKeys adds key binding help at the bottom.
func (*Content) AddQuestion ¶
AddQuestion adds a styled question text.
func (*Content) AddSeparator ¶
AddSeparator adds a horizontal separator line.
type Dialog ¶
type Dialog interface {
layout.Model
Position() (int, int) // Returns (row, col) for dialog placement
}
Dialog defines the interface that all dialogs must implement
func NewAgentDetailsDialog ¶ added in v1.88.0
func NewAgentDetailsDialog(a runtime.AgentDetails, cfg runtime.AgentConfigInfo, usage *runtime.Usage, cost *float64) Dialog
NewAgentDetailsDialog creates the read-only Agent Inspector: an agent's static configuration combined with live state. It shows the description, a "current agent" line when live, model/fallback/thinking, the agent's latest known context usage, the sub-agent, handoff and skill lists, configured limits and enabled option flags, every toolset with a status marker and its tools (live names when started, otherwise the declared allow-list), and the slash commands it defines. The instruction/system prompt is deliberately omitted. cfg carries the inspector dataset resolved by the caller (pass the zero value to omit those sections, e.g. for remote runtimes); usage carries the agent's latest token-usage snapshot (pass nil when the agent has not run). The dialog is opened by right-clicking (or Ctrl+clicking) an agent in the sidebar. cost carries the agent's cumulative attributed cost with the same semantics as the sidebar roster (see service.SessionState AgentCost); pass nil when no cost is attributable.
func NewCommandPaletteDialog ¶
NewCommandPaletteDialog creates a new command palette dialog.
func NewContextDialog ¶ added in v1.99.0
func NewContextDialog(breakdown *runtime.ContextBreakdown, liveSessions ...runtime.LiveSession) Dialog
NewContextDialog creates the /context dialog showing the estimated context-window composition by category, the live-session team view (explicitly compactable), plus the per-file inventory of attached files (droppable) and prompt files.
func NewCostDialog ¶
func NewEffortPickerDialog ¶ added in v1.98.0
NewEffortPickerDialog creates an effort picker over the given supported levels. current marks the active level and is preselected; pass an empty level when the active configuration doesn't map onto a listed level (adaptive or token-based budgets).
func NewElicitationDialog ¶
func NewElicitationDialog(message string, schema any, meta map[string]any, elicitationID ...string) Dialog
NewElicitationDialog creates a new elicitation dialog. elicitationID is variadic purely so pre-existing 3-arg callers keep compiling unchanged (see firstElicitationID for the same #3584 precedent); at most the first value is meaningful.
func NewExitConfirmationDialog ¶
func NewExitConfirmationDialog() Dialog
NewExitConfirmationDialog creates a new exit confirmation dialog.
func NewFilePickerDialog ¶
NewFilePickerDialog creates a new file picker dialog for attaching files. If initialPath is provided and is a directory, it starts in that directory. If initialPath is a file, it starts in the file's directory with the file pre-selected.
func NewHelpDialog ¶ added in v1.41.0
NewHelpDialog creates a new help dialog that displays all active key bindings.
func NewMCPPromptInputDialog ¶
func NewMCPPromptInputDialog(promptName string, promptInfo mcptools.PromptInfo) Dialog
NewMCPPromptInputDialog creates a new MCP prompt input dialog
func NewMaxIterationsDialog ¶
NewMaxIterationsDialog creates a new max iterations confirmation dialog
func NewModelPickerDialog ¶
func NewModelPickerDialog(models []runtime.ModelChoice) Dialog
NewModelPickerDialog creates a new model picker dialog.
func NewModelPickerDialogWithQuery ¶ added in v1.104.0
func NewModelPickerDialogWithQuery(models []runtime.ModelChoice, query string) Dialog
NewModelPickerDialogWithQuery creates a model picker and restores its filter.
func NewMultiChoiceDialog ¶
func NewMultiChoiceDialog(config MultiChoiceConfig) Dialog
NewMultiChoiceDialog creates a new multi-choice dialog.
func NewOAuthAuthorizationDialog ¶
func NewOAuthAuthorizationDialog(ctx context.Context, serverURL string, appInstance *app.App, elicitationID ...string) Dialog
NewOAuthAuthorizationDialog creates a new OAuth authorization confirmation dialog. elicitationID is variadic for the same backward-compatibility reason as NewElicitationDialog (see firstElicitationID); at most the first value is meaningful.
func NewPermissionsDialog ¶
func NewPermissionsDialog(perms *runtime.PermissionsInfo, yoloEnabled bool) Dialog
NewPermissionsDialog creates a new dialog showing tool permission rules.
func NewPlanBrowserDialog ¶ added in v1.119.0
func NewPlanBrowserDialog(result plans.ListResult) Dialog
NewPlanBrowserDialog creates the /plans browser over a listing produced by the pkg/plans service. The dialog never touches plan storage itself: every action is emitted as a message the app model services.
func NewPlanDetailDialog ¶ added in v1.119.0
NewPlanDetailDialog creates the detail dialog for a plan fetched through the pkg/plans service (content included).
func NewSessionBrowserDialog ¶
NewSessionBrowserDialog creates a new session browser dialog. workspaceDir is the directory of the active session; sessions started there are grouped first and can be filtered with the workspace filter.
func NewSettingsDialog ¶ added in v1.104.0
func NewSettingsDialog(preferences messages.Preferences, showVisuals bool) Dialog
func NewSkillsDialog ¶ added in v1.65.0
NewSkillsDialog creates the /skills dialog showing every skill exposed to the current agent.
func NewSnapshotsDialog ¶ added in v1.56.0
NewSnapshotsDialog creates a snapshots dialog. fileCounts must be in chronological order (oldest first).
func NewThemePickerDialog ¶
func NewThemePickerDialog(themes []ThemeChoice, originalThemeRef string) Dialog
NewThemePickerDialog creates a new theme picker dialog. originalThemeRef is the currently active theme ref (for restoration on cancel).
func NewToolConfirmationDialog ¶
func NewToolConfirmationDialog(ar *animation.Runtime, msg *runtime.ToolCallConfirmationEvent, sessionState ConfirmationSessionState) Dialog
NewToolConfirmationDialog creates a new tool confirmation dialog
func NewToolRejectionReasonDialog ¶
func NewToolRejectionReasonDialog() Dialog
NewToolRejectionReasonDialog creates a multi-choice dialog for selecting the reason for rejecting a tool call.
func NewToolsDialog ¶ added in v1.36.1
func NewToolsDialog(toolsets []tools.ToolsetStatus, toolList []tools.Tool) Dialog
NewToolsDialog creates the unified /tools dialog, showing the lifecycle status of each toolset (top section) followed by every tool exposed to the agent (bottom section, grouped by category).
The two halves are intentionally rendered together: a tool's Category is generally a functional bucket ("filesystem", "shell", "lsp"), not the toolset name, so a separate /toolsets dialog used to be the only way for users to see lifecycle state. Combining them here means a single command surfaces both "what can the agent do" and "is anything degraded".
func NewTourOfferDialog ¶ added in v1.98.0
NewTourOfferDialog creates the first-run dialog offering the getting-started tour.
func NewURLElicitationDialog ¶
func NewURLElicitationDialog(ctx context.Context, message, url string, elicitationID ...string) Dialog
NewURLElicitationDialog creates a new URL elicitation dialog. elicitationID is variadic for the same backward-compatibility reason as NewElicitationDialog (see firstElicitationID); at most the first value is meaningful.
func NewWorkingDirPickerDialog ¶
func NewWorkingDirPickerDialog(ctx context.Context, recentDirs, favoriteDirs []string, store *tuistate.Store, sessionWorkingDir string) Dialog
NewWorkingDirPickerDialog creates a new working directory picker dialog. recentDirs provides a list of recently used directories to show. favoriteDirs provides a list of pinned directories to show. store is used for persisting favorite directory changes (may be nil). sessionWorkingDir is the working directory of the active session; when non-empty it is used as the initial browse directory instead of the process working directory.
type ElicitationDialog ¶
type ElicitationDialog struct {
BaseDialog
// contains filtered or unexported fields
}
ElicitationDialog implements Dialog for MCP elicitation requests.
When a schema is provided, fields are rendered as a form. When no schema is provided, a single free-form text input (responseInput) is shown so the user can type an answer.
The body region (message + fields, or message + free-form input) is rendered inside a scrollview so long content remains accessible when it would otherwise overflow the terminal.
func (*ElicitationDialog) Init ¶
func (d *ElicitationDialog) Init() tea.Cmd
func (*ElicitationDialog) Position ¶
func (d *ElicitationDialog) Position() (row, col int)
func (*ElicitationDialog) View ¶
func (d *ElicitationDialog) View() string
type ElicitationField ¶
type ElicitationField struct {
Name, Title, Type, Description string
Required bool
EnumValues []string
Default any
MinLength, MaxLength int
Format, Pattern string
Minimum, Maximum float64
HasMinimum, HasMaximum bool
}
ElicitationField represents a form field extracted from a JSON schema.
type ExitConfirmedMsg ¶
type ExitConfirmedMsg struct{}
ExitConfirmedMsg is sent when the user confirms they want to exit.
type MCPPromptInputDialog ¶
type MCPPromptInputDialog struct {
BaseDialog
// contains filtered or unexported fields
}
MCPPromptInputDialog implements Dialog for collecting MCP prompt parameters
func (*MCPPromptInputDialog) Init ¶
func (d *MCPPromptInputDialog) Init() tea.Cmd
Init initializes the MCP prompt input dialog
func (*MCPPromptInputDialog) Position ¶
func (d *MCPPromptInputDialog) Position() (row, col int)
Position calculates the position to center the dialog
func (*MCPPromptInputDialog) View ¶
func (d *MCPPromptInputDialog) View() string
View renders the MCP prompt input dialog
type Manager ¶
type Manager interface {
layout.Model
GetLayers() []*lipgloss.Layer
Open() bool
TopIsExitConfirmation() bool
// TopIsBackground reports whether the topmost dialog is a background
// dialog (i.e. it should not block tab navigation).
TopIsBackground() bool
// TopBackgroundEvent returns the originating event of the topmost
// background dialog, or nil if the top dialog is not a background dialog
// or the dialog stack is empty.
TopBackgroundEvent() tea.Msg
// TopDialog returns the topmost dialog instance, or nil if the dialog
// stack is empty. Used by the app model to stash a background dialog's
// live state when the user navigates away from the tab that opened it,
// so the same instance (with any in-progress input) can be re-opened on
// return.
TopDialog() Dialog
// HasDialog reports whether pred matches any dialog in the stack,
// visiting bottom to top. Unlike TopDialog it also sees dialogs buried
// under other dialogs, e.g. a plan browser under a help dialog.
HasDialog(pred func(Dialog) bool) bool
}
Manager manages the dialog stack and rendering
type MultiChoiceConfig ¶
type MultiChoiceConfig struct {
DialogID string // Unique identifier for this dialog instance
Title string // Dialog title (used as the main header)
Options []MultiChoiceOption // List of options (max 10 for number selection 0-9)
AllowCustom bool // Whether to allow custom text input
AllowSecondary bool // Whether to allow secondary action (e.g., skip)
SecondaryLabel string // Label for secondary button (default: "Skip")
PrimaryLabel string // Label for primary button (default: "Continue")
CustomPlaceholder string // Placeholder for custom input
}
MultiChoiceConfig configures the multi-choice dialog.
type MultiChoiceOption ¶
type MultiChoiceOption struct {
ID string // Stable identifier for the option
Label string // Display label shown to user
Value string // Value returned when selected (e.g., model-friendly sentence)
}
MultiChoiceOption represents a single selectable option in the dialog.
type MultiChoiceResult ¶
type MultiChoiceResult struct {
OptionID string // ID of the selected option ("custom" for custom input, "skip" for no reason)
Value string // The value text (option's Value or custom text)
IsCustom bool // True if user provided custom input
IsSkipped bool // True if user chose to skip (no reason)
IsCancelled bool // True if user cancelled/escaped
}
MultiChoiceResult holds the result of user selection.
type MultiChoiceResultMsg ¶
type MultiChoiceResultMsg struct {
DialogID string
Result MultiChoiceResult
}
MultiChoiceResultMsg is the tea.Msg sent when the user makes a selection.
type OpenDialogMsg ¶
OpenDialogMsg is sent to open a new dialog.
OriginatingEvent is an optional runtime event whose presence marks the dialog as a background dialog. Background dialogs do not block tab navigation: tab-switch keys and tab-bar mouse clicks keep working. When the user switches away from the tab that opened the dialog, the dialog is closed and OriginatingEvent is re-stashed in the supervisor so the same prompt is re-displayed when the user returns. Other input (including mouse-wheel events) is still routed to the dialog while it is on screen.
type PlanBrowserDataMsg ¶ added in v1.119.0
type PlanBrowserDataMsg struct {
Result plans.ListResult
}
PlanBrowserDataMsg replaces the plan browser's rows with a fresh listing. It is Broadcastable so a browser buried under the detail dialog stays in sync after a write.
func (PlanBrowserDataMsg) BroadcastToDialogs ¶ added in v1.119.0
func (PlanBrowserDataMsg) BroadcastToDialogs()
BroadcastToDialogs implements Broadcastable.
type PlanBrowserViewer ¶ added in v1.119.0
type PlanBrowserViewer interface {
// contains filtered or unexported methods
}
PlanBrowserViewer identifies the /plans browser dialog on the stack, so the app model can refuse stacking a duplicate browser. The marker method is unexported like PlanDialog's: only this package's browser implements it, while other packages can still assert against the interface.
type PlanDetailDataMsg ¶ added in v1.119.0
PlanDetailDataMsg replaces the plan shown by an open detail dialog. It is Broadcastable for the same reason as PlanBrowserDataMsg; a detail dialog only applies it when the plan identity matches what it is showing.
func (PlanDetailDataMsg) BroadcastToDialogs ¶ added in v1.119.0
func (PlanDetailDataMsg) BroadcastToDialogs()
BroadcastToDialogs implements Broadcastable.
type PlanDetailViewer ¶ added in v1.119.0
PlanDetailViewer identifies an open plan detail dialog and the plan it shows, so the app model can re-fetch exactly that plan on refresh.
type PlanDialog ¶ added in v1.119.0
type PlanDialog interface {
// contains filtered or unexported methods
}
PlanDialog is implemented by every dialog of the /plans flow, so the app model can tell whether plan data is on screen and needs live refreshing.
type RuntimeResumeMsg ¶
type RuntimeResumeMsg struct {
Request runtime.ResumeRequest
}
func HandleToolRejectionResult ¶
func HandleToolRejectionResult(result MultiChoiceResult) *RuntimeResumeMsg
HandleToolRejectionResult processes the result from the tool rejection dialog and returns the appropriate RuntimeResumeMsg. Returns nil if the result was cancelled (user should stay in confirmation dialog).
type ThemeChoice ¶
type ThemeChoice struct {
Ref string // Theme reference ("default" for built-in default)
Name string // Display name
IsCurrent bool // Currently active theme
IsDefault bool // Built-in default theme ("default")
IsBuiltin bool // Built-in theme shipped with docker agent
}
ThemeChoice represents a selectable theme option.
type ToolConfirmationResponse ¶
type ToolConfirmationResponse struct {
Response string // "approve", "reject", or "approve-session"
}
ToolConfirmationResponse represents the user's response to tool confirmation
type TourOfferChoice ¶ added in v1.98.0
type TourOfferChoice int
TourOfferChoice is the user's answer to the first-run tour offer.
const ( // TourOfferAccepted starts the tour now. TourOfferAccepted TourOfferChoice = iota // TourOfferLater declines for this run; the offer may be shown again. TourOfferLater // TourOfferNever declines permanently. TourOfferNever )
type TourOfferResultMsg ¶ added in v1.98.0
type TourOfferResultMsg struct {
Choice TourOfferChoice
}
TourOfferResultMsg reports the user's choice on the tour offer dialog.
type URLElicitationDialog ¶
type URLElicitationDialog struct {
BaseDialog
// contains filtered or unexported fields
}
URLElicitationDialog handles URL-based MCP elicitation requests. It displays a URL for the user to visit and waits for confirmation.
func (*URLElicitationDialog) Init ¶
func (d *URLElicitationDialog) Init() tea.Cmd
func (*URLElicitationDialog) Position ¶
func (d *URLElicitationDialog) Position() (row, col int)
func (*URLElicitationDialog) View ¶
func (d *URLElicitationDialog) View() string
Source Files
¶
- agent_details.go
- base.go
- command_palette.go
- context.go
- cost.go
- dialog.go
- effort_picker.go
- elicitation.go
- exit_confirmation.go
- file_picker.go
- help.go
- max_iterations.go
- mcp_prompt_input.go
- model_picker.go
- multi_choice.go
- oauth_authorization.go
- permissions.go
- picker.go
- plan_browser.go
- plan_detail.go
- readonly_scroll_dialog.go
- schema.go
- session_browser.go
- settings.go
- skills.go
- snapshot.go
- theme_picker.go
- tool_confirmation.go
- tool_rejection_reason.go
- tools.go
- tour_offer.go
- url_elicitation.go
- validation.go
- working_dir_picker.go