feat: print loaded credential file list at end of startup banner
- 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
This commit is contained in:
@@ -29,7 +29,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version = "1.4.1"
|
version = "1.4.2"
|
||||||
upstreamBase = "https://copilot.tencent.com"
|
upstreamBase = "https://copilot.tencent.com"
|
||||||
clientUA = "CLI/2.143.1 CodeBuddy/2.143.1"
|
clientUA = "CLI/2.143.1 CodeBuddy/2.143.1"
|
||||||
originReferer = "https://www.codebuddy.cn"
|
originReferer = "https://www.codebuddy.cn"
|
||||||
@@ -1045,6 +1045,16 @@ func runServe() {
|
|||||||
}
|
}
|
||||||
fmt.Println(" ----------------------------------------------------------")
|
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()
|
accountMu.Unlock()
|
||||||
|
|
||||||
fmt.Println("================================================================")
|
fmt.Println("================================================================")
|
||||||
|
|||||||
Reference in New Issue
Block a user