ai_panel

package
v0.0.0-...-421e1c8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIChunkMsg

type AIChunkMsg struct {
	Chunk ai.StreamChunk
}

type Model

type Model struct {
	Styles   Styles
	Width    int
	Height   int
	Visible  bool
	History  []*genai.Content
	Viewport viewport.Model
	Input    textinput.Model
	Spinner  spinner.Model
	Loading  bool
	// contains filtered or unexported fields
}

func New

func New(s styles.Styles) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) SetSize

func (m *Model) SetSize(w, h int)

func (*Model) SetSizeExact

func (m *Model) SetSizeExact(w, h int)

SetSizeExact sets the panel to exact dimensions (used when the main model has already computed the width split). Skips viewport recreation if dimensions haven't changed to avoid per-frame allocation overhead.

func (*Model) SetStyles

func (m *Model) SetStyles(s styles.Styles)

func (*Model) Toggle

func (m *Model) Toggle()

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Styles

type Styles struct {
	Panel       lipgloss.Style
	Header      lipgloss.Style
	User        lipgloss.Style
	AI          lipgloss.Style
	Tool        lipgloss.Style
	Footer      lipgloss.Style
	InputBorder lipgloss.Style
}

func DefaultStyles

func DefaultStyles(s styles.Styles) Styles

Jump to

Keyboard shortcuts

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