Documentation
¶
Index ¶
- type BashFormatter
- type FormatterRegistry
- func (r *FormatterRegistry) Format(toolName string, data map[string]interface{}) (template.HTML, error)
- func (r *FormatterRegistry) FormatWithCWD(toolName string, data map[string]interface{}, cwd string) (template.HTML, error)
- func (r *FormatterRegistry) GetCompactView(toolName string, data map[string]interface{}) template.HTML
- func (r *FormatterRegistry) GetDescription(toolName string, data map[string]interface{}) string
- func (r *FormatterRegistry) Register(formatter ToolFormatter)
- type ToolFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BashFormatter ¶
type BashFormatter interface {
ToolFormatter
FormatInputWithCWD(data map[string]interface{}, cwd string) (template.HTML, error)
}
BashFormatter extends ToolFormatter with CWD context.
type FormatterRegistry ¶
type FormatterRegistry struct {
// contains filtered or unexported fields
}
FormatterRegistry manages tool-specific formatters.
func NewFormatterRegistry ¶
func NewFormatterRegistry() *FormatterRegistry
NewFormatterRegistry creates a new formatter registry
func (*FormatterRegistry) Format ¶
func (r *FormatterRegistry) Format(toolName string, data map[string]interface{}) (template.HTML, error)
Format formats tool input using the appropriate formatter
func (*FormatterRegistry) FormatWithCWD ¶
func (r *FormatterRegistry) FormatWithCWD(toolName string, data map[string]interface{}, cwd string) (template.HTML, error)
FormatWithCWD formats tool input with current working directory (for Bash tool)
func (*FormatterRegistry) GetCompactView ¶
func (r *FormatterRegistry) GetCompactView(toolName string, data map[string]interface{}) template.HTML
GetCompactView gets the compact view for a tool
func (*FormatterRegistry) GetDescription ¶
func (r *FormatterRegistry) GetDescription(toolName string, data map[string]interface{}) string
GetDescription gets the tool description using the appropriate formatter
func (*FormatterRegistry) Register ¶
func (r *FormatterRegistry) Register(formatter ToolFormatter)
Register adds a formatter to the registry
type ToolFormatter ¶
type ToolFormatter interface {
Name() string
FormatInput(data map[string]interface{}) (template.HTML, error)
FormatOutput(output interface{}) (template.HTML, error)
ValidateInput(data map[string]interface{}) error
GetDescription(data map[string]interface{}) string
GetCompactView(data map[string]interface{}) template.HTML
}
ToolFormatter formats tool inputs and outputs for display.
Click to show internal directories.
Click to hide internal directories.