dialog

package
v0.0.0-...-dac94cf Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserCommandPrefix    = "user:"
	ProjectCommandPrefix = "project:"
	SkillCommandPrefix   = "skill:"
)

Command prefix constants

Variables

This section is empty.

Functions

func ActiveTeamName

func ActiveTeamName() string

func AgencyBootstrapPrompt

func AgencyBootstrapPrompt(templateName string) string

func AgencyGenesisPrompt

func AgencyGenesisPrompt() string

func AgencyStatusPrompt

func AgencyStatusPrompt() string

func AgencyTemplatesPrompt

func AgencyTemplatesPrompt() string

func ConfiguredTemplateNames

func ConfiguredTemplateNames() []string

func DefaultTemplateName

func DefaultTemplateName() string

func GetSelectedModel

func GetSelectedModel(cfg *config.Config) models.Model

func InitProjectExecutionPrompt

func InitProjectExecutionPrompt() string

func InitProjectPrompt

func InitProjectPrompt() string

func InstalledSkillNames

func InstalledSkillNames() []string

func InstalledSkillPath

func InstalledSkillPath(name string) string

func IsHidden

func IsHidden(file string) (bool, error)

func ListSkillsPrompt

func ListSkillsPrompt() string

func SkillUsePrompt

func SkillUsePrompt(name, task string) string

func TeamBootstrapPrompt

func TeamBootstrapPrompt(templateName string) string

func TeamStatusPrompt

func TeamStatusPrompt() string

func TeamTemplatesPrompt

func TeamTemplatesPrompt() string

Types

type AgencyDialog

type AgencyDialog interface {
	tea.Model
	layout.Bindings
	SetData(AgencyDialogData)
}

func NewAgencyDialogCmp

func NewAgencyDialogCmp() AgencyDialog

type AgencyDialogData

type AgencyDialogData struct {
	ProductName         string
	CurrentConstitution string
	SoloConstitution    string
	OfficeMode          string
	ConsensusMode       string
	SharedWorkplace     string
	RedisAddress        string
	LedgerPath          string
	LastEvent           string
	Blueprint           string
	TeamTemplate        string
	Governance          string
	WorkspaceMode       string
	Running             bool
	DefaultQuorum       int
	TeamName            string
	Leader              string
	UnreadDirect        int
	UnreadBroadcasts    int
	PendingHandoffs     int
	MemberCount         int
	WorkerCount         int
	ActiveWorkerCount   int
	BoardReady          int
	BoardActive         int
	BoardReview         int
	BoardDone           int
	Thread              []string
	RequiredGates       []string
	Constitutions       []string
}

type AttachmentAddedMsg

type AttachmentAddedMsg struct {
	Attachment message.Attachment
}

type BootAgencyOfficeMsg

type BootAgencyOfficeMsg struct {
	Constitution string
}

BootAgencyOfficeMsg starts or reconciles the Agency office runtime.

type CloseAgencyDialogMsg

type CloseAgencyDialogMsg struct{}

CloseAgencyDialogMsg closes the Agency status overlay.

type CloseCommandDialogMsg

type CloseCommandDialogMsg struct{}

CloseCommandDialogMsg is sent when the command dialog is closed

type CloseInitDialogMsg

type CloseInitDialogMsg struct {
	Initialize bool
}

CloseInitDialogMsg is a message that is sent when the init dialog is closed.

type CloseModelDialogMsg

type CloseModelDialogMsg struct{}

CloseModelDialogMsg is sent when a model is selected

type CloseMultiArgumentsDialogMsg

type CloseMultiArgumentsDialogMsg struct {
	Submit    bool
	CommandID string
	Content   string
	Args      map[string]string
}

CloseMultiArgumentsDialogMsg is a message that is sent when the multi-arguments dialog is closed.

type CloseQuitMsg

type CloseQuitMsg struct{}

type CloseSessionDialogMsg

type CloseSessionDialogMsg struct{}

CloseSessionDialogMsg is sent when the session dialog is closed

type CloseThemeDialogMsg

type CloseThemeDialogMsg struct{}

CloseThemeDialogMsg is sent when the theme dialog is closed

type Command

type Command struct {
	ID          string
	Title       string
	Description string
	Invocation  string
	ArgsText    string
	Handler     func(cmd Command) tea.Cmd
}

Command represents a command that can be executed

func LoadCustomCommands

func LoadCustomCommands() ([]Command, error)

LoadCustomCommands loads custom commands from both XDG_CONFIG_HOME and project data directory

func (Command) Render

func (ci Command) Render(selected bool, width int) string

type CommandDialog

type CommandDialog interface {
	tea.Model
	layout.Bindings
	SetCommands(commands []Command)
}

CommandDialog interface for the command selection dialog

func NewCommandDialogCmp

func NewCommandDialogCmp() CommandDialog

NewCommandDialogCmp creates a new command selection dialog

type CommandRunCustomMsg

type CommandRunCustomMsg struct {
	Content string
	Args    map[string]string // Map of argument names to values
}

CommandRunCustomMsg is sent when a custom command is executed

type CommandSelectedMsg

type CommandSelectedMsg struct {
	Command Command
}

CommandSelectedMsg is sent when a command is selected

type CompletionDialog

type CompletionDialog interface {
	tea.Model
	layout.Bindings
	SetWidth(width int)
}

func NewCompletionDialogCmp

func NewCompletionDialogCmp(completionProvider CompletionProvider) CompletionDialog

type CompletionDialogCloseMsg

type CompletionDialogCloseMsg struct{}

type CompletionDialogCompleteItemMsg

type CompletionDialogCompleteItemMsg struct {
	Value string
}

type CompletionItem

type CompletionItem struct {
	Title string
	Value string
	// contains filtered or unexported fields
}

func (*CompletionItem) DisplayValue

func (ci *CompletionItem) DisplayValue() string

func (*CompletionItem) GetValue

func (ci *CompletionItem) GetValue() string

func (*CompletionItem) Render

func (ci *CompletionItem) Render(selected bool, width int) string

type CompletionItemI

type CompletionItemI interface {
	utilComponents.SimpleListItem
	GetValue() string
	DisplayValue() string
}

func NewCompletionItem

func NewCompletionItem(completionItem CompletionItem) CompletionItemI

type CompletionProvider

type CompletionProvider interface {
	GetId() string
	GetEntry() CompletionItemI
	GetChildEntries(query string) ([]CompletionItemI, error)
}

type CompletionSelectedMsg

type CompletionSelectedMsg struct {
	SearchString    string
	CompletionValue string
}

type DirNode

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

type FilePrickerKeyMap

type FilePrickerKeyMap struct {
	Enter          key.Binding
	Down           key.Binding
	Up             key.Binding
	Forward        key.Binding
	Backward       key.Binding
	OpenFilePicker key.Binding
	Esc            key.Binding
	InsertCWD      key.Binding
}

type FilepickerCmp

type FilepickerCmp interface {
	tea.Model
	ToggleFilepicker(showFilepicker bool)
	IsCWDFocused() bool
}

func NewFilepickerCmp

func NewFilepickerCmp(app *app.App) FilepickerCmp

type HelpCmp

type HelpCmp interface {
	tea.Model
	SetBindings([]key.Binding)
}

func NewHelpCmp

func NewHelpCmp() HelpCmp

type InitDialogCmp

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

InitDialogCmp is a component that asks the user if they want to initialize the project.

func NewInitDialogCmp

func NewInitDialogCmp() InitDialogCmp

NewInitDialogCmp creates a new InitDialogCmp.

func (InitDialogCmp) Bindings

func (m InitDialogCmp) Bindings() []key.Binding

Bindings implements layout.Bindings.

func (InitDialogCmp) Init

func (m InitDialogCmp) Init() tea.Cmd

Init implements tea.Model.

func (*InitDialogCmp) SetSize

func (m *InitDialogCmp) SetSize(width, height int)

SetSize sets the size of the component.

func (InitDialogCmp) Update

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

Update implements tea.Model.

func (InitDialogCmp) View

func (m InitDialogCmp) View() string

View implements tea.Model.

type ModelDialog

type ModelDialog interface {
	tea.Model
	layout.Bindings
}

ModelDialog interface for the model selection dialog

func NewModelDialogCmp

func NewModelDialogCmp() ModelDialog

type ModelSelectedMsg

type ModelSelectedMsg struct {
	Model models.Model
}

ModelSelectedMsg is sent when a model is selected

type MultiArgumentsDialogCmp

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

MultiArgumentsDialogCmp is a component that asks the user for multiple command arguments.

func NewMultiArgumentsDialogCmp

func NewMultiArgumentsDialogCmp(commandID, content string, argNames []string) MultiArgumentsDialogCmp

NewMultiArgumentsDialogCmp creates a new MultiArgumentsDialogCmp.

func (MultiArgumentsDialogCmp) Bindings

func (m MultiArgumentsDialogCmp) Bindings() []key.Binding

Bindings implements layout.Bindings.

func (MultiArgumentsDialogCmp) Init

func (m MultiArgumentsDialogCmp) Init() tea.Cmd

Init implements tea.Model.

func (*MultiArgumentsDialogCmp) SetSize

func (m *MultiArgumentsDialogCmp) SetSize(width, height int)

SetSize sets the size of the component.

func (MultiArgumentsDialogCmp) Update

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

Update implements tea.Model.

func (MultiArgumentsDialogCmp) View

View implements tea.Model.

type PermissionAction

type PermissionAction string
const (
	PermissionAllow           PermissionAction = "allow"
	PermissionAllowForSession PermissionAction = "allow_session"
	PermissionDeny            PermissionAction = "deny"
)

Permission responses

type PermissionDialogCmp

type PermissionDialogCmp interface {
	tea.Model
	layout.Bindings
	SetPermissions(permission permission.PermissionRequest) tea.Cmd
}

PermissionDialogCmp interface for permission dialog component

func NewPermissionDialogCmp

func NewPermissionDialogCmp() PermissionDialogCmp

type PermissionResponseMsg

type PermissionResponseMsg struct {
	Permission permission.PermissionRequest
	Action     PermissionAction
}

PermissionResponseMsg represents the user's response to a permission request

type QuitDialog

type QuitDialog interface {
	tea.Model
	layout.Bindings
}

func NewQuitCmp

func NewQuitCmp() QuitDialog

type SessionDialog

type SessionDialog interface {
	tea.Model
	layout.Bindings
	SetSessions(sessions []session.Session)
	SetSelectedSession(sessionID string)
}

SessionDialog interface for the session switching dialog

func NewSessionDialogCmp

func NewSessionDialogCmp() SessionDialog

NewSessionDialogCmp creates a new session switching dialog

type SessionSelectedMsg

type SessionSelectedMsg struct {
	Session session.Session
}

SessionSelectedMsg is sent when a session is selected

type ShowAgencyDialogMsg

type ShowAgencyDialogMsg struct{}

ShowAgencyDialogMsg opens the Agency status overlay.

type ShowCommandDialogMsg

type ShowCommandDialogMsg struct{}

ShowCommandDialogMsg opens the command dialog from another UI surface.

type ShowHelpDialogMsg

type ShowHelpDialogMsg struct{}

ShowHelpDialogMsg opens the keyboard shortcut help overlay.

type ShowInitDialogMsg

type ShowInitDialogMsg struct {
	Show bool
}

ShowInitDialogMsg is a message that is sent to show the init dialog.

type ShowModelDialogMsg

type ShowModelDialogMsg struct{}

ShowModelDialogMsg opens the model selection dialog from another UI surface.

type ShowMultiArgumentsDialogMsg

type ShowMultiArgumentsDialogMsg struct {
	CommandID string
	Content   string
	ArgNames  []string
}

ShowMultiArgumentsDialogMsg is a message that is sent to show the multi-arguments dialog.

type ShowQuitDialogMsg

type ShowQuitDialogMsg struct{}

ShowQuitDialogMsg opens the quit confirmation overlay.

type ShowSessionDialogMsg

type ShowSessionDialogMsg struct{}

ShowSessionDialogMsg opens the session picker overlay.

type ShowThemeDialogMsg

type ShowThemeDialogMsg struct{}

ShowThemeDialogMsg opens the theme picker overlay.

type StartAgencyGenesisMsg

type StartAgencyGenesisMsg struct {
	Intent       string
	Constitution string
}

StartAgencyGenesisMsg records a genesis brief using the configured Agency service.

type StartCompactSessionMsg

type StartCompactSessionMsg struct{}

StartCompactSessionMsg triggers the session compaction flow.

type StopAgencyOfficeMsg

type StopAgencyOfficeMsg struct{}

StopAgencyOfficeMsg stops the Agency office runtime.

type ThemeChangedMsg

type ThemeChangedMsg struct {
	ThemeName string
}

ThemeChangedMsg is sent when the theme is changed

type ThemeDialog

type ThemeDialog interface {
	tea.Model
	layout.Bindings
}

ThemeDialog interface for the theme switching dialog

func NewThemeDialogCmp

func NewThemeDialogCmp() ThemeDialog

NewThemeDialogCmp creates a new theme switching dialog

Jump to

Keyboard shortcuts

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