removed duplicated parameters

This commit is contained in:
afjcjsbx 2026-02-20 00:41:16 +01:00
parent 5159a015ae
commit f8166d9841
2 changed files with 4 additions and 4 deletions

View file

@ -108,7 +108,7 @@ func registerSharedTools(cfg *config.Config, msgBus *bus.MessageBus, registry *A
// Vision tool // Vision tool
if cfg.Tools.Vision.Enabled { if cfg.Tools.Vision.Enabled {
agent.Tools.Register(tools.NewAnalyzeImageTool(cfg.Tools.Vision)) agent.Tools.Register(tools.NewAnalyzeImageTool(cfg.Tools.Vision, cfg.WorkspacePath(), cfg.Agents.Defaults.RestrictToWorkspace))
} }
// Message tool // Message tool

View file

@ -31,10 +31,10 @@ type AnalyzeImageTool struct {
restrict bool restrict bool
} }
func NewAnalyzeImageTool(opts config.VisionToolConfig) *AnalyzeImageTool { func NewAnalyzeImageTool(opts config.VisionToolConfig, workspace string, restrict bool) *AnalyzeImageTool {
return &AnalyzeImageTool{ return &AnalyzeImageTool{
workspace: opts.Workspace, workspace: workspace,
restrict: opts.Restrict, restrict: restrict,
apiKey: opts.ApiKey, apiKey: opts.ApiKey,
apiURL: opts.ApiURL, apiURL: opts.ApiURL,
model: opts.Model, model: opts.Model,