From 430f6578f31d81c58cfd2fd79b547b2fdf79cd70 Mon Sep 17 00:00:00 2001 From: Dmitrii Balabanov Date: Sun, 8 Mar 2026 00:23:18 +0200 Subject: [PATCH] fix(config): wire tasktool defaults in DefaultConfig and fix env tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add TaskTool entry to DefaultConfig() with enabled:true and the four icon defaults (🔘/🟡/🟢/🔴), matching the documented defaults - Replace dead default:"..." struct tags on TaskToolIconsConfig with the correct caarlos0/env v11 format env:"VAR,default=VALUE" so env overrides actually work; previously the bare default: tag was silently ignored --- pkg/config/config.go | 8 ++++---- pkg/config/defaults.go | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index f8bd15e83..96a9a7e9d 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -675,10 +675,10 @@ type TaskToolConfig struct { } type TaskToolIconsConfig struct { - Pending string `json:"pending" env:"PICOCLAW_TOOLS_TASK_TOOL_ICONS_PENDING" default:"🔘"` - InProgress string `json:"in_progress" env:"PICOCLAW_TOOLS_TASK_TOOL_ICONS_IN_PROGRESS" default:"🟡"` - Completed string `json:"completed" env:"PICOCLAW_TOOLS_TASK_TOOL_ICONS_COMPLETED" default:"🟢"` - Failed string `json:"failed" env:"PICOCLAW_TOOLS_TASK_TOOL_ICONS_FAILED" default:"🔴"` + Pending string `json:"pending" env:"PICOCLAW_TOOLS_TASK_TOOL_ICONS_PENDING,default=🔘"` + InProgress string `json:"in_progress" env:"PICOCLAW_TOOLS_TASK_TOOL_ICONS_IN_PROGRESS,default=🟡"` + Completed string `json:"completed" env:"PICOCLAW_TOOLS_TASK_TOOL_ICONS_COMPLETED,default=🟢"` + Failed string `json:"failed" env:"PICOCLAW_TOOLS_TASK_TOOL_ICONS_FAILED,default=🔴"` } type SearchCacheConfig struct { diff --git a/pkg/config/defaults.go b/pkg/config/defaults.go index 1902480c5..54909a98c 100644 --- a/pkg/config/defaults.go +++ b/pkg/config/defaults.go @@ -452,6 +452,17 @@ func DefaultConfig() *Config { WriteFile: ToolConfig{ Enabled: true, }, + TaskTool: TaskToolConfig{ + ToolConfig: ToolConfig{ + Enabled: true, + }, + Icons: TaskToolIconsConfig{ + Pending: "🔘", + InProgress: "🟡", + Completed: "🟢", + Failed: "🔴", + }, + }, }, Heartbeat: HeartbeatConfig{ Enabled: true,