mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-02 13:40:46 +00:00
fix: cli input stream handling and error management, improve e2e and unit tests
This commit is contained in:
parent
6eb16c0bcf
commit
f578ff07a2
13 changed files with 741 additions and 150 deletions
|
|
@ -124,6 +124,11 @@ export abstract class BaseController {
|
|||
timeoutMs: number = DEFAULT_REQUEST_TIMEOUT_MS,
|
||||
signal?: AbortSignal,
|
||||
): Promise<ControlResponse> {
|
||||
// Check if stream is closed
|
||||
if (this.context.inputClosed) {
|
||||
throw new Error('Input closed');
|
||||
}
|
||||
|
||||
// Check if already aborted
|
||||
if (signal?.aborted) {
|
||||
throw new Error('Request aborted');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue