components

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2026 Teradata

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartSpinner

func StartSpinner() tea.Cmd

StartSpinner returns a command to start the spinner animation.

func Static

func Static(version string) string

Static returns a static (non-animated) version of the logo

func StaticColored

func StaticColored(version string) string

StaticColored returns a colored static version (for terminal output)

Types

type HelpView

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

HelpView renders help text for key bindings.

func NewHelpView

func NewHelpView(s *styles.Styles, bindings []KeyBinding) *HelpView

NewHelpView creates a new help view.

func (*HelpView) Render

func (h *HelpView) Render(width int) string

Render renders the help view.

type KeyBinding

type KeyBinding struct {
	Key  string
	Help string
}

KeyBinding represents a keyboard shortcut.

func DefaultKeyBindings

func DefaultKeyBindings() []KeyBinding

DefaultKeyBindings returns the default key bindings.

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

Logo is an animated ASCII logo with star field

func NewLogo(version string) Logo

NewLogo creates a new animated logo

func (Logo) Init

func (l Logo) Init() tea.Cmd

Init initializes the logo

func (Logo) Update

func (l Logo) Update(msg tea.Msg) (Logo, tea.Cmd)

Update handles messages

func (Logo) View

func (l Logo) View() string

View renders the logo

type ModelItem

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

ModelItem represents a selectable LLM model.

func (ModelItem) Description

func (m ModelItem) Description() string

Description returns the description for a model item.

func (ModelItem) FilterValue

func (m ModelItem) FilterValue() string

FilterValue implements list.Item.

func (ModelItem) Title

func (m ModelItem) Title() string

Title returns the title for a model item.

type ModelSelectorModel

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

ModelSelectorModel is a UI component for selecting LLM models.

func NewModelSelector

func NewModelSelector(models []*loomv1.ModelInfo, currentModel *loomv1.ModelInfo, s *styles.Styles) *ModelSelectorModel

NewModelSelector creates a new model selector.

func (*ModelSelectorModel) Init

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

Init initializes the model selector.

func (*ModelSelectorModel) IsDone

func (m *ModelSelectorModel) IsDone() bool

IsDone returns true if the selector has finished (user selected or cancelled).

func (*ModelSelectorModel) Selected

func (m *ModelSelectorModel) Selected() *loomv1.ModelInfo

Selected returns the selected model, if any.

func (*ModelSelectorModel) Update

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

Update handles messages.

func (*ModelSelectorModel) View

func (m *ModelSelectorModel) View() string

View renders the model selector.

type PermissionPromptModel

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

PermissionPromptModel is a UI component for requesting tool execution permission.

func NewPermissionPrompt

func NewPermissionPrompt(req *loomv1.ToolPermissionRequest, s *styles.Styles) *PermissionPromptModel

NewPermissionPrompt creates a new permission prompt.

func (*PermissionPromptModel) Init

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

Init initializes the permission prompt.

func (*PermissionPromptModel) Result

Result returns the permission result after user decision.

func (*PermissionPromptModel) Update

Update handles messages.

func (*PermissionPromptModel) View

func (m *PermissionPromptModel) View() string

View renders the permission prompt.

type PermissionResult

type PermissionResult struct {
	Granted  bool
	Remember bool
	Message  string
}

PermissionResult represents the user's permission decision.

type SpinnerModel

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

SpinnerModel is an enhanced spinner with gradient colors and animations inspired by Crush TUI.

func NewSpinner

func NewSpinner(theme *styles.Theme) *SpinnerModel

NewSpinner creates a new enhanced spinner.

func (*SpinnerModel) IsActive

func (s *SpinnerModel) IsActive() bool

IsActive returns whether the spinner is animating.

func (*SpinnerModel) SetMessage

func (s *SpinnerModel) SetMessage(msg string)

SetMessage sets the spinner message.

func (*SpinnerModel) Start

func (s *SpinnerModel) Start()

Start activates the spinner.

func (*SpinnerModel) Stop

func (s *SpinnerModel) Stop()

Stop deactivates the spinner.

func (*SpinnerModel) Update

func (s *SpinnerModel) Update(msg tea.Msg) (*SpinnerModel, tea.Cmd)

Update handles spinner animation.

func (*SpinnerModel) View

func (s *SpinnerModel) View() string

View renders the spinner.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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