mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
feat: enhance session ID handling and error propagation
This commit is contained in:
parent
51760fe3a6
commit
82dc79629c
6 changed files with 168 additions and 9 deletions
|
|
@ -932,6 +932,14 @@ export async function loadCliConfig(
|
|||
}
|
||||
} else if (argv['session-id']) {
|
||||
// Use provided session ID without session resumption
|
||||
// Check if session ID is already in use
|
||||
const sessionService = new SessionService(cwd);
|
||||
const exists = await sessionService.sessionExists(argv['session-id']);
|
||||
if (exists) {
|
||||
const message = `Error: Session Id ${argv['session-id']} is already in use.`;
|
||||
writeStderrLine(message);
|
||||
process.exit(1);
|
||||
}
|
||||
sessionId = argv['session-id'];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue