native

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package native provides a reusable Forma chat panel, rendered entirely in Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Panel

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

Panel owns a conversation. View and SetWindow run on the UI thread; model and tools run on a worker. Close is nonblocking and safe from any goroutine.

func New

func New(o dshgo.Options) (*Panel, error)

New constructs a panel. When no approval callback is supplied, protected tools require an explicit choice in the native panel before they execute.

func (*Panel) Busy

func (p *Panel) Busy() bool

Busy reports whether a turn is running. Call on the UI thread.

func (*Panel) Close

func (p *Panel) Close() error

func (*Panel) Configure

func (p *Panel) Configure(o dshgo.Options) error

Configure replaces an idle conversation and clears its history. Validation happens before replacing the old conversation. Call on the UI thread.

func (*Panel) SetHeaderActions

func (p *Panel) SetHeaderActions(build func(*ui.Context))

SetHeaderActions adds non-draggable application controls on the UI thread.

func (*Panel) SetNotice

func (p *Panel) SetNotice(text string)

SetNotice sets a persistent mode description. Call on the UI thread.

func (*Panel) SetWindow

func (p *Panel) SetWindow(w *golet.Window)

SetWindow connects UI updates and cancels work on window close. Call once, immediately after NewWindow; constructing the first frame needs no attachment.

func (*Panel) View

func (p *Panel) View(c *ui.Context)

View builds a chat area which follows the surrounding Forma/UI theme.

Jump to

Keyboard shortcuts

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