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.
- package/package.json +1 -1
- package/src/context.ts +5 -0
package/package.json
CHANGED
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;
|