pi-agent-flow 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/flow.ts +5 -5
- package/package.json +1 -1
package/flow.ts
CHANGED
|
@@ -110,7 +110,6 @@ function buildFlowArgs(
|
|
|
110
110
|
"json",
|
|
111
111
|
...inheritedCliArgs.extensionArgs,
|
|
112
112
|
...inheritedCliArgs.alwaysProxy,
|
|
113
|
-
"-p",
|
|
114
113
|
];
|
|
115
114
|
|
|
116
115
|
// Fork mode: always use --session
|
|
@@ -140,15 +139,16 @@ function buildFlowArgs(
|
|
|
140
139
|
// Flow instructions go in the intent message instead.
|
|
141
140
|
|
|
142
141
|
const flowDirectives =
|
|
143
|
-
|
|
142
|
+
`<flow-directive>\n` +
|
|
144
143
|
`The conversation history above is background context — use it for reference, but your sole focus is the intent below, and try to execute EXACTLY as requested in the intent.\n` +
|
|
145
|
-
|
|
144
|
+
`</flow-directive>`;
|
|
146
145
|
|
|
147
146
|
const flowInstructions = flow.systemPrompt.trim()
|
|
148
|
-
? `\n\n
|
|
147
|
+
? `\n\n<system-directive>\n${flow.systemPrompt.trim()}\n</system-directive>`
|
|
149
148
|
: "";
|
|
150
149
|
|
|
151
|
-
|
|
150
|
+
// -p must immediately precede the prompt so the CLI parser binds it correctly
|
|
151
|
+
args.push("-p", `${flowDirectives}${flowInstructions}\n\nIntent: ${intent}`);
|
|
152
152
|
return args;
|
|
153
153
|
}
|
|
154
154
|
|