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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-open-agents",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Unified agent and subagent management for pi coding agent, with OpenCode-compatible agent definitions.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -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) return;
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 but keep context files
155
- // In inline mode, we can only append — full replace requires
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