Claude prompt: only prepend on first turn
This commit is contained in:
1 parent
8d995a8529
commit
9e6ad97cfb
2 files changed
+26
-1
No files matched your search
@@ -179,7 +179,9 @@ export async function runCommandReply(
|
||||
let finalArgv = argv;
|
||||
const isClaudeInvocation =
|
||||
finalArgv.length > 0 && path.basename(finalArgv[0]) === CLAUDE_BIN;
|
||||
if (isClaudeInvocation && finalArgv.length > 0) {
|
||||
const shouldPrependIdentity =
|
||||
isClaudeInvocation && !(sendSystemOnce && systemSent);
|
||||
if (shouldPrependIdentity && finalArgv.length > 0) {
|
||||
const bodyIdx = finalArgv.length - 1;
|
||||
const existingBody = finalArgv[bodyIdx] ?? "";
|
||||
finalArgv = [
|
||||
|
||||
Reference in new issue
Block a user