Skip to content

fix(composer): send file mentions on a Windows server - #147

Merged
Tarquinen merged 1 commit into
devfrom
windows-file-mentions
Nov 18, 2026
Merged

Tarquinen merged 1 commit into
devfrom
windows-file-mentions

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Mentioning a file with @ made the message fail to send when the OpenCode server runs on Windows, as a user reported. The server gives its directory as C:\Users\…, the app didn't treat that as an absolute path, and the mention went out as file:///C:%5CUsers%5C…/src/main.ts. The server rejects that as an invalid file URI, which rejects the whole prompt.

Now a drive path is sent as file:///C:/Users/…/src/main.ts, which the server accepts.

  • Linux and macOS servers are unchanged; mentions already sent fine there (checked on an emulator against opencode 2.3.0).
  • Not tested end to end against a Windows server. The bad URI was reproduced in a unit test, and Node and Bun's fileURLToPath in Windows mode throw on the old form and accept the new one.
  • scripts/check.sh :feature:composer passes. iOS has the same bug; a matching PR follows.

A server on Windows reports its directory as C:\Users\..., which the app didn't treat as absolute. The mention's URI came out as file:///C:%5CUsers%5C..., the server rejected it as an invalid file URI and the message never sent.

Drive paths now become file:///C:/Users/... . Verified with scripts/check.sh :feature:composer; the new test's input gave the %5C form before the change.
@Tarquinen
Tarquinen merged commit 9a01b7f into dev Nov 18, 2026
3 checks passed
@Tarquinen Tarquinen mentioned this pull request Nov 18, 2026

This branch was previously deployed

1 inactive deployment
release — f5b1abee Deployed Nov 18, 2026 by Tarquinen via check #480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant