fix: read prompt and tools from the normalized transcript
pi 0.86.0 hands custom providers a TranscriptContext: `systemPrompt` and `tools` are gone, and tool declarations live in the transcript's system messages. Reading `context.tools` therefore sent zero tools to Devin, so every Devin model answered that it cannot run commands, and the system prompt was dropped with it. Collapse the system messages first, then take the prompt and the current tool set from the replayed transcript. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
e4d4ec3aae
commit
8cf221e13f
+2
-2
@@ -4,9 +4,9 @@ import {
|
||||
type Api,
|
||||
type AssistantMessage,
|
||||
type AssistantMessageEventStream,
|
||||
type Context,
|
||||
type Model,
|
||||
type SimpleStreamOptions,
|
||||
type TranscriptContext,
|
||||
calculateCost,
|
||||
createAssistantMessageEventStream,
|
||||
} from "@earendil-works/pi-ai";
|
||||
@@ -402,7 +402,7 @@ async function* streamChatEvents(args: {
|
||||
|
||||
export function streamDevin(
|
||||
model: Model<Api>,
|
||||
context: Context,
|
||||
context: TranscriptContext,
|
||||
options?: SimpleStreamOptions,
|
||||
): AssistantMessageEventStream {
|
||||
const stream = createAssistantMessageEventStream();
|
||||
|
||||
Reference in New Issue
Block a user