pi-open-agents 0.1.1 → 0.1.2
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/package.json +1 -1
- package/src/primary/executor.ts +10 -6
package/package.json
CHANGED
package/src/primary/executor.ts
CHANGED
|
@@ -38,7 +38,14 @@ async function applyModel(agent: AgentDefinition, pi: ExtensionAPI, ctx: Extensi
|
|
|
38
38
|
if (!ref) return;
|
|
39
39
|
|
|
40
40
|
const model = ctx.modelRegistry.find(ref.provider, ref.modelId);
|
|
41
|
-
if (!model)
|
|
41
|
+
if (!model) {
|
|
42
|
+
const available = ctx.modelRegistry.getAvailable().map((m: Model<any>) => `${m.provider}/${m.id}`).join(", ");
|
|
43
|
+
ctx.ui.notify(
|
|
44
|
+
`Agent "${agent.name}": Model ${ref.provider}/${ref.modelId} not found in registry. Available: ${available}`,
|
|
45
|
+
"warning",
|
|
46
|
+
);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
42
49
|
|
|
43
50
|
const success = await pi.setModel(model);
|
|
44
51
|
if (!success) {
|
|
@@ -151,11 +158,8 @@ export function buildSystemPrompt(
|
|
|
151
158
|
return `${agent.prompt}\n\n${currentPrompt}`;
|
|
152
159
|
|
|
153
160
|
case "replace":
|
|
154
|
-
// Replace the provider prompt
|
|
155
|
-
|
|
156
|
-
// the subprocess executor (subagent path)
|
|
157
|
-
// For primary agents, "replace" behaves like append for now
|
|
158
|
-
return `${agent.prompt}\n\n${currentPrompt}`;
|
|
161
|
+
// Replace the provider/system prompt entirely with the agent body
|
|
162
|
+
return agent.prompt;
|
|
159
163
|
|
|
160
164
|
case "replace-all":
|
|
161
165
|
// Full replacement — only agent body
|