From 3fad3d21eb8c0e8df49c43aa8758c856cf3f406d Mon Sep 17 00:00:00 2001 From: yetone Date: Mon, 5 Oct 2026 20:02:08 +0800 Subject: [PATCH] =?UTF-8?q?agent:=20Cline's=20advice=20on=20Windows=20name?= =?UTF-8?q?s=20both=20the=20desktop=20app=20and=20the=20CLI/VS=20Code=20ex?= =?UTF-8?q?tension=20(#898=20follow-up)=20=E2=80=94=20since=20#898=20Runni?= =?UTF-8?q?ng=20answers=20yes=20on=20Windows,=20where=20it=20can't=20ask,?= =?UTF-8?q?=20so=20Cline's=20first=20branch=20(its=20desktop=20app)=20alwa?= =?UTF-8?q?ys=20won=20there=20and=20one=20using=20the=20VS=20Code=20extens?= =?UTF-8?q?ion=20was=20never=20told=20to=20reload=20its=20window.=20On=20W?= =?UTF-8?q?indows=20the=20advice=20now=20says=20both.=20TestDshClineAdvice?= =?UTF-8?q?OnWindows=20(run=20by=20the=20Windows=20CI=20job)=20checks=20it?= =?UTF-8?q?;=20go=20vet=20(darwin,=20GOOS=3Dwindows)=20and=20go=20test=20.?= =?UTF-8?q?/internal/agent=20under=20a=20temp=20HOME=20pass.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/agent/cline.go | 5 +++++ internal/agent/windows_running_test.go | 13 +++++++++++++ 2 files changed, 18 insertions(+) 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) + } +}