tool

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(msg *types.Message, sessionState *service.SessionState) layout.Model

Types

type ComponentBuilder added in v1.9.11

type ComponentBuilder func(
	msg *types.Message,
	sessionState *service.SessionState,
) layout.Model

ComponentBuilder is a function that creates a tool component.

type Factory added in v1.9.11

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

Factory creates tool components using the registry. It looks up registered component builders and falls back to a default component if no specific builder is registered for a tool.

func NewFactory added in v1.9.11

func NewFactory(registry *Registry) *Factory

func (*Factory) Create added in v1.9.11

func (f *Factory) Create(msg *types.Message, sessionState *service.SessionState) layout.Model

type Registry added in v1.9.11

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

Registry manages tool component builders.

func NewRegistry added in v1.9.11

func NewRegistry() *Registry

func (*Registry) Get added in v1.9.11

func (r *Registry) Get(toolName string) (ComponentBuilder, bool)

func (*Registry) Register added in v1.9.11

func (r *Registry) Register(toolName string, builder ComponentBuilder)

Jump to

Keyboard shortcuts

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