feat: update code

This commit is contained in:
pomelo-nwu
2025-07-28 16:51:49 +08:00
parent beb5b7ff57
commit 8f46ee78b5

View File

@@ -91,8 +91,6 @@ export function getCoreSystemPrompt(
}); });
if (matchedMapping?.template) { if (matchedMapping?.template) {
const sandbox =
process.env.SANDBOX === 'sandbox-exec' ? 'sandbox-exec' : '';
const isGitRepo = isGitRepository(process.cwd()); const isGitRepo = isGitRepository(process.cwd());
// Replace placeholders in template // Replace placeholders in template
@@ -101,7 +99,10 @@ export function getCoreSystemPrompt(
'{RUNTIME_VARS_IS_GIT_REPO}', '{RUNTIME_VARS_IS_GIT_REPO}',
String(isGitRepo), String(isGitRepo),
); );
template = template.replace('{RUNTIME_VARS_SANDBOX}', sandbox); template = template.replace(
'{RUNTIME_VARS_SANDBOX}',
process.env.SANDBOX || '',
);
return template; return template;
} }