Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions agents/documentor/documentor.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

type Documentor struct {
inner agent.Agent
agent.Agent
}

// NewDocumentor returns a Documentor agent.
Expand Down Expand Up @@ -42,10 +42,5 @@ func NewDocumentor(ctx context.Context, cfg *Config, model model.LLM) (*Document
return nil, err
}

return &Documentor{inner: da}, nil
}

// Agent returns the inner agent interface (higher abstraction may not be necessary but we will see).
func (d *Documentor) Agent() agent.Agent {
return d.inner
return &Documentor{Agent: da}, nil
}
6 changes: 3 additions & 3 deletions cmd/documentor.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ func NewDocumentorCmd() *cobra.Command {

slog.Info(
"created agent",
"agent_name", docAgent.Agent().Name(),
"agent_description", docAgent.Agent().Description(),
"agent_name", docAgent.Name(),
"agent_description", docAgent.Description(),
)

sessService := session.InMemoryService()
r, err := runner.New(runner.Config{
AppName: "documentor",
Agent: docAgent.Agent(),
Agent: docAgent,
SessionService: sessService,
})
if err != nil {
Expand Down
4 changes: 0 additions & 4 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,12 @@ func GetToolByEnum(kind Kind, deps *Deps) (tool.Tool, error) {
return nil, fmt.Errorf("fetch_repo_tree requires WorkDir")
}
return NewFetchRepoTreeTool(cfg.WorkDir)

case ReadFile:
return NewReadFileTool()

case SearchRepo:
return NewSearchRepoTool()

case WriteFile:
return NewWriteFileTool()

default:
return nil, fmt.Errorf("invalid tool kind: %q", kind)
}
Expand Down
Loading