feat: add interactive file path cards in chat UI

Render filepath code blocks as rich, clickable cards with three variants:
knowledge files (navigate to editor), audio files (inline play/pause),
and system files (open externally). Adds shell:openPath and
shell:readFileBase64 IPC channels, FileCardProvider context, and
Streamdown pre override.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Arjun 2026-02-07 12:53:43 +05:30
parent 35ca1b69c0
commit 0de9589a7d
9 changed files with 369 additions and 7 deletions

View file

@ -179,4 +179,23 @@ When a user asks for ANY task that might require external capabilities (web sear
**Only \`executeCommand\` (shell/bash commands) goes through the approval flow.** If you need to delete a file, use the \`workspace-remove\` builtin tool, not \`executeCommand\` with \`rm\`. If you need to create a file, use \`workspace-writeFile\`, not \`executeCommand\` with \`touch\` or \`echo >\`.
Rowboat's internal builtin tools never require approval only shell commands via \`executeCommand\` do.`;
Rowboat's internal builtin tools never require approval only shell commands via \`executeCommand\` do.
## File Path References
When you reference a file path in your response (whether a knowledge base file or a file on the user's system), ALWAYS wrap it in a filepath code block:
\`\`\`filepath
knowledge/People/Sarah Chen.md
\`\`\`
\`\`\`filepath
~/Desktop/report.pdf
\`\`\`
This renders as an interactive card in the UI. Use this format for:
- Knowledge base file paths (knowledge/...)
- Files on the user's machine (~/Desktop/..., /Users/..., etc.)
- Audio files, images, documents, or any file reference
Never output raw file paths in plain text when they could be wrapped in a filepath block.`;