mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 15:31:27 +00:00
feat(channels): add crash recovery and gateway mode support
- Add session persistence to SessionRouter for crash recovery - Add loadSession method to AcpBridge for restoring sessions - Add ChannelBaseOptions to support external router injection - Refactor start.ts to support both standalone and gateway modes - Extract config utilities into separate module This enables channels to recover sessions after bridge crashes and supports running multiple channels under a gateway process. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
f6ae769736
commit
1a605ec973
11 changed files with 567 additions and 161 deletions
|
|
@ -129,6 +129,16 @@ export class AcpBridge extends EventEmitter {
|
|||
return response.sessionId;
|
||||
}
|
||||
|
||||
async loadSession(sessionId: string, cwd: string): Promise<string> {
|
||||
const conn = this.ensureConnection();
|
||||
const response = await conn.loadSession({
|
||||
sessionId,
|
||||
cwd,
|
||||
mcpServers: [],
|
||||
});
|
||||
return response.sessionId;
|
||||
}
|
||||
|
||||
async prompt(
|
||||
sessionId: string,
|
||||
text: string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue