diff --git a/internal/agent/cline.go b/internal/agent/cline.go index 043f482e..b694d06b 100644 --- a/internal/agent/cline.go +++ b/internal/agent/cline.go @@ -42,6 +42,7 @@ import ( "encoding/json" "os" "path/filepath" + "runtime" "strings" "time" @@ -175,6 +176,10 @@ func cline(home string) *Agent { return syncJSON(models, "providers."+clineSlot, func() any { return clineModels(get(slot + ".settings.model")) }) }, Notice: func() string { + if runtime.GOOS == "windows" { + // Running can't tell the desktop app from the CLI there + return "Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension; Cline's desktop app keeps the model picked in its own composer — pick magpie's there." + } if Running(`Cline\.app/`, `(^|/)cline-app( |$)`) { return "Cline's desktop app keeps the model and effort picked in its own composer — pick magpie's there; this sets Cline's CLI and VS Code extension." } diff --git a/internal/agent/windows_running_test.go b/internal/agent/windows_running_test.go index 5e682788..408d6ace 100644 --- a/internal/agent/windows_running_test.go +++ b/internal/agent/windows_running_test.go @@ -70,3 +70,16 @@ func TestDshAndCodexAdviceOnWindows(t *testing.T) { t.Fatalf("Codex says nothing about restarting: %q", n) } } + +// Cline's desktop app and its CLI can't be told apart on Windows, where +// Running says yes to both: its advice names both, not the desktop app's +// alone, so one who uses the VS Code extension is still told to reload it. +func TestDshClineAdviceOnWindows(t *testing.T) { + if runtime.GOOS != "windows" { + t.Skip("the Windows answer is only given there") + } + n := cline(t.TempDir()).Notice() + if !strings.Contains(n, "Reload VS Code") || !strings.Contains(n, "desktop app") { + t.Fatalf("Cline's advice on Windows leaves one out: %q", n) + } +}