components

package
v0.79.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const AutoCollapseDelay = 3 * time.Second

AutoCollapseDelay is the duration to wait before auto-collapsing after an update

Variables

This section is empty.

Functions

func ScheduleAutoCollapse added in v0.63.1

func ScheduleAutoCollapse() tea.Cmd

ScheduleAutoCollapse returns a command that will send AutoCollapseTickMsg after the delay

Types

type A2AServerInfo added in v0.48.0

type A2AServerInfo struct {
	ID             string
	Name           string
	Description    string
	DocumentsURL   *string
	InputModes     []string
	OutputModes    []string
	IsConnected    bool
	ConnectionInfo string
	URL            string
}

A2AServerInfo represents information about an A2A server

type A2AServersLoadedMsg added in v0.48.0

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

A2AServersLoadedMsg represents the result of loading A2A servers

type A2AServersView added in v0.48.0

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

A2AServersView displays connected A2A servers in a dedicated view component

func NewA2AServersView added in v0.48.0

func NewA2AServersView(cfg *config.Config, a2aAgentService domain.A2AAgentService, styleProvider *styles.Provider) *A2AServersView

NewA2AServersView creates a new A2A servers view

func (*A2AServersView) Init added in v0.48.0

func (v *A2AServersView) Init() tea.Cmd

Bubble Tea interface

func (*A2AServersView) LoadServers added in v0.48.0

func (v *A2AServersView) LoadServers(ctx context.Context) tea.Cmd

func (*A2AServersView) Render added in v0.48.0

func (v *A2AServersView) Render() string

func (*A2AServersView) SetHeight added in v0.48.0

func (v *A2AServersView) SetHeight(height int)

func (*A2AServersView) SetWidth added in v0.48.0

func (v *A2AServersView) SetWidth(width int)

func (*A2AServersView) Update added in v0.48.0

func (v *A2AServersView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*A2AServersView) View added in v0.48.0

func (v *A2AServersView) View() string

type ApplicationViewRenderer added in v0.27.0

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

ApplicationViewRenderer handles rendering of different application views

func NewApplicationViewRenderer added in v0.27.0

func NewApplicationViewRenderer(styleProvider *styles.Provider) *ApplicationViewRenderer

NewApplicationViewRenderer creates a new application view renderer

func (*ApplicationViewRenderer) RenderChatInterface added in v0.27.0

func (r *ApplicationViewRenderer) RenderChatInterface(
	data ChatInterfaceData,
	conversationView ui.ConversationRenderer,
	inputView ui.InputComponent,
	autocomplete ui.AutocompleteComponent,
	inputStatusBar ui.InputStatusBarComponent,
	statusView ui.StatusComponent,
	helpBar ui.HelpBarComponent,
	queueBoxView *QueueBoxView,
	todoBoxView *TodoBoxView,
) string

RenderChatInterface renders the main chat interface

func (*ApplicationViewRenderer) RenderFileSelection added in v0.27.0

func (r *ApplicationViewRenderer) RenderFileSelection(
	data FileSelectionData,
	fileSelectionView *FileSelectionView,
) string

RenderFileSelection renders the file selection view

type AutoCollapseTickMsg added in v0.63.1

type AutoCollapseTickMsg struct{}

AutoCollapseTickMsg is sent to trigger auto-collapse check

type ChatInterfaceData added in v0.27.0

type ChatInterfaceData struct {
	Width           int
	Height          int
	ToolExecution   *domain.ToolExecutionSession
	CurrentView     domain.ViewState
	QueuedMessages  []domain.QueuedMessage
	BackgroundTasks []domain.TaskPollingState
}

ChatInterfaceData holds the data needed to render the chat interface

type ConversationSelectorImpl added in v0.45.0

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

ConversationSelectorImpl implements conversation selection UI

func NewConversationSelector added in v0.45.0

func NewConversationSelector(repo shortcuts.PersistentConversationRepository, styleProvider *styles.Provider) *ConversationSelectorImpl

NewConversationSelector creates a new conversation selector

func (*ConversationSelectorImpl) GetSelected added in v0.45.0

GetSelected returns the selected conversation

func (*ConversationSelectorImpl) Init added in v0.45.0

func (c *ConversationSelectorImpl) Init() tea.Cmd

func (*ConversationSelectorImpl) IsCancelled added in v0.45.0

func (c *ConversationSelectorImpl) IsCancelled() bool

IsCancelled returns true if selection was cancelled

func (*ConversationSelectorImpl) IsSelected added in v0.45.0

func (c *ConversationSelectorImpl) IsSelected() bool

IsSelected returns true if a conversation was selected

func (*ConversationSelectorImpl) Reset added in v0.45.0

func (c *ConversationSelectorImpl) Reset()

Reset resets the conversation selector state for reuse

func (*ConversationSelectorImpl) SetHeight added in v0.45.0

func (c *ConversationSelectorImpl) SetHeight(height int)

SetHeight sets the height of the conversation selector

func (*ConversationSelectorImpl) SetWidth added in v0.45.0

func (c *ConversationSelectorImpl) SetWidth(width int)

SetWidth sets the width of the conversation selector

func (*ConversationSelectorImpl) Update added in v0.45.0

func (c *ConversationSelectorImpl) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ConversationSelectorImpl) View added in v0.45.0

func (c *ConversationSelectorImpl) View() string

type ConversationView

type ConversationView struct {
	Viewport viewport.Model
	// contains filtered or unexported fields
}

ConversationView handles the chat conversation display

func NewConversationView

func NewConversationView(styleProvider *styles.Provider) *ConversationView

func (*ConversationView) CanScrollDown

func (cv *ConversationView) CanScrollDown() bool

func (*ConversationView) CanScrollUp

func (cv *ConversationView) CanScrollUp() bool

func (*ConversationView) GetPlainTextLines added in v0.37.0

func (cv *ConversationView) GetPlainTextLines() []string

GetPlainTextLines returns the conversation as plain text lines for selection mode This returns the actual rendered content that was displayed in the viewport, preserving the same text wrapping and formatting

func (*ConversationView) GetScrollOffset

func (cv *ConversationView) GetScrollOffset() int

func (*ConversationView) Init

func (cv *ConversationView) Init() tea.Cmd

Bubble Tea interface

func (*ConversationView) IsRawFormat added in v0.61.0

func (cv *ConversationView) IsRawFormat() bool

IsRawFormat returns true if raw format (no markdown rendering) is enabled

func (*ConversationView) IsToolResultExpanded

func (cv *ConversationView) IsToolResultExpanded(index int) bool

func (*ConversationView) RefreshTheme added in v0.61.0

func (cv *ConversationView) RefreshTheme()

RefreshTheme rebuilds the markdown renderer with current theme colors

func (*ConversationView) Render

func (cv *ConversationView) Render() string

func (*ConversationView) ResetUserScroll added in v0.63.1

func (cv *ConversationView) ResetUserScroll()

ResetUserScroll resets the user scroll state, enabling auto-scroll to bottom. Call this when a new message is sent to ensure the user sees the latest response.

func (*ConversationView) SetConfigPath added in v0.39.0

func (cv *ConversationView) SetConfigPath(configPath string)

SetConfigPath sets the config path for the welcome message

func (*ConversationView) SetConversation

func (cv *ConversationView) SetConversation(conversation []domain.ConversationEntry)

func (*ConversationView) SetHeight

func (cv *ConversationView) SetHeight(height int)

func (*ConversationView) SetKeyHintFormatter added in v0.77.0

func (cv *ConversationView) SetKeyHintFormatter(formatter *hints.Formatter)

SetKeyHintFormatter sets the key hint formatter for displaying keybinding hints

func (*ConversationView) SetStateManager added in v0.68.0

func (cv *ConversationView) SetStateManager(stateManager domain.StateManager)

SetStateManager sets the state manager for accessing plan approval state

func (*ConversationView) SetToolCallRenderer added in v0.49.0

func (cv *ConversationView) SetToolCallRenderer(renderer *ToolCallRenderer)

SetToolCallRenderer sets the tool call renderer for displaying real-time tool execution status

func (*ConversationView) SetToolFormatter added in v0.33.4

func (cv *ConversationView) SetToolFormatter(formatter domain.ToolFormatter)

SetToolFormatter sets the tool formatter for this conversation view

func (*ConversationView) SetWidth

func (cv *ConversationView) SetWidth(width int)

func (*ConversationView) ToggleAllToolResultsExpansion added in v0.26.0

func (cv *ConversationView) ToggleAllToolResultsExpansion()

func (*ConversationView) ToggleRawFormat added in v0.61.0

func (cv *ConversationView) ToggleRawFormat()

ToggleRawFormat toggles between raw and rendered markdown display

func (*ConversationView) ToggleToolResultExpansion

func (cv *ConversationView) ToggleToolResultExpansion(index int)

func (*ConversationView) Update

func (cv *ConversationView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ConversationView) View

func (cv *ConversationView) View() string

type DiffInfo added in v0.38.0

type DiffInfo struct {
	FilePath   string
	OldContent string
	NewContent string
	Title      string
}

DiffInfo contains information needed to render a diff

type DiffRenderer added in v0.27.0

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

DiffRenderer provides high-performance diff rendering with colors

func NewDiffRenderer added in v0.27.0

func NewDiffRenderer(styleProvider *styles.Provider) *DiffRenderer

NewDiffRenderer creates a new diff renderer with colored output

func NewToolDiffRenderer added in v0.38.0

func NewToolDiffRenderer(styleProvider *styles.Provider) *DiffRenderer

NewToolDiffRenderer creates a tool diff renderer (alias for NewDiffRenderer)

func (*DiffRenderer) RenderColoredDiff added in v0.27.0

func (d *DiffRenderer) RenderColoredDiff(oldContent, newContent string) string

RenderColoredDiff renders a simple diff between old and new content (for compatibility)

func (*DiffRenderer) RenderDiff added in v0.38.0

func (d *DiffRenderer) RenderDiff(diffInfo DiffInfo) string

RenderDiff renders a unified diff with colors and modern styling

func (*DiffRenderer) RenderEditToolArguments added in v0.27.0

func (d *DiffRenderer) RenderEditToolArguments(args map[string]any) string

RenderEditToolArguments renders Edit tool arguments with diff preview

func (*DiffRenderer) RenderMultiEditToolArguments added in v0.27.0

func (d *DiffRenderer) RenderMultiEditToolArguments(args map[string]any) string

RenderMultiEditToolArguments renders MultiEdit tool arguments

func (*DiffRenderer) RenderWriteToolArguments added in v0.38.0

func (d *DiffRenderer) RenderWriteToolArguments(args map[string]any) string

RenderWriteToolArguments renders Write tool arguments with diff for existing files

type DiffStats added in v0.56.0

type DiffStats struct {
	LinesAdded   int
	LinesRemoved int
	LinesChanged int
}

DiffStats represents statistics about a diff

type FileSelectionAction added in v0.27.0

type FileSelectionAction int

FileSelectionAction represents the type of action taken in file selection

const (
	FileSelectionActionNone FileSelectionAction = iota
	FileSelectionActionSelect
	FileSelectionActionCancel
)

type FileSelectionData added in v0.27.0

type FileSelectionData struct {
	Width         int
	Files         []string
	SearchQuery   string
	SelectedIndex int
}

FileSelectionData holds the data needed to render the file selection view

type FileSelectionHandler added in v0.27.0

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

FileSelectionHandler handles file selection logic and state management

func NewFileSelectionHandler added in v0.27.0

func NewFileSelectionHandler(styleProvider *styles.Provider) *FileSelectionHandler

NewFileSelectionHandler creates a new file selection handler

func (*FileSelectionHandler) CreateStatusMessage added in v0.27.0

func (h *FileSelectionHandler) CreateStatusMessage(action FileSelectionAction, selectedFile string) tea.Cmd

CreateStatusMessage creates appropriate status messages for file selection actions

func (*FileSelectionHandler) HandleKeyEvent added in v0.27.0

func (h *FileSelectionHandler) HandleKeyEvent(
	keyMsg tea.KeyMsg,
	files []string,
	searchQuery string,
	selectedIndex int,
) (newSearchQuery string, newSelectedIndex int, action FileSelectionAction, selectedFile string)

HandleKeyEvent processes key events for file selection

func (*FileSelectionHandler) RenderFileSelection added in v0.27.0

func (h *FileSelectionHandler) RenderFileSelection(data FileSelectionData) string

RenderFileSelection renders the file selection view

func (*FileSelectionHandler) UpdateInputWithSelectedFile added in v0.27.0

func (h *FileSelectionHandler) UpdateInputWithSelectedFile(currentInput string, cursor int, selectedFile string) (newInput string, newCursor int)

UpdateInputWithSelectedFile updates input text with the selected file

type FileSelectionView added in v0.27.0

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

func NewFileSelectionView added in v0.27.0

func NewFileSelectionView(styleProvider *styles.Provider) *FileSelectionView

func (*FileSelectionView) RenderView added in v0.27.0

func (f *FileSelectionView) RenderView(allFiles []string, searchQuery string, selectedIndex int) string

func (*FileSelectionView) SetWidth added in v0.27.0

func (f *FileSelectionView) SetWidth(width int)

type HelpBar

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

HelpBar displays keyboard shortcuts at the bottom of the screen

func NewHelpBar

func NewHelpBar(styleProvider *styles.Provider) *HelpBar

func (*HelpBar) Init

func (hb *HelpBar) Init() tea.Cmd

Bubble Tea interface

func (*HelpBar) IsEnabled

func (hb *HelpBar) IsEnabled() bool

func (*HelpBar) Render

func (hb *HelpBar) Render() string

func (*HelpBar) SetEnabled

func (hb *HelpBar) SetEnabled(enabled bool)

func (*HelpBar) SetHeight

func (hb *HelpBar) SetHeight(height int)

func (*HelpBar) SetShortcuts

func (hb *HelpBar) SetShortcuts(shortcuts []ui.KeyShortcut)

func (*HelpBar) SetWidth

func (hb *HelpBar) SetWidth(width int)

func (*HelpBar) Update

func (hb *HelpBar) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*HelpBar) View

func (hb *HelpBar) View() string

type InitGithubActionView added in v0.69.19

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

InitGithubActionView implements the Init GitHub Action setup wizard UI

func NewInitGithubActionView added in v0.69.19

func NewInitGithubActionView(styleProvider *styles.Provider) *InitGithubActionView

NewInitGithubActionView creates a new Init GitHub Action setup wizard

func (*InitGithubActionView) GetInstallationURL added in v0.69.19

func (v *InitGithubActionView) GetInstallationURL(repoOwner, repoName string) string

GetInstallationURL returns the URL to install the GitHub App on a repository

func (*InitGithubActionView) GetResult added in v0.69.19

func (v *InitGithubActionView) GetResult() (appID, privateKeyPath string, err error)

GetResult returns the wizard result

func (*InitGithubActionView) Init added in v0.69.19

func (v *InitGithubActionView) Init() tea.Cmd

func (*InitGithubActionView) IsCancelled added in v0.69.19

func (v *InitGithubActionView) IsCancelled() bool

IsCancelled returns whether the wizard was cancelled

func (*InitGithubActionView) IsDone added in v0.69.19

func (v *InitGithubActionView) IsDone() bool

IsDone returns whether the wizard is complete

func (*InitGithubActionView) Reset added in v0.69.19

func (v *InitGithubActionView) Reset()

Reset resets the view state for reuse

func (*InitGithubActionView) SetHeight added in v0.69.19

func (v *InitGithubActionView) SetHeight(height int)

SetHeight sets the height of the view

func (*InitGithubActionView) SetRepositoryInfo added in v0.69.19

func (v *InitGithubActionView) SetRepositoryInfo(owner string, isOrg bool)

SetRepositoryInfo sets the repository owner and whether it's an org

func (*InitGithubActionView) SetSecretsExistChecker added in v0.69.19

func (v *InitGithubActionView) SetSecretsExistChecker(checker func(appID string) bool)

SetSecretsExistChecker sets the callback to check if org secrets exist

func (*InitGithubActionView) SetWidth added in v0.69.19

func (v *InitGithubActionView) SetWidth(width int)

SetWidth sets the width of the view

func (*InitGithubActionView) Update added in v0.69.19

func (v *InitGithubActionView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*InitGithubActionView) View added in v0.69.19

func (v *InitGithubActionView) View() string

type InputStatusBar added in v0.76.2

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

InputStatusBar displays input status information like model, theme, agents

func NewInputStatusBar added in v0.76.2

func NewInputStatusBar(styleProvider *styles.Provider) *InputStatusBar

NewInputStatusBar creates a new input status bar

func (*InputStatusBar) Init added in v0.76.2

func (isb *InputStatusBar) Init() tea.Cmd

Bubble Tea interface

func (*InputStatusBar) Render added in v0.76.2

func (isb *InputStatusBar) Render() string

func (*InputStatusBar) SetConfigService added in v0.76.2

func (isb *InputStatusBar) SetConfigService(configService *config.Config)

SetConfigService sets the config service

func (*InputStatusBar) SetConversationRepo added in v0.76.2

func (isb *InputStatusBar) SetConversationRepo(repo domain.ConversationRepository)

SetConversationRepo sets the conversation repository

func (*InputStatusBar) SetHeight added in v0.76.2

func (isb *InputStatusBar) SetHeight(height int)

func (*InputStatusBar) SetInputText added in v0.76.2

func (isb *InputStatusBar) SetInputText(text string)

SetInputText sets the current input text for mode detection

func (*InputStatusBar) SetModelService added in v0.76.2

func (isb *InputStatusBar) SetModelService(modelService domain.ModelService)

SetModelService sets the model service

func (*InputStatusBar) SetStateManager added in v0.76.2

func (isb *InputStatusBar) SetStateManager(stateManager domain.StateManager)

SetStateManager sets the state manager

func (*InputStatusBar) SetThemeService added in v0.76.2

func (isb *InputStatusBar) SetThemeService(themeService domain.ThemeService)

SetThemeService sets the theme service

func (*InputStatusBar) SetWidth added in v0.76.2

func (isb *InputStatusBar) SetWidth(width int)

func (*InputStatusBar) Update added in v0.76.2

func (isb *InputStatusBar) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*InputStatusBar) UpdateMCPStatus added in v0.79.0

func (isb *InputStatusBar) UpdateMCPStatus(status *domain.MCPServerStatus)

UpdateMCPStatus updates the MCP server status (called by event handler)

func (*InputStatusBar) View added in v0.76.2

func (isb *InputStatusBar) View() string

type InputView

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

InputView handles user input with history

func NewInputView

func NewInputView(modelService domain.ModelService) *InputView

func NewInputViewWithConfigDir added in v0.41.0

func NewInputViewWithConfigDir(modelService domain.ModelService, configDir string) *InputView

func (*InputView) AcceptHistorySuggestion added in v0.73.0

func (iv *InputView) AcceptHistorySuggestion() bool

AcceptHistorySuggestion applies the current suggestion to the input

func (*InputView) AddImageAttachment added in v0.57.0

func (iv *InputView) AddImageAttachment(image domain.ImageAttachment)

AddImageAttachment adds an image attachment to the pending list

func (*InputView) AddToHistory added in v0.27.0

func (iv *InputView) AddToHistory(text string) error

AddToHistory adds the current input to the history

func (*InputView) CanHandle

func (iv *InputView) CanHandle(key tea.KeyMsg) bool

func (*InputView) ClearImageAttachments added in v0.57.0

func (iv *InputView) ClearImageAttachments()

ClearImageAttachments clears all pending image attachments

func (*InputView) ClearInput

func (iv *InputView) ClearInput()

func (*InputView) GetCursor

func (iv *InputView) GetCursor() int

func (*InputView) GetHistoryManager added in v0.73.0

func (iv *InputView) GetHistoryManager() *history.HistoryManager

GetHistoryManager returns the history manager for external use

func (*InputView) GetImageAttachments added in v0.57.0

func (iv *InputView) GetImageAttachments() []domain.ImageAttachment

GetImageAttachments returns the list of pending image attachments

func (*InputView) GetInput

func (iv *InputView) GetInput() string

func (*InputView) HandleKey

func (iv *InputView) HandleKey(key tea.KeyMsg) (tea.Model, tea.Cmd)

func (*InputView) HasHistorySuggestion added in v0.73.0

func (iv *InputView) HasHistorySuggestion() bool

HasHistorySuggestion returns true if there's a history suggestion available

func (*InputView) Init

func (iv *InputView) Init() tea.Cmd

Bubble Tea interface

func (*InputView) IsDisabled added in v0.76.0

func (iv *InputView) IsDisabled() bool

IsDisabled returns whether the input is disabled

func (*InputView) NavigateHistoryDown added in v0.27.0

func (iv *InputView) NavigateHistoryDown()

NavigateHistoryDown moves down in history (to newer messages) - public method for interface

func (*InputView) NavigateHistoryUp added in v0.27.0

func (iv *InputView) NavigateHistoryUp()

NavigateHistoryUp moves up in history (to older messages) - public method for interface

func (*InputView) Render

func (iv *InputView) Render() string

func (*InputView) SetConfigService added in v0.60.0

func (iv *InputView) SetConfigService(configService *config.Config)

SetConfigService sets the config service for this input view

func (*InputView) SetConversationRepo added in v0.63.0

func (iv *InputView) SetConversationRepo(repo domain.ConversationRepository)

SetConversationRepo sets the conversation repository for context usage display

func (*InputView) SetCursor

func (iv *InputView) SetCursor(position int)

func (*InputView) SetDisabled added in v0.76.0

func (iv *InputView) SetDisabled(disabled bool)

SetDisabled sets whether the input is disabled (prevents typing) When disabling, saves the current text and clears the input When re-enabling, restores the saved text

func (*InputView) SetHeight

func (iv *InputView) SetHeight(height int)

func (*InputView) SetImageService added in v0.57.0

func (iv *InputView) SetImageService(imageService domain.ImageService)

SetImageService sets the image service for this input view

func (*InputView) SetPlaceholder

func (iv *InputView) SetPlaceholder(text string)

func (*InputView) SetStateManager added in v0.56.0

func (iv *InputView) SetStateManager(stateManager domain.StateManager)

SetStateManager sets the state manager for this input view

func (*InputView) SetText

func (iv *InputView) SetText(text string)

func (*InputView) SetThemeService added in v0.47.0

func (iv *InputView) SetThemeService(themeService domain.ThemeService)

SetThemeService sets the theme service for this input view

func (*InputView) SetWidth

func (iv *InputView) SetWidth(width int)

func (*InputView) TryHandleHistorySuggestionTab added in v0.73.0

func (iv *InputView) TryHandleHistorySuggestionTab() bool

TryHandleHistorySuggestionTab handles Tab key for history suggestions Returns true if handled (either cycled or accepted), false if no suggestion available

func (*InputView) Update

func (iv *InputView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*InputView) View

func (iv *InputView) View() string

type ModelSelectorImpl added in v0.27.0

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

ModelSelectorImpl implements model selection UI

func NewModelSelector added in v0.27.0

func NewModelSelector(models []string, modelService domain.ModelService, styleProvider *styles.Provider) *ModelSelectorImpl

NewModelSelector creates a new model selector

func (*ModelSelectorImpl) GetSelected added in v0.27.0

func (m *ModelSelectorImpl) GetSelected() string

GetSelected returns the selected model

func (*ModelSelectorImpl) Init added in v0.27.0

func (m *ModelSelectorImpl) Init() tea.Cmd

func (*ModelSelectorImpl) IsCancelled added in v0.27.0

func (m *ModelSelectorImpl) IsCancelled() bool

IsCancelled returns true if selection was cancelled

func (*ModelSelectorImpl) IsSelected added in v0.27.0

func (m *ModelSelectorImpl) IsSelected() bool

IsSelected returns true if a model was selected

func (*ModelSelectorImpl) SetHeight added in v0.27.0

func (m *ModelSelectorImpl) SetHeight(height int)

SetHeight sets the height of the model selector

func (*ModelSelectorImpl) SetWidth added in v0.27.0

func (m *ModelSelectorImpl) SetWidth(width int)

SetWidth sets the width of the model selector

func (*ModelSelectorImpl) Update added in v0.27.0

func (m *ModelSelectorImpl) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ModelSelectorImpl) View added in v0.27.0

func (m *ModelSelectorImpl) View() string

type ParallelToolState added in v0.49.0

type ParallelToolState struct {
	CallID       string
	ToolName     string
	Status       string
	NextStatus   string
	StartTime    time.Time
	EndTime      *time.Time
	LastUpdate   time.Time
	MinShowTime  time.Duration
	OutputBuffer []string
}

type ParallelToolsRenderer added in v0.49.0

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

func NewParallelToolsRenderer added in v0.49.0

func NewParallelToolsRenderer(styleProvider *styles.Provider) *ParallelToolsRenderer

func (*ParallelToolsRenderer) Clear added in v0.49.0

func (r *ParallelToolsRenderer) Clear()

func (*ParallelToolsRenderer) IsVisible added in v0.49.0

func (r *ParallelToolsRenderer) IsVisible() bool

func (*ParallelToolsRenderer) Render added in v0.49.0

func (r *ParallelToolsRenderer) Render() string

func (*ParallelToolsRenderer) Update added in v0.49.0

type QueueBoxView added in v0.53.0

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

func NewQueueBoxView added in v0.53.0

func NewQueueBoxView(styleProvider *styles.Provider) *QueueBoxView

func (*QueueBoxView) Init added in v0.53.0

func (qv *QueueBoxView) Init() tea.Cmd

func (*QueueBoxView) Render added in v0.53.0

func (qv *QueueBoxView) Render(queuedMessages []domain.QueuedMessage, backgroundTasks []domain.TaskPollingState) string

func (*QueueBoxView) SetHeight added in v0.53.0

func (qv *QueueBoxView) SetHeight(height int)

func (*QueueBoxView) SetWidth added in v0.53.0

func (qv *QueueBoxView) SetWidth(width int)

func (*QueueBoxView) Update added in v0.53.0

func (qv *QueueBoxView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*QueueBoxView) View added in v0.53.0

func (qv *QueueBoxView) View() string

type StatusState added in v0.37.0

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

StatusState represents a saved status state

type StatusView

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

StatusView handles status messages, errors, and loading spinners

func NewStatusView

func NewStatusView(styleProvider *styles.Provider) *StatusView

func (*StatusView) ClearStatus

func (sv *StatusView) ClearStatus()

func (*StatusView) HasSavedState added in v0.37.0

func (sv *StatusView) HasSavedState() bool

HasSavedState returns true if there's a saved state that can be restored

func (*StatusView) Init

func (sv *StatusView) Init() tea.Cmd

Bubble Tea interface

func (*StatusView) IsShowingError

func (sv *StatusView) IsShowingError() bool

func (*StatusView) IsShowingSpinner

func (sv *StatusView) IsShowingSpinner() bool

func (*StatusView) Render

func (sv *StatusView) Render() string

func (*StatusView) RestoreSavedState added in v0.37.0

func (sv *StatusView) RestoreSavedState() tea.Cmd

RestoreSavedState restores the previously saved status state

func (*StatusView) SaveCurrentState added in v0.37.0

func (sv *StatusView) SaveCurrentState()

SaveCurrentState saves the current status state for later restoration

func (*StatusView) SetHeight

func (sv *StatusView) SetHeight(height int)

func (*StatusView) SetKeyHintFormatter added in v0.77.0

func (sv *StatusView) SetKeyHintFormatter(formatter *hints.Formatter)

SetKeyHintFormatter sets the key hint formatter for displaying keybinding hints

func (*StatusView) SetWidth

func (sv *StatusView) SetWidth(width int)

func (*StatusView) ShowError

func (sv *StatusView) ShowError(message string)

func (*StatusView) ShowSpinner

func (sv *StatusView) ShowSpinner(message string)

func (*StatusView) ShowSpinnerWithType added in v0.27.0

func (sv *StatusView) ShowSpinnerWithType(message string, statusType domain.StatusType, progress *domain.StatusProgress)

func (*StatusView) ShowStatus

func (sv *StatusView) ShowStatus(message string)

func (*StatusView) ShowStatusWithType added in v0.27.0

func (sv *StatusView) ShowStatusWithType(message string, statusType domain.StatusType, progress *domain.StatusProgress)

func (*StatusView) Update

func (sv *StatusView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*StatusView) UpdateSpinnerMessage added in v0.27.0

func (sv *StatusView) UpdateSpinnerMessage(message string, statusType domain.StatusType)

func (*StatusView) View

func (sv *StatusView) View() string

type TaskInfo added in v0.53.3

type TaskInfo struct {
	domain.TaskPollingState
	Status      string
	ElapsedTime time.Duration
	TaskRef     *domain.TaskInfo
}

TaskInfo extends TaskPollingState with additional metadata for UI display

type TaskManagerImpl added in v0.53.3

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

TaskManagerImpl implements task management UI similar to conversation selection

func NewTaskManager added in v0.53.3

func NewTaskManager(
	themeService domain.ThemeService,
	styleProvider *styles.Provider,
	taskRetentionService domain.TaskRetentionService,
	backgroundTaskService domain.BackgroundTaskService,
) *TaskManagerImpl

NewTaskManager creates a new task manager UI component

func (*TaskManagerImpl) GetSelectedTask added in v0.53.3

func (t *TaskManagerImpl) GetSelectedTask() *TaskInfo

GetSelectedTask returns the currently selected task (used by parent components)

func (*TaskManagerImpl) Init added in v0.53.3

func (t *TaskManagerImpl) Init() tea.Cmd

func (*TaskManagerImpl) IsCancelled added in v0.53.3

func (t *TaskManagerImpl) IsCancelled() bool

IsCancelled returns true if the user cancelled the task manager

func (*TaskManagerImpl) IsDone added in v0.53.3

func (t *TaskManagerImpl) IsDone() bool

IsDone returns true if the user has finished with the task manager

func (*TaskManagerImpl) Reset added in v0.53.3

func (t *TaskManagerImpl) Reset()

Reset resets the task manager state for reuse

func (*TaskManagerImpl) SetHeight added in v0.53.3

func (t *TaskManagerImpl) SetHeight(height int)

SetHeight sets the height of the task manager

func (*TaskManagerImpl) SetWidth added in v0.53.3

func (t *TaskManagerImpl) SetWidth(width int)

SetWidth sets the width of the task manager

func (*TaskManagerImpl) Update added in v0.53.3

func (t *TaskManagerImpl) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*TaskManagerImpl) View added in v0.53.3

func (t *TaskManagerImpl) View() string

type TaskViewMode added in v0.53.3

type TaskViewMode int
const (
	TaskViewAll TaskViewMode = iota
	TaskViewActive
	TaskViewInputRequired
	TaskViewCompleted
	TaskViewCanceled
)

type ThemeSelectorImpl added in v0.47.0

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

ThemeSelectorImpl implements theme selection UI

func NewThemeSelector added in v0.47.0

func NewThemeSelector(themeService domain.ThemeService, styleProvider *styles.Provider) *ThemeSelectorImpl

NewThemeSelector creates a new theme selector

func (*ThemeSelectorImpl) GetSelected added in v0.47.0

func (m *ThemeSelectorImpl) GetSelected() string

GetSelected returns the selected theme

func (*ThemeSelectorImpl) Init added in v0.47.0

func (m *ThemeSelectorImpl) Init() tea.Cmd

func (*ThemeSelectorImpl) IsCancelled added in v0.47.0

func (m *ThemeSelectorImpl) IsCancelled() bool

IsCancelled returns true if selection was cancelled

func (*ThemeSelectorImpl) IsSelected added in v0.47.0

func (m *ThemeSelectorImpl) IsSelected() bool

IsSelected returns true if a theme was selected

func (*ThemeSelectorImpl) Reset added in v0.47.0

func (m *ThemeSelectorImpl) Reset()

Reset resets the theme selector to its initial state

func (*ThemeSelectorImpl) SetHeight added in v0.47.0

func (m *ThemeSelectorImpl) SetHeight(height int)

SetHeight sets the height of the theme selector

func (*ThemeSelectorImpl) SetWidth added in v0.47.0

func (m *ThemeSelectorImpl) SetWidth(width int)

SetWidth sets the width of the theme selector

func (*ThemeSelectorImpl) Update added in v0.47.0

func (m *ThemeSelectorImpl) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ThemeSelectorImpl) View added in v0.47.0

func (m *ThemeSelectorImpl) View() string

type TickMsg added in v0.49.0

type TickMsg struct{}

