From cc6fc56b3b4eec20022e240d3b1a9ea6e4b766e0 Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 1 Oct 2026 07:01:57 +0800 Subject: [PATCH] =?UTF-8?q?cli:=20magpie=20plugin=20list=20says=20a=20buil?= =?UTF-8?q?t-in=20runs=20the=20plugin's=20provider=20rather=20than=20"not?= =?UTF-8?q?=20signed=20in"=20(=E8=A6=81=E4=BF=9D=E8=AF=81=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E8=AE=A2=E9=98=85=20provider=20=E8=B7=9F=E5=86=85?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E8=AE=A2=E9=98=85=20provider=E6=89=80?= =?UTF-8?q?=E6=9C=89=E9=80=BB=E8=BE=91=E9=83=BD=E8=A6=81=E4=B8=80=E6=A8=A1?= =?UTF-8?q?=E4=B8=80=E6=A0=B7)=20=E2=80=94=20after=20a=20move=20back=20the?= =?UTF-8?q?=20plugin=20stays=20when=20the=20user=20had=20installed=20it,?= =?UTF-8?q?=20and=20its=20rows=20read=20"not=20signed=20in=20=C2=B7=20magp?= =?UTF-8?q?ie=20plugin=20login=20kiro",=20as=20if=20broken;=20they=20now?= =?UTF-8?q?=20say=20"runs=20on=20magpie's=20built-in=20(2=20accounts)=20?= =?UTF-8?q?=C2=B7=20magpie=20plugin=20move=20kiro".=20go=20build=20-tags?= =?UTF-8?q?=20nogui=20passes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins_cli.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins_cli.go b/plugins_cli.go index 4687e9d1..83eb0623 100644 --- a/plugins_cli.go +++ b/plugins_cli.go @@ -163,6 +163,12 @@ func listPlugins(ctx context.Context, asJSON bool) error { fmt.Println(string(b)) return nil } + // a built-in with accounts the plugin could run: not signed in to the + // plugin is its normal state, not something to fix + onBuiltin := map[string]provider.MoveCandidate{} + for _, c := range provider.MoveCandidates() { + onBuiltin[c.ID] = c + } for _, e := range l.Plugins { state := green.Render("on") switch { @@ -177,6 +183,9 @@ func listPlugins(ctx context.Context, asJSON bool) error { continue } who := muted.Render("not signed in · magpie plugin login " + p.ID) + if c, ok := onBuiltin[p.ID]; ok && !p.SignedIn { + who = muted.Render(fmt.Sprintf("runs on magpie's built-in (%d accounts) · magpie plugin move %s", c.Accounts, p.ID)) + } if p.SignedIn { who = green.Render("signed in") if p.AccountID != "" {