pi-codebuddy-sdk 0.1.7 → 0.1.8

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/context.ts +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-codebuddy-sdk",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "CodeBuddy Agent SDK provider for Pi — native tool execution, 29+ models, thinking controls, session pool",
5
5
  "author": "slahser",
6
6
  "license": "MIT",
package/src/context.ts CHANGED
@@ -84,6 +84,11 @@ function buildHistoryPrefix(context: Context, startIndex: number): string {
84
84
  const msg = messages[i];
85
85
  if (i === messages.length - 1 && msg.role === "user") continue;
86
86
 
87
+ // Skip assistant messages on first turn — they're from the previous
88
+ // provider and contain provider-specific instructions (MCP tools,
89
+ // context-mode, boot protocol) that confuse CodeBuddy models.
90
+ if (msg.role === "assistant" && startIndex === 0) continue;
91
+
87
92
  if (msg.role === "user") {
88
93
  const text = extractTextContent(msg.content);
89
94
  const hasImages = extractImages(msg).length > 0;