promptText
promptText(
prompt):string
Defined in: packages/agent/src/modules/acp/acpCommon.ts:289
The prompt as the text handed to the model: the user’s own words, then — when the client attached anything else — ONE fenced section describing what arrived.
The user’s text blocks stay unfenced and everything else is fenced. That split is the whole
design: the text IS the user’s instruction and always was, while a resource link’s metadata comes
from the editor, the filesystem or an MCP server, and a block’s type is whatever the client put
on the wire. Interpolating those into the same prose would put attacker-influenceable bytes in
the model’s context with no marker of provenance and a structural marker they could forge — the
thing acpPermissions.ts says this surface must not do.
The framing line and the closing reassertion are first-party and sit OUTSIDE the fence, so the
last thing the model reads about the attachments is this agent’s own authority rather than the
client’s text. That is the same shape appendMcpServerInstructionsNote uses, deliberately: a
second shape for the same problem is how one of them ends up missing an arm.
Parameters
Section titled “Parameters”prompt
Section titled “prompt”readonly AcpContentBlockLike[]
Returns
Section titled “Returns”string