summaryrefslogtreecommitdiffhomepage
path: root/internal/llm/agent/task.go
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-04-21 19:59:35 +0200
committerGitHub <[email protected]>2025-04-21 19:59:35 +0200
commitf33dff87725764af0b675b5e5b2e011b21c14c90 (patch)
tree4fe2c022305f13775f2cab3cdd80cd808259765b /internal/llm/agent/task.go
parent6b1c64bcc75b89c530294b6a2d4404682b435d56 (diff)
parent3a6a26981a8074b6ab0eaadb520db986e04799ff (diff)
downloadopencode-f33dff87725764af0b675b5e5b2e011b21c14c90.tar.gz
opencode-f33dff87725764af0b675b5e5b2e011b21c14c90.zip
Merge pull request #27 from kujtimiihoxha/opencode
OpenCode - Initial Implementation
Diffstat (limited to 'internal/llm/agent/task.go')
-rw-r--r--internal/llm/agent/task.go46
1 files changed, 0 insertions, 46 deletions
diff --git a/internal/llm/agent/task.go b/internal/llm/agent/task.go
deleted file mode 100644
index 034e93460..000000000
--- a/internal/llm/agent/task.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package agent
-
-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"
-)
-
-type taskAgent struct {
- *agent
-}
-
-func (c *taskAgent) Generate(ctx context.Context, sessionID string, content string) error {
- return c.generate(ctx, sessionID, content)
-}
-
-func NewTaskAgent(app *app.App) (Agent, error) {
- model, ok := models.SupportedModels[config.Get().Model.Coder]
- if !ok {
- return nil, errors.New("model not supported")
- }
-
- agentProvider, titleGenerator, err := getAgentProviders(app.Context, model)
- if err != nil {
- return nil, err
- }
- return &taskAgent{
- agent: &agent{
- App: app,
- tools: []tools.BaseTool{
- tools.NewGlobTool(),
- tools.NewGrepTool(),
- tools.NewLsTool(),
- tools.NewSourcegraphTool(),
- tools.NewViewTool(app.LSPClients),
- },
- model: model,
- agent: agentProvider,
- titleGenerator: titleGenerator,
- },
- }, nil
-}