mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-20 14:15:12 +00:00
fix(serve): keep daemon Git guard out of serve fast-path closure
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
2af741937b
commit
b1b7606052
1 changed files with 5 additions and 1 deletions
|
|
@ -135,7 +135,6 @@ import type {
|
|||
ChannelDeliveryHostResult,
|
||||
ExternalToolGuardHandler,
|
||||
} from '@qwen-code/acp-bridge/bridgeOptions';
|
||||
import { createDaemonToolGuard } from './daemon-git-worktree-guard.js';
|
||||
import { getCliVersion } from '../utils/version.js';
|
||||
import { getRateLimiter } from './rate-limit.js';
|
||||
import type { AcpHttpHandle } from './acp-http/index.js';
|
||||
|
|
@ -2800,6 +2799,11 @@ async function runQwenServeImpl(
|
|||
'qwen serve: required external tool guard handshake succeeded.',
|
||||
);
|
||||
}
|
||||
// Dynamic-imported (not at module scope) so the guard's core helper
|
||||
// imports stay out of the serve fast-path bundle closure.
|
||||
const { createDaemonToolGuard } = await import(
|
||||
'./daemon-git-worktree-guard.js'
|
||||
);
|
||||
const daemonToolGuardHandler = createDaemonToolGuard(
|
||||
externalToolGuardHandler,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue