Commit 6a69018
Changed files (3)
cmd
del
internal
cmd/del/main.go
@@ -4,7 +4,6 @@ import (
"log"
"github.com/spf13/cobra"
-
"github.com/xlgmokha/deltron/internal/del"
)
internal/del/assistant.go
@@ -4,21 +4,18 @@ import (
"fmt"
)
-// Tool represents a tool Del can run (stub for now)
type Tool struct {
Name string
Description string
Handler func(args map[string]interface{}) (interface{}, error)
}
-// Del represents the assistant instance
type Del struct {
aiProvider AIProvider
tools map[string]*Tool
mcpServers map[string]string
}
-// NewDel creates a new assistant
func NewDel(provider AIProvider) *Del {
return &Del{
aiProvider: provider,
@@ -27,8 +24,6 @@ func NewDel(provider AIProvider) *Del {
}
}
-// StartREPL is a stub for now
func (d *Del) StartREPL() {
- fmt.Printf("๐ค Del (%s) is ready!\n", d.aiProvider.Name())
- // Stub โ eventually add interactive loop here
+ fmt.Printf("๐ค Del (%s) is ready! ", d.aiProvider.Name())
}
internal/del/provider.go
@@ -6,13 +6,11 @@ import (
"os/exec"
)
-// AIProvider abstracts Claude/Ollama/etc
type AIProvider interface {
Generate(ctx context.Context, prompt string) (string, error)
Name() string
}
-// ClaudeProvider uses the Claude CLI
type ClaudeProvider struct {
apiKey string
}
@@ -34,7 +32,6 @@ func (c *ClaudeProvider) Name() string {
return "Claude"
}
-// OllamaProvider uses the local Ollama CLI
type OllamaProvider struct {
model string
}
@@ -56,7 +53,6 @@ func (o *OllamaProvider) Name() string {
return fmt.Sprintf("Ollama (%s)", o.model)
}
-// AutoProvider picks Claude if available, fallback to Ollama
func AutoProvider(apiKey, model string) AIProvider {
if exec.Command("claude", "--version").Run() == nil {
return NewClaudeProvider(apiKey)