chore(vscode-ide-companion): change comments and delays

This commit is contained in:
yiliang114
2025-12-12 01:17:38 +08:00
parent 25261ab88d
commit 02234f5434
3 changed files with 4 additions and 4 deletions

View File

@@ -43,8 +43,8 @@ export class AuthStateManager {
/**
* Run an auth-related flow with optional queueing.
* - 默认:复用在跑的 promise避免重复弹窗。
* - forceNew: true 时,等待当前 flow 结束后再串行启动新的,用于强制重登。
* - Default: Reuse existing promise to avoid duplicate popups.
* - When forceNew: true, wait for current flow to finish before starting a new one serially, used for forced re-login.
*/
static runExclusiveAuth<T>(
task: () => Promise<T>,

View File

@@ -1222,7 +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 setTimeout(() => Promise.resolve(), 300); // slight delay to ensure auth state is settled
await this.connection.newSession(workingDir);
} catch (reauthErr) {
// Clear potentially stale cache on failure and rethrow

View File

@@ -140,7 +140,7 @@ export class QwenConnectionHandler {
}
try {
await setTimeout(() => Promise.resolve(), 100); // slight delay to ensure auth state is settled
await setTimeout(() => Promise.resolve(), 300); // slight delay to ensure auth state is settled
console.log(
'[QwenAgentManager] Creating new session after authentication...',
);