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

@@ -393,7 +393,7 @@ func (w *Watcher) createClientFromFile(path string, cfg *config.Config) (interfa
} else if tokenType == "qwen" {
var ts qwen.QwenTokenStorage
if err = json.Unmarshal(data, &ts); err == nil {
return client.NewQwenClient(cfg, &ts), nil
return client.NewQwenClient(cfg, &ts, path), nil
}
} else if tokenType == "gemini-web" {
var ts gemini.GeminiWebTokenStorage