mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 21:20:44 +00:00
fix(cli): skip stdin read for ACP mode
- Extend stdin handling to skip reading for ACP mode, similar to stream-json - Remove duplicate line in .dockerignore ACP mode passes protocol data via stdin that should be forwarded to the sandbox intact, not consumed as a user prompt. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
a806c8aaf6
commit
cceac6093e
2 changed files with 5 additions and 4 deletions
|
|
@ -6,7 +6,6 @@ node_modules
|
||||||
dist
|
dist
|
||||||
**/dist
|
**/dist
|
||||||
**/tsconfig.tsbuildinfo
|
**/tsconfig.tsbuildinfo
|
||||||
**/tsconfig.tsbuildinfo
|
|
||||||
|
|
||||||
# Version control
|
# Version control
|
||||||
.git
|
.git
|
||||||
|
|
|
||||||
|
|
@ -282,11 +282,13 @@ export async function main() {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// For stream-json mode, don't read stdin here - it should be forwarded to the sandbox
|
// For stream-json and ACP modes, don't read stdin here — stdin carries
|
||||||
// and consumed by StreamJsonInputReader inside the container
|
// protocol data (not a user prompt) and should be forwarded to the sandbox
|
||||||
|
// intact via stdio: 'inherit'.
|
||||||
const inputFormat = argv.inputFormat as string | undefined;
|
const inputFormat = argv.inputFormat as string | undefined;
|
||||||
|
const isAcpMode = argv.acp || argv.experimentalAcp;
|
||||||
let stdinData = '';
|
let stdinData = '';
|
||||||
if (!process.stdin.isTTY && inputFormat !== 'stream-json') {
|
if (!process.stdin.isTTY && inputFormat !== 'stream-json' && !isAcpMode) {
|
||||||
stdinData = await readStdin();
|
stdinData = await readStdin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue