fix(vscode-ide-companion): slight delay to ensure auth state settlement

This commit is contained in:
yiliang114 2025-12-12 01:14:28 +08:00
parent c20df192a8
commit 25261ab88d
5 changed files with 93 additions and 175 deletions

View file

@ -1222,6 +1222,7 @@ export class QwenAgentManager {
if (effectiveAuth) {
await effectiveAuth.saveAuthState(workingDir, authMethod);
}
await setTimeout(() => Promise.resolve(), 100); // slight delay to ensure auth state is settled
await this.connection.newSession(workingDir);
} catch (reauthErr) {
// Clear potentially stale cache on failure and rethrow