mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-25 10:42:45 +00:00
Claude Code expands a slash command only when it is the last content block of the user message. buildAgentPrompt orders blocks as chat history, typed text, images, then rendered attachments, so a "/command" sent alongside a pasted issue link or a screenshot reached the model as literal text: the command never ran, and the model either called the Skill tool on its own or answered without it. toSdkUserMessage now moves the typed block to the end when it parses as a slash command. Attachments rendered as text always carry a mimeType, so a quoted "/command" inside chat history is never mistaken for the invocation. Message order is unchanged when the typed text is not a slash command. Co-authored-by: paseo-bot[bot] <paseo-bot[bot]@users.noreply.github.com> Co-authored-by: Joe Corkerton <joecorkerton@users.noreply.github.com>