Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,15 @@ export async function uploadComposerAttachment(
// Non-image file.
let dataUrl: string | null = null

if (remote) {
// hermes-fork: the hosted web client has no local filesystem — its picked
// files already live on the gateway box (~/.hermes/uploads/...), so attach
// by path only and let gateway file.attach read them directly. The web-shim's
// readFileDataUrl only caches image previews; reading here would throw
// "Could not read <name>" for every non-image (June-2026 fix, re-applied
// after it was dropped in a fork reconcile — guarded by index.test.tsx).
const hostedWeb = Boolean((window as unknown as { __HERMES_WEB_CLIENT__?: boolean }).__HERMES_WEB_CLIENT__)

if (remote && !hostedWeb) {
try {
dataUrl = await readFileDataUrlForAttach(path)
} catch (err) {
Expand Down
Loading