type TodoBoxView added in v0.63.1

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

TodoBoxView displays a collapsible todo list component

func NewTodoBoxView added in v0.63.1

func NewTodoBoxView(styleProvider *styles.Provider) *TodoBoxView

NewTodoBoxView creates a new todo box view

func (*TodoBoxView) AutoCollapse added in v0.63.1

func (tv *TodoBoxView) AutoCollapse() bool

AutoCollapse collapses if auto-expanded and delay has passed

func (*TodoBoxView) GetHeight added in v0.63.1

func (tv *TodoBoxView) GetHeight() int

GetHeight returns the height of the rendered component

func (*TodoBoxView) GetTodos added in v0.63.1

func (tv *TodoBoxView) GetTodos() []domain.TodoItem

GetTodos returns the current todos

func (*TodoBoxView) HasTodos added in v0.63.1

func (tv *TodoBoxView) HasTodos() bool

HasTodos returns whether there are any todos

func (*TodoBoxView) Init added in v0.63.1

func (tv *TodoBoxView) Init() tea.Cmd

Init initializes the component

func (*TodoBoxView) IsExpanded added in v0.63.1

func (tv *TodoBoxView) IsExpanded() bool

IsExpanded returns whether the component is expanded

func (*TodoBoxView) Render added in v0.63.1

func (tv *TodoBoxView) Render() string

Render renders the todo box

func (*TodoBoxView) SetExpanded added in v0.63.1

func (tv *TodoBoxView) SetExpanded(expanded bool)

SetExpanded sets the expanded state (user action)

func (*TodoBoxView) SetHeight added in v0.63.1

func (tv *TodoBoxView) SetHeight(height int)

SetHeight sets the component height

func (*TodoBoxView) SetTodos added in v0.63.1

func (tv *TodoBoxView) SetTodos(todos []domain.TodoItem)

SetTodos updates the todo list and triggers auto-expand

func (*TodoBoxView) SetWidth added in v0.63.1

func (tv *TodoBoxView) SetWidth(width int)

SetWidth sets the component width

func (*TodoBoxView) ShouldAutoCollapse added in v0.63.1

func (tv *TodoBoxView) ShouldAutoCollapse() bool

ShouldAutoCollapse returns true if the component should auto-collapse

func (*TodoBoxView) Toggle added in v0.63.1

func (tv *TodoBoxView) Toggle()

Toggle toggles the expanded state

func (*TodoBoxView) Update added in v0.63.1

func (tv *TodoBoxView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (*TodoBoxView) View added in v0.63.1

func (tv *TodoBoxView) View() string

View returns the rendered view

type ToolCallInfo added in v0.33.4

type ToolCallInfo struct {
	Name string
	Args map[string]any
}

type ToolCallRenderer added in v0.48.0

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

func NewToolCallRenderer added in v0.48.0

func NewToolCallRenderer(styleProvider *styles.Provider) *ToolCallRenderer

func (*ToolCallRenderer) ClearPreviews added in v0.48.0

func (r *ToolCallRenderer) ClearPreviews()

func (*ToolCallRenderer) HasActivePreviews added in v0.48.0

func (r *ToolCallRenderer) HasActivePreviews() bool

func (*ToolCallRenderer) Init added in v0.48.0

func (r *ToolCallRenderer) Init() tea.Cmd

func (*ToolCallRenderer) RenderPreviews added in v0.48.0

func (r *ToolCallRenderer) RenderPreviews() string

func (*ToolCallRenderer) RenderToolCalls added in v0.48.0

func (r *ToolCallRenderer) RenderToolCalls(toolCalls []sdk.ChatCompletionMessageToolCall, status string) string

func (*ToolCallRenderer) SetWidth added in v0.48.0

func (r *ToolCallRenderer) SetWidth(width int)

func (*ToolCallRenderer) Update added in v0.48.0

func (r *ToolCallRenderer) Update(msg tea.Msg) (*ToolCallRenderer, tea.Cmd)

type ToolExecutionState added in v0.49.0

type ToolExecutionState struct {
	CallID    string
	ToolName  string
	Status    ToolExecutionStatus
	Message   string
	StartTime time.Time
	EndTime   *time.Time
}

type ToolExecutionStatus added in v0.49.0

type ToolExecutionStatus string
const (
	ToolStatusQueued   ToolExecutionStatus = "queued"
	ToolStatusStarting ToolExecutionStatus = "starting"
	ToolStatusRunning  ToolExecutionStatus = "running"
	ToolStatusSaving   ToolExecutionStatus = "saving"
	ToolStatusComplete ToolExecutionStatus = "complete"
	ToolStatusFailed   ToolExecutionStatus = "failed"
)

type ToolInfo added in v0.48.0

type ToolInfo struct {
	Name   string
	Prefix string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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