fix: align struct fields and method signatures for goimports

This commit is contained in:
Leandro Barbosa 2026-02-18 16:09:29 -03:00
parent 26cd169f7e
commit 09061d8175
3 changed files with 14 additions and 12 deletions

View file

@ -814,9 +814,9 @@ type simpleTool struct {
name string name string
} }
func (s *simpleTool) Name() string { return s.name } func (s *simpleTool) Name() string { return s.name }
func (s *simpleTool) Description() string { return "test tool" } func (s *simpleTool) Description() string { return "test tool" }
func (s *simpleTool) Parameters() map[string]interface{} { return nil } func (s *simpleTool) Parameters() map[string]interface{} { return nil }
func (s *simpleTool) Execute(_ context.Context, _ map[string]interface{}) *tools.ToolResult { func (s *simpleTool) Execute(_ context.Context, _ map[string]interface{}) *tools.ToolResult {
return tools.NewToolResult("ok") return tools.NewToolResult("ok")
} }

View file

@ -10,11 +10,11 @@ import (
// HandoffTool allows an LLM agent to delegate a task to another agent. // HandoffTool allows an LLM agent to delegate a task to another agent.
type HandoffTool struct { type HandoffTool struct {
resolver AgentResolver resolver AgentResolver
board *Blackboard board *Blackboard
fromAgentID string fromAgentID string
originChannel string originChannel string
originChatID string originChatID string
depth int // current handoff depth (0 = top-level) depth int // current handoff depth (0 = top-level)
visited []string // agent IDs already in the call chain visited []string // agent IDs already in the call chain
maxDepth int // max allowed depth (0 = use DefaultMaxHandoffDepth) maxDepth int // max allowed depth (0 = use DefaultMaxHandoffDepth)

View file

@ -30,10 +30,12 @@ type dummyTool struct {
name string name string
} }
func (d *dummyTool) Name() string { return d.name } func (d *dummyTool) Name() string { return d.name }
func (d *dummyTool) Description() string { return "test tool" } func (d *dummyTool) Description() string { return "test tool" }
func (d *dummyTool) Parameters() map[string]interface{} { return nil } func (d *dummyTool) Parameters() map[string]interface{} { return nil }
func (d *dummyTool) Execute(_ context.Context, _ map[string]interface{}) *ToolResult { return NewToolResult("ok") } func (d *dummyTool) Execute(_ context.Context, _ map[string]interface{}) *ToolResult {
return NewToolResult("ok")
}
func TestToolHook_BeforeAndAfterCalled(t *testing.T) { func TestToolHook_BeforeAndAfterCalled(t *testing.T) {
reg := NewToolRegistry() reg := NewToolRegistry()