diff options
| author | Kujtim Hoxha <[email protected]> | 2025-04-13 14:37:05 +0200 |
|---|---|---|
| committer | Kujtim Hoxha <[email protected]> | 2025-04-21 13:41:27 +0200 |
| commit | cdc5f209dccdc980714f2ca1aeb52133d6e93cce (patch) | |
| tree | 02fe97994dfce7f2e842be7b4c5170f534220eee /internal/llm/agent/task.go | |
| parent | 3ad983db0f2c08826d56cb5de274d706c95b3353 (diff) | |
| download | opencode-cdc5f209dccdc980714f2ca1aeb52133d6e93cce.tar.gz opencode-cdc5f209dccdc980714f2ca1aeb52133d6e93cce.zip | |
cleanup diff, cleanup agent
Diffstat (limited to 'internal/llm/agent/task.go')
| -rw-r--r-- | internal/llm/agent/task.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/llm/agent/task.go b/internal/llm/agent/task.go index c196cb107..0a072044c 100644 --- a/internal/llm/agent/task.go +++ b/internal/llm/agent/task.go @@ -4,10 +4,10 @@ import ( "context" "errors" - "github.com/kujtimiihoxha/termai/internal/app" "github.com/kujtimiihoxha/termai/internal/config" "github.com/kujtimiihoxha/termai/internal/llm/models" "github.com/kujtimiihoxha/termai/internal/llm/tools" + "github.com/kujtimiihoxha/termai/internal/lsp" ) type taskAgent struct { @@ -18,7 +18,7 @@ func (c *taskAgent) Generate(ctx context.Context, sessionID string, content stri return c.generate(ctx, sessionID, content) } -func NewTaskAgent(app *app.App) (Agent, error) { +func NewTaskAgent(lspClients map[string]*lsp.Client) (Service, error) { model, ok := models.SupportedModels[config.Get().Model.Coder] if !ok { return nil, errors.New("model not supported") @@ -31,13 +31,12 @@ func NewTaskAgent(app *app.App) (Agent, error) { } return &taskAgent{ agent: &agent{ - App: app, tools: []tools.BaseTool{ tools.NewGlobTool(), tools.NewGrepTool(), tools.NewLsTool(), tools.NewSourcegraphTool(), - tools.NewViewTool(app.LSPClients), + tools.NewViewTool(lspClients), }, model: model, agent: agentProvider, |
