From 86b70baf29fa5b145e72d50e6930d915187e22cc Mon Sep 17 00:00:00 2001 From: CangShui Date: Fri, 4 Sep 2026 08:48:21 +0800 Subject: [PATCH] feat: print loaded credential file list at end of startup banner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - After the per-account status block, print a summary line listing all loaded credential files (e.g. '已加载凭据文件 (2): workbuddy.json, workbuddy2.json') so the count is visible even when journalctl/ systemctl truncates the earlier log lines --- main.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 95d8433..f4dc7ab 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,7 @@ import ( ) const ( - version = "1.4.1" + version = "1.4.2" upstreamBase = "https://copilot.tencent.com" clientUA = "CLI/2.143.1 CodeBuddy/2.143.1" originReferer = "https://www.codebuddy.cn" @@ -1045,6 +1045,16 @@ func runServe() { } fmt.Println(" ----------------------------------------------------------") } + // 末尾汇总:加载到的凭据文件清单(即使上方日志被截断也能确认) + fileList := make([]string, 0, len(accounts)) + for _, acc := range accounts { + fileList = append(fileList, acc.Path) + } + if len(fileList) > 0 { + fmt.Printf(" ✅ 已加载凭据文件 (%d): %s\n", len(fileList), strings.Join(fileList, ", ")) + } else { + fmt.Println(" ⚠️ 未加载到任何凭据文件,请先执行 login 命令扫码登录") + } accountMu.Unlock() fmt.Println("================================================================")