# @ruaibeite/dsh-files-to-chat **Right-click → "Add to conversation" in the right Sidebar file tree.** A file or folder becomes an `@` reference in the current conversation's composer, and you can batch-insert a whole multi-selection at once. ``` right-click any file / folder → Add to conversation → an @path reference lands in the draft ⌘/Ctrl+click to multi-select → right-click → Add N selected to conversation ``` 中文说明见 [README.md](README.md)。 ## What it does | Action | Result | | --- | --- | | Right-click a file row | Menu: "Add to conversation" / "Open with default app" / "Show in file manager" / "Copy path" | | Right-click a folder row | Same, inserting a `@dir/` reference; the open items become "Open folder" / "Reveal in parent folder" | | ⌘/Ctrl + click | Add/remove that row from the selection (does not open the file) | | Shift + click | Select the range from the last pick | | Right-click inside a selection | Menu becomes "Add N selected to conversation" + "Copy N paths" | | Header chip | Appears in the file-tree header while a selection exists; `×` clears it | | Escape | Close the menu; with no menu open, clear the selection | A plain click keeps the file tree's own behaviour exactly (open a file, expand a folder) and only clears the selection. "Open" and "Show in file manager" go through the **official open-in-app host capability** — the same `session` remote namespace the official "Open In…" button in the file-tree header uses — so the plugin never spawns a shell itself. The `canOpenWorkspacePath()` probe is **tri-state**: the group is hidden only when the host explicitly answers "not supported". When the probe cannot answer (call failed, malformed envelope, namespace not reachable yet) the items are shown anyway and the host answers on click — one flaky probe must not hide a working feature for good. Opening is not offered for a multi-selection: launching N applications at once is not a feature. ## What gets inserted The `@` reference syntax itself — identical to picking a file from the built-in `@` menu: - paths inside the workspace are written relative (`@iwcc/iwcc.sql`), outside it they stay absolute; - paths containing whitespace use the closed-quote form (`@"my docs/a b.md"`, `@"ba docs/"`); - a reference does **not** carry file contents: per `dsh-file-reference`, `@path` is just prompt text and the model still has to read the file with its own tools. Adding a reference is therefore cheap and never floods the context window. ## How it works The official `dsh-client-ui-sidebar-files` renders its rows read-only (`
  • ` wrapping a `