Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMessageHistory added in v0.0.3

func FormatMessageHistory(messages []*schema.Message) string

func FormatMissingFieldsSectionForDialogue added in v0.0.3

func FormatMissingFieldsSectionForDialogue(fields []FieldInfo) string

func FormatToolRequest

func FormatToolRequest[T any](req *ToolRequest[T]) (string, error)

func FormatValidationErrorsSection added in v0.0.3

func FormatValidationErrorsSection(errors []FieldInfo) string

func WrapMarkdownCodeBlock added in v0.0.3

func WrapMarkdownCodeBlock(text, lang string) string

Types

type FieldInfo

type FieldInfo struct {
	JSONPointer string `json:"json_pointer"`
	DisplayName string `json:"display_name"`
	Description string `json:"description,omitempty"`
	Required    bool   `json:"required"`
}

type Phase

type Phase string
const (
	PhaseCollecting Phase = "collecting"
	PhaseConfirmed  Phase = "confirmed"
	PhaseCancelled  Phase = "cancelled"
)

type ToolRequest

type ToolRequest[T any] struct {
	State        T
	StateSummary string

	Phase    Phase
	Messages []*schema.Message

	MissingFields    []FieldInfo
	ValidationErrors []FieldInfo
	Extra            map[string]any
}

Jump to

Keyboard shortcuts

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