mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
chore(vscode-ide-companion): change comments and delays
This commit is contained in:
@@ -43,8 +43,8 @@ export class AuthStateManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Run an auth-related flow with optional queueing.
|
* Run an auth-related flow with optional queueing.
|
||||||
* - 默认:复用在跑的 promise,避免重复弹窗。
|
* - Default: Reuse existing promise to avoid duplicate popups.
|
||||||
* - forceNew: true 时,等待当前 flow 结束后再串行启动新的,用于强制重登。
|
* - When forceNew: true, wait for current flow to finish before starting a new one serially, used for forced re-login.
|
||||||
*/
|
*/
|
||||||
static runExclusiveAuth<T>(
|
static runExclusiveAuth<T>(
|
||||||
task: () => Promise<T>,
|
task: () => Promise<T>,
|
||||||
|
|||||||
@@ -1222,7 +1222,7 @@ export class QwenAgentManager {
|
|||||||
if (effectiveAuth) {
|
if (effectiveAuth) {
|
||||||
await effectiveAuth.saveAuthState(workingDir, authMethod);
|
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);
|
await this.connection.newSession(workingDir);
|
||||||
} catch (reauthErr) {
|
} catch (reauthErr) {
|
||||||
// Clear potentially stale cache on failure and rethrow
|
// Clear potentially stale cache on failure and rethrow
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export class QwenConnectionHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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(
|
console.log(
|
||||||
'[QwenAgentManager] Creating new session after authentication...',
|
'[QwenAgentManager] Creating new session after authentication...',
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user