mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(cli): harden ACP/Codex event handling (#211)
Co-authored-by: Lihengwannafly <Lihengwannafly@users.noreply.github.com>
This commit is contained in:
co-authored by
Lihengwannafly
parent
77cfa715f9
commit
10f7e1404e
@@ -88,13 +88,20 @@ export function buildThreadStartParams(args: {
|
||||
|
||||
const config = buildMcpServerConfig(args.mcpServers);
|
||||
const baseInstructions = args.baseInstructions ?? codexSystemPrompt;
|
||||
const resolvedDeveloperInstructions = args.developerInstructions
|
||||
? `${baseInstructions}\n\n${args.developerInstructions}`
|
||||
: baseInstructions;
|
||||
const configWithInstructions = {
|
||||
...config,
|
||||
developer_instructions: resolvedDeveloperInstructions
|
||||
};
|
||||
|
||||
const params: ThreadStartParams = {
|
||||
approvalPolicy: resolvedApprovalPolicy,
|
||||
sandbox: resolvedSandbox,
|
||||
baseInstructions,
|
||||
...(args.developerInstructions ? { developerInstructions: args.developerInstructions } : {}),
|
||||
...(Object.keys(config).length > 0 ? { config } : {})
|
||||
developerInstructions: resolvedDeveloperInstructions,
|
||||
...(Object.keys(configWithInstructions).length > 0 ? { config: configWithInstructions } : {})
|
||||
};
|
||||
|
||||
if (args.mode.model) {
|
||||
|
||||
Reference in New Issue
Block a user