mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 04:30:48 +00:00
fix(core): disable node-pty on older Windows builds with broken ConPTY
ConPTY on Windows builds <= 19041 has known reliability issues including missing output and hangs. VS Code uses the same cutoff. This fixes run_shell_command returning empty output on affected Windows systems by falling back to spawn-based execution instead of node-pty. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
625c50aae7
commit
6383b41975
2 changed files with 13 additions and 1 deletions
|
|
@ -96,6 +96,7 @@ import {
|
|||
// Utils
|
||||
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
||||
import { FileExclusions } from '../utils/ignorePatterns.js';
|
||||
import { shouldDefaultToNodePty } from '../utils/shell-utils.js';
|
||||
import { WorkspaceContext } from '../utils/workspaceContext.js';
|
||||
import { isToolEnabled, type ToolName } from '../utils/tool-utils.js';
|
||||
import { getErrorMessage } from '../utils/errors.js';
|
||||
|
|
@ -636,7 +637,8 @@ export class Config {
|
|||
this.webSearch = params.webSearch;
|
||||
this.useRipgrep = params.useRipgrep ?? true;
|
||||
this.useBuiltinRipgrep = params.useBuiltinRipgrep ?? true;
|
||||
this.shouldUseNodePtyShell = params.shouldUseNodePtyShell ?? true;
|
||||
this.shouldUseNodePtyShell =
|
||||
params.shouldUseNodePtyShell ?? shouldDefaultToNodePty();
|
||||
this.skipNextSpeakerCheck = params.skipNextSpeakerCheck ?? true;
|
||||
this.shellExecutionConfig = {
|
||||
terminalWidth: params.shellExecutionConfig?.terminalWidth ?? 80,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue