fix: read prompt and tools from the transcript
CI / Lint, typecheck & build (push) Failing after 32s
CI / Lint, typecheck & build (push) Failing after 32s
pi 0.87 made the session transcript canonical for provider context: the
context handed to a custom provider's stream no longer carries
`systemPrompt` and `tools`; they live on the leading system message
(`sections` + `toolsAdded`). streamQoder still read the removed fields,
so every request went out with `system: ""` and `tools: []` - the model
saw no prompt and no tools and answered that it cannot access files.
- resolve the prompt with getCurrentSystemPrompt(messages) and the tool
list with getCurrentTools(messages)
- give tool parameters a root `type: "object"`: Qoder's upstream rejects
a union root ("schema must be a JSON Schema of 'type: \"object\"', got
'type: null'"), e.g. the agent-browser Electron tool, which failed the
whole request with a 400
- bump the pi-ai / pi-coding-agent devDependencies to ^0.87.1 and cover
the transcript prompt/tools path with a regression test
This commit is contained in:
Generated
+803
-1246
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user