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

@ -386,6 +386,15 @@ const ipcSchemas = {
success: z.literal(true),
}),
},
// Shell integration channels
'shell:openPath': {
req: z.object({ path: z.string() }),
res: z.object({ error: z.string().optional() }),
},
'shell:readFileBase64': {
req: z.object({ path: z.string() }),
res: z.object({ data: z.string(), mimeType: z.string(), size: z.number() }),
},
} as const;
// ============================================================================