fix: read prompt and tools from the transcript
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:
2026-09-29 10:18:44 +08:00
parent d0d69617da
commit 9821439603
6 changed files with 945 additions and 1288 deletions
+803 -1246
View File
File diff suppressed because it is too large Load Diff