summaryrefslogtreecommitdiffhomepage
path: root/internal/llm/agent/agent-tool.go
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-04-15 11:58:01 +0200
committerKujtim Hoxha <[email protected]>2025-04-21 13:41:27 +0200
commit1cdd24fbc7b45693b65b5d55e4f45c2ebc60a556 (patch)
treea623be9bdcfb78fca8185d10019c118f4ac00106 /internal/llm/agent/agent-tool.go
parentf6be348bf704ab3d012eec549357f5acd9c74796 (diff)
downloadopencode-1cdd24fbc7b45693b65b5d55e4f45c2ebc60a556.tar.gz
opencode-1cdd24fbc7b45693b65b5d55e4f45c2ebc60a556.zip
minor fixes
Diffstat (limited to 'internal/llm/agent/agent-tool.go')
-rw-r--r--internal/llm/agent/agent-tool.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/llm/agent/agent-tool.go b/internal/llm/agent/agent-tool.go
index a92ea44a4..83160bb64 100644
--- a/internal/llm/agent/agent-tool.go
+++ b/internal/llm/agent/agent-tool.go
@@ -53,7 +53,7 @@ func (b *agentTool) Run(ctx context.Context, call tools.ToolCall) (tools.ToolRes
return tools.ToolResponse{}, fmt.Errorf("session_id and message_id are required")
}
- agent, err := NewTaskAgent(b.lspClients)
+ agent, err := NewTaskAgent(b.messages, b.sessions, b.lspClients)
if err != nil {
return tools.ToolResponse{}, fmt.Errorf("error creating agent: %s", err)
}
@@ -105,9 +105,11 @@ func (b *agentTool) Run(ctx context.Context, call tools.ToolCall) (tools.ToolRes
func NewAgentTool(
Sessions session.Service,
Messages message.Service,
+ LspClients map[string]*lsp.Client,
) tools.BaseTool {
return &agentTool{
- sessions: Sessions,
- messages: Messages,
+ sessions: Sessions,
+ messages: Messages,
+ lspClients: LspClients,
}
}