fix(config): disable tool feedback by default (#2026)
Co-authored-by: Alix-007 <267018309+Alix-007@users.noreply.github.com>
This commit is contained in:
parent
9503f38ace
commit
5c210e6f15
3 changed files with 29 additions and 2 deletions
|
|
@ -487,6 +487,33 @@ func TestDefaultConfig_WebPreferNativeEnabled(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDefaultConfig_ToolFeedbackDisabled(t *testing.T) {
|
||||||
|
cfg := DefaultConfig()
|
||||||
|
if cfg.Agents.Defaults.ToolFeedback.Enabled {
|
||||||
|
t.Fatal("DefaultConfig().Agents.Defaults.ToolFeedback.Enabled should be false")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestLoadConfig_ToolFeedbackDefaultsFalseWhenUnset(t *testing.T) {
|
||||||
|
dir := t.TempDir()
|
||||||
|
configPath := filepath.Join(dir, "config.json")
|
||||||
|
if err := os.WriteFile(
|
||||||
|
configPath,
|
||||||
|
[]byte(`{"version":1,"agents":{"defaults":{"workspace":"./workspace"}}}`),
|
||||||
|
0o600,
|
||||||
|
); err != nil {
|
||||||
|
t.Fatalf("WriteFile() error: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg, err := LoadConfig(configPath)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("LoadConfig() error: %v", err)
|
||||||
|
}
|
||||||
|
if cfg.Agents.Defaults.ToolFeedback.Enabled {
|
||||||
|
t.Fatal("agents.defaults.tool_feedback.enabled should remain false when unset in config file")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestLoadConfig_WebPreferNativeDefaultsTrueWhenUnset(t *testing.T) {
|
func TestLoadConfig_WebPreferNativeDefaultsTrueWhenUnset(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
configPath := filepath.Join(dir, "config.json")
|
configPath := filepath.Join(dir, "config.json")
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ func DefaultConfig() *Config {
|
||||||
SummarizeTokenPercent: 75,
|
SummarizeTokenPercent: 75,
|
||||||
SteeringMode: "one-at-a-time",
|
SteeringMode: "one-at-a-time",
|
||||||
ToolFeedback: ToolFeedbackConfig{
|
ToolFeedback: ToolFeedbackConfig{
|
||||||
Enabled: true,
|
Enabled: false,
|
||||||
MaxArgsLength: 300,
|
MaxArgsLength: 300,
|
||||||
},
|
},
|
||||||
SplitOnMarker: false,
|
SplitOnMarker: false,
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ export const EMPTY_FORM: CoreConfigForm = {
|
||||||
workspace: "",
|
workspace: "",
|
||||||
restrictToWorkspace: true,
|
restrictToWorkspace: true,
|
||||||
splitOnMarker: false,
|
splitOnMarker: false,
|
||||||
toolFeedbackEnabled: true,
|
toolFeedbackEnabled: false,
|
||||||
toolFeedbackMaxArgsLength: "300",
|
toolFeedbackMaxArgsLength: "300",
|
||||||
execEnabled: true,
|
execEnabled: true,
|
||||||
allowRemote: true,
|
allowRemote: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue