tool

package
v1.144.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package tool provides instance-scoped tool renderer selection and generic/API views.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ar *animation.Runtime, msg *types.Message, sessionState service.SessionStateReader) layout.Model

New returns a generic/API view without the optional builtin bundle.

Types

type Builder added in v1.88.0

type Builder = func(ar *animation.Runtime, msg *types.Message, sessionState service.SessionStateReader) layout.Model

Builder constructs a view without starting its Init command.

type Registry

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

Registry resolves exact names, then category:<name>, then the generic fallback. At each tier custom renderers take precedence over builtins. Registries are independent and safe for concurrent registration and lookup; do not copy them.

func NewRegistry

func NewRegistry() *Registry

NewRegistry includes only API rendering. Import tool/defaults for the full bundle.

func (*Registry) InvalidateCaches added in v1.144.0

func (r *Registry) InvalidateCaches()

func (*Registry) New added in v1.144.0

func (r *Registry) New(ar *animation.Runtime, msg *types.Message, sessionState service.SessionStateReader) layout.Model

func (*Registry) Register

func (r *Registry) Register(key string, b Builder)

func (*Registry) RegisterBuiltin added in v1.144.0

func (r *Registry) RegisterBuiltin(key string, b Builder)

func (*Registry) RegisterCacheInvalidator added in v1.144.0

func (r *Registry) RegisterCacheInvalidator(invalidate func())

RegisterCacheInvalidator adds a theme-change hook for a renderer's shared caches.

Directories

Path Synopsis
Package defaults supplies the full builtin tool renderer bundle.
Package defaults supplies the full builtin tool renderer bundle.
Package plantool renders the single-plan write/status plan tool calls (write_plan, set_plan_status, get_plan_status, update_plan_from_file, export_plan_to_file).
Package plantool renders the single-plan write/status plan tool calls (write_plan, set_plan_status, get_plan_status, update_plan_from_file, export_plan_to_file).

Jump to

Keyboard shortcuts

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