mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix(vscode-ide-companion/cli): improve Windows compatibility for shell commands
fix(vscode-ide-companion/session): improve timeout configuration for different methods
This commit is contained in:
@@ -186,7 +186,7 @@ export class CliDetector {
|
||||
|
||||
const { stdout } = await execAsync(detectionCommand, {
|
||||
timeout: 5000,
|
||||
shell: '/bin/bash',
|
||||
shell: isWindows ? undefined : '/bin/bash',
|
||||
});
|
||||
// The output may contain multiple lines, with NVM activation messages
|
||||
// We want the last line which should be the actual path
|
||||
@@ -216,7 +216,7 @@ export class CliDetector {
|
||||
|
||||
const { stdout: versionOutput } = await execAsync(versionCommand, {
|
||||
timeout: 5000,
|
||||
shell: '/bin/bash',
|
||||
shell: isWindows ? undefined : '/bin/bash',
|
||||
});
|
||||
// The output may contain multiple lines, with NVM activation messages
|
||||
// We want the last line which should be the actual version
|
||||
|
||||
@@ -124,7 +124,7 @@ export class CliInstaller {
|
||||
installCommand,
|
||||
{
|
||||
timeout: 120000,
|
||||
shell: '/bin/bash',
|
||||
shell: process.platform === 'win32' ? undefined : '/bin/bash',
|
||||
}, // 2 minutes timeout
|
||||
);
|
||||
|
||||
|
||||
@@ -54,8 +54,14 @@ export class AcpSessionManager {
|
||||
};
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const timeoutDuration =
|
||||
method === AGENT_METHODS.session_prompt ? 120000 : 60000;
|
||||
// different timeout durations based on methods
|
||||
let timeoutDuration = 60000; // default 60 seconds
|
||||
if (
|
||||
method === AGENT_METHODS.session_prompt ||
|
||||
method === AGENT_METHODS.initialize
|
||||
) {
|
||||
timeoutDuration = 120000; // 2min for session_prompt and initialize
|
||||
}
|
||||
|
||||
const timeoutId = setTimeout(() => {
|
||||
pendingRequests.delete(id);
|
||||
|
||||
Reference in New Issue
Block a user