refactor(client): Improve auth file handling and client lifecycle

This commit is contained in:
hkfires
2025-09-19 08:04:53 +08:00
parent 6bd37b2a2b
commit 39518ec633
4 changed files with 32 additions and 27 deletions

View File

@@ -139,7 +139,7 @@ func StartService(cfg *config.Config, configPath string) {
if err = json.Unmarshal(data, &ts); err == nil {
// For each valid Qwen token, create an authenticated client.
log.Info("Initializing qwen authentication for token...")
qwenClient := client.NewQwenClient(cfg, &ts)
qwenClient := client.NewQwenClient(cfg, &ts, path)
log.Info("Authentication successful.")
cliClients[path] = qwenClient
successfulAuthCount++