Skip to content

Commit fc1ccba

Browse files
committed
use current version of go-yacl
1 parent 7db70e1 commit fc1ccba

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

config/config_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"github.com/rainu/ask-mai/config/model/llm/mcp"
77
"github.com/rainu/go-yacl"
88
"github.com/stretchr/testify/assert"
9-
"github.com/stretchr/testify/require"
109
"testing"
1110
"time"
1211
)
@@ -190,21 +189,21 @@ func TestConfig_Parse(t *testing.T) {
190189
},
191190
{
192191
name: "Set UI file dialog filter pattern",
193-
args: []string{"--ui.file-dialog.filter-pattern=\"*.jpg;*.png\""},
192+
args: []string{"--ui.file-dialog.filter-pattern=*.jpg;*.png"},
194193
expected: modifiedConfig(func(c *model.Config) {
195194
c.MainProfile.UI.FileDialog.FilterPattern = []string{"*.jpg;*.png"}
196195
}),
197196
},
198197
{
199198
name: "Set UI file dialog filter display",
200-
args: []string{"--ui.file-dialog.filter-display=\"Images (*.jpg, *.png)\"", "--ui.file-dialog.filter-display=\"Documents (*.doc, *.docx)\""},
199+
args: []string{"--ui.file-dialog.filter-display=Images (*.jpg, *.png)", "--ui.file-dialog.filter-display=Documents (*.doc, *.docx)"},
201200
expected: modifiedConfig(func(c *model.Config) {
202201
c.MainProfile.UI.FileDialog.FilterDisplay = []string{"Images (*.jpg, *.png)", "Documents (*.doc, *.docx)"}
203202
}),
204203
},
205204
{
206205
name: "Set UI file dialog filter pattern",
207-
args: []string{"--ui.file-dialog.filter-pattern=\"*.jpg;*.png\"", "--ui.file-dialog.filter-pattern=\"*.doc;*.docx\""},
206+
args: []string{"--ui.file-dialog.filter-pattern=*.jpg;*.png", "--ui.file-dialog.filter-pattern=*.doc;*.docx"},
208207
expected: modifiedConfig(func(c *model.Config) {
209208
c.MainProfile.UI.FileDialog.FilterPattern = []string{"*.jpg;*.png", "*.doc;*.docx"}
210209
}),
@@ -554,7 +553,7 @@ func TestConfig_Parse(t *testing.T) {
554553
},
555554
{
556555
name: "Set environment variable for UI file dialog filter pattern",
557-
env: []string{EnvironmentPrefix + "=--ui.file-dialog.filter-pattern=\"*.jpg;*.png\""},
556+
env: []string{EnvironmentPrefix + "=--ui.file-dialog.filter-pattern=*.jpg;*.png"},
558557
expected: modifiedConfig(func(c *model.Config) {
559558
c.MainProfile.UI.FileDialog.FilterPattern = []string{"*.jpg;*.png"}
560559
}),

config/help.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ func generateYamlSkeleton(output io.Writer) {
103103
model.Profile `yaml:",inline"`
104104
model.DebugConfig `yaml:",inline"`
105105

106-
Profiles map[string]*model.Profile `yaml:"profile"`
106+
ActiveProfile string `yaml:"active-profile,omitempty" short:"P" usage:"The active profile name"`
107+
Profiles map[string]*model.Profile `yaml:"profiles"`
107108
}{}
108109
yacl.NewConfig(skeleton).ApplyDefaults()
109110

@@ -115,7 +116,8 @@ func dumpYaml(output io.Writer, c *model.Config) {
115116
model.Profile `yaml:",inline"`
116117
model.DebugConfig `yaml:",inline"`
117118

118-
Profiles map[string]*model.Profile `yaml:"profile"`
119+
ActiveProfile string `yaml:"active-profile,omitempty" short:"P" usage:"The active profile name"`
120+
Profiles map[string]*model.Profile `yaml:"profiles"`
119121
}{}
120122
skeleton.Profile = c.MainProfile
121123
skeleton.DebugConfig = c.DebugConfig

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/metoro-io/mcp-golang v0.11.0
1414
github.com/olekukonko/tablewriter v0.0.5
1515
github.com/rainu/go-command-chain v0.4.0
16-
github.com/rainu/go-yacl v0.2.0
16+
github.com/rainu/go-yacl v0.2.1
1717
github.com/shirou/gopsutil/v4 v4.25.2
1818
github.com/stretchr/testify v1.10.0
1919
github.com/tmc/langchaingo v0.1.13

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF
138138
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
139139
github.com/rainu/go-command-chain v0.4.0 h1:qgrNbNsqkTfJHdwGzVuGPPK+p+XSnGAhAT/8x1A8SLE=
140140
github.com/rainu/go-command-chain v0.4.0/go.mod h1:RvLsDKnTGD9XoUY7nmBz73ayffI0bFCDH/EVJPRgfks=
141-
github.com/rainu/go-yacl v0.2.0 h1:C/zhF4bn8QObVRi7JRCs6Qs0M9LX6HiX0741Yk60mr0=
142-
github.com/rainu/go-yacl v0.2.0/go.mod h1:cZwUkCDYE1w6xlTUi6vCqdV1O3iLvM/govQdUn6I9NU=
141+
github.com/rainu/go-yacl v0.2.1 h1:BZdwonr/JA8RiE/8xptE9RKT0+COwyfTmyB7kiANGPw=
142+
github.com/rainu/go-yacl v0.2.1/go.mod h1:cZwUkCDYE1w6xlTUi6vCqdV1O3iLvM/govQdUn6I9NU=
143143
github.com/rainu/langchaingo v0.0.0-20250326142153-c860a5d21c81 h1:aKF/Uin8Wm/WgZVrUev42dU5gX36/OewN2errPZbO50=
144144
github.com/rainu/langchaingo v0.0.0-20250326142153-c860a5d21c81/go.mod h1:P6W595/jWuzP+isArIuFO7stnYQq6HLmSm84/epr/jY=
145145
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=

0 commit comments

Comments
 (0)