removed duplicated parameters

This commit is contained in:
afjcjsbx 2026-02-20 00:41:16 +01:00
parent 64a52580fe
commit 2c16eaa0e2
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
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

View file

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