Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(agentic): drag a file or folder out of the workspace explorer onto a pane

rubenluetke10-beep1b29dedef09a
diff --git a/docs/product/extend-and-automate/agentic-ide.md b/docs/product/extend-and-automate/agentic-ide.md
index bc70688442..99fdfccb71 100644
--- a/docs/product/extend-and-automate/agentic-ide.md
+++ b/docs/product/extend-and-automate/agentic-ide.md
@@ -104,9 +104,10 @@ shows exact prompts and their recorded submission states.
### Add Files and Screenshots
Drop a project file directly on a pane to type its path without submitting it;
-add your instruction, then press Enter. Drop or paste a screenshot or document
-on the prompt bar to let Jarvis extract or describe its contents for the
-prepared brief.
+add your instruction, then press Enter. Drag it either from your computer's own
+file manager or from the workspace explorer beside the grid — a folder works the
+same way as a file. Drop or paste a screenshot or document on the prompt bar to
+let Jarvis extract or describe its contents for the prepared brief.
External files and clipboard images are copied into the Git-ignored
`.jarvis/drops` folder; project files stay where they are. Later drops clean up
diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx
index 4502697fef..234bcf0858 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx
@@ -3318,6 +3318,7 @@ export function AgenticGrid({
<WorkspaceExplorer
workspaceId={session.id}
rootName={project.name}
+ rootPath={session.folder}
onClose={() => setExplorerOpen(false)}
onOpenFile={openWorkspaceFile}
/>
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.test.tsx
index 287f8dbc02..a6edc5b2f8 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.test.tsx
@@ -27,8 +27,19 @@ vi.mock("@/lib/agenticIdeApi", () => ({
}));
import * as api from "@/lib/agenticIdeApi";
+import { extractPaneDrop } from "./paneDrop";
import { WorkspaceExplorer } from "./WorkspaceExplorer";
+/** Minimal DataTransfer stand-in — jsdom has no real one. */
+function fakeDataTransfer(): DataTransfer {
+ const store = new Map<string, string>();
+ return {
+ setData: (type: string, value: string) => store.set(type, value),
+ getData: (type: string) => store.get(type) ?? "",
+ files: [],
+ } as unknown as DataTransfer;
+}
+
describe("WorkspaceExplorer", () => {
beforeEach(() => {
vi.clearAllMocks();
@@ -158,4 +169,61 @@ describe("WorkspaceExplorer", () => {
);
});
+ it("hands a dragged row to a pane as an absolute path", async () => {
+ render(
+ <WorkspaceExplorer
+ workspaceId="workspace-1"
+ rootName="project"
+ rootPath="/home/me/project"
+ onClose={vi.fn()}
+ onOpenFile={vi.fn()}
+ />,
+ );
+
+ await screen.findByText("README.md");
+ const row = screen.getByTestId("explorer-entry-README.md");
+ expect(row.getAttribute("draggable")).toBe("true");
+
+ const dataTransfer = fakeDataTransfer();
+ fireEvent.dragStart(row, { dataTransfer });
+ // What a terminal pane will actually read out of the drop.
+ expect(extractPaneDrop(dataTransfer).paths).toEqual([
+ "/home/me/project/README.md",
+ ]);
+ });
+
+ it("lets a FOLDER be dragged too, not only a file", async () => {
+ render(
+ <WorkspaceExplorer
+ workspaceId="workspace-1"
+ rootName="project"
+ rootPath="/home/me/project"
+ onClose={vi.fn()}
+ onOpenFile={vi.fn()}
+ />,
+ );
+
+ await screen.findByText("src");
+ const dataTransfer = fakeDataTransfer();
+ fireEvent.dragStart(screen.getByTestId("explorer-entry-src"), { dataTransfer });
+ expect(extractPaneDrop(dataTransfer).paths).toEqual(["/home/me/project/src"]);
+ });
+
+ it("does not offer a drag before the workspace folder is known", async () => {
+ // A row that lifts but carries nothing would swallow the click that opens
+ // the file, so it must not lift at all.
+ render(
+ <WorkspaceExplorer
+ workspaceId="workspace-1"
+ rootName="project"
+ onClose={vi.fn()}
+ onOpenFile={vi.fn()}
+ />,
+ );
+
+ await screen.findByText("README.md");
+ expect(
+ screen.getByTestId("explorer-entry-README.md").getAttribute("draggable"),
+ ).toBe("false");
+ });
});
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.tsx
index d34e5dc729..01692ff807 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.tsx
@@ -23,6 +23,7 @@ import {
} from "@/lib/agenticIdeApi";
import { cn } from "@/lib/utils";
+import { setWorkspaceEntryDrag } from "./explorerDrag";
import { materialFileIcon, useMaterialFileIcons } from "./materialFileIcons";
interface DirectoryState {
@@ -35,6 +36,15 @@ interface DirectoryState {
interface WorkspaceExplorerProps {
workspaceId: string;
rootName: string;
+ /**
+ * Absolute path of the workspace folder — what makes the rows draggable.
+ *
+ * The listing endpoint only ever returns paths relative to it, and a pane
+ * needs the absolute one to tell a file inside the workspace from one outside
+ * it. Optional because a caller that has not resolved the folder yet should
+ * still get a working tree; the rows simply do not lift.
+ */
+ rootPath?: string;
onClose: () => void;
onOpenFile: (path: string, trigger?: HTMLElement) => void;
}
@@ -42,6 +52,7 @@ interface WorkspaceExplorerProps {
export function WorkspaceExplorer({
workspaceId,
rootName,
+ rootPath,
onClose,
onOpenFile,
}: WorkspaceExplorerProps) {
@@ -216,6 +227,7 @@ export function WorkspaceExplorer({
openPaths={openPaths}
selectedPath={selectedPath}
theme={theme}
+ rootPath={rootPath}
onToggle={toggleDirectory}
onSelect={setSelectedPath}
onOpenFile={openFile}
@@ -225,7 +237,9 @@ export function WorkspaceExplorer({
</div>
<footer className="shrink-0 border-t border-border/60 px-3 py-2 text-[10px] leading-relaxed text-muted-foreground">
- {t("agentic_grid.explorer.open_hint")}
+ {rootPath
+ ? t("agentic_grid.explorer.drag_hint")
+ : t("agentic_grid.explorer.open_hint")}
</footer>
</aside>
);
@@ -238,6 +252,7 @@ function TreeLevel({
openPaths,
selectedPath,
theme,
+ rootPath,
onToggle,
onSelect,
onOpenFile,
@@ -248,6 +263,7 @@ function TreeLevel({
openPaths: Set<string>;
selectedPath: string | null;
theme: "dark" | "light";
+ rootPath?: string;
onToggle: (path: string) => void;
onSelect: (path: string) => void;
onOpenFile: (path: string, trigger?: HTMLElement) => void;
@@ -303,6 +319,26 @@ function TreeLevel({
return (
<div key={entry.path}>
<div
+ // Draggable on the ROW rather than on the button inside it, so the
+ // ghost the browser draws under the cursor is the whole line —
+ // icon, name and indentation — instead of a cropped label.
+ //
+ // Cancelled when the path cannot be built (no workspace root yet):
+ // a drag that carries nothing still suppresses the click that
+ // would have opened the file, which reads as a dead row.
+ draggable={Boolean(rootPath)}
+ data-testid={`explorer-entry-${entry.path}`}
+ onDragStart={(event) => {
+ if (
+ !rootPath ||
+ !setWorkspaceEntryDrag(event.dataTransfer, {
+ root: rootPath,
+ path: entry.path,
+ })
+ ) {
+ event.preventDefault();
+ }
+ }}
className={cn(
"group flex h-7 w-full items-center rounded-control transition-colors",
selected
@@ -377,6 +413,7 @@ function TreeLevel({
openPaths={openPaths}
selectedPath={selectedPath}
theme={theme}
+ rootPath={rootPath}
onToggle={onToggle}
onSelect={onSelect}
onOpenFile={onOpenFile}
diff --git a/jarvis/ui/web/frontend/src/components/agentic/explorerDrag.test.ts b/jarvis/ui/web/frontend/src/components/agentic/explorerDrag.test.ts
new file mode 100644
index 0000000000..2f80d9124c
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/agentic/explorerDrag.test.ts
@@ -0,0 +1,107 @@
+import { describe, expect, it } from "vitest";
+
+import {
+ absoluteWorkspacePath,
+ setWorkspaceEntryDrag,
+ workspaceFileUri,
+} from "./explorerDrag";
+import { WORKSPACE_PATH_TYPE, extractPaneDrop } from "./paneDrop";
+
+/** Minimal DataTransfer stand-in — jsdom has no real one. */
+function dataTransfer(): DataTransfer {
+ const store = new Map<string, string>();
+ return {
+ setData: (type: string, value: string) => store.set(type, value),
+ getData: (type: string) => store.get(type) ?? "",
+ get types() {
+ return [...store.keys()];
+ },
+ files: [],
+ } as unknown as DataTransfer;
+}
+
+describe("joining a workspace-relative path onto its root", () => {
+ it("uses backslashes for a Windows workspace", () => {
+ expect(
+ absoluteWorkspacePath("C:\\Users\\me\\Personal Jarvis", "docs/plans/x.md"),
+ ).toBe("C:\\Users\\me\\Personal Jarvis\\docs\\plans\\x.md");
+ });
+
+ it("uses slashes for a POSIX workspace", () => {
+ expect(absoluteWorkspacePath("/home/me/project", "docs/plans/x.md")).toBe(
+ "/home/me/project/docs/plans/x.md",
+ );
+ });
+
+ it("reads the separator off the SERVER's root, not this browser", () => {
+ // The desktop app and a phone pointed at the same server render the same
+ // page; only the root the server sent says which platform the files are on.
+ expect(absoluteWorkspacePath("\\\\nas\\share\\project", "src/main.ts")).toBe(
+ "\\\\nas\\share\\project\\src\\main.ts",
+ );
+ });
+
+ it("does not double the separator when the root carries a trailing one", () => {
+ expect(absoluteWorkspacePath("/home/me/project/", "README.md")).toBe(
+ "/home/me/project/README.md",
+ );
+ });
+
+ it("yields nothing when the root is not known yet", () => {
+ expect(absoluteWorkspacePath("", "README.md")).toBe("");
+ });
+});
+
+describe("offering the same path to applications outside this page", () => {
+ it("keeps a Windows drive letter readable", () => {
+ expect(workspaceFileUri("C:\\work\\Personal Jarvis\\a b.md")).toBe(
+ "file:///C:/work/Personal%20Jarvis/a%20b.md",
+ );
+ });
+
+ it("encodes a POSIX path", () => {
+ expect(workspaceFileUri("/home/me/a b.md")).toBe("file:///home/me/a%20b.md");
+ });
+
+ it("keeps a UNC host in the authority position", () => {
+ // `file:///nas/share/...` would name a local directory called "nas".
+ expect(workspaceFileUri("\\\\nas\\share\\a.md")).toBe("file://nas/share/a.md");
+ });
+});
+
+describe("lifting one explorer row into a drag", () => {
+ it("arrives at a pane as exactly the path the row stands for", () => {
+ const dt = dataTransfer();
+ expect(
+ setWorkspaceEntryDrag(dt, {
+ root: "C:\\work\\Personal Jarvis",
+ path: "docs/plans/x.md",
+ }),
+ ).toBe(true);
+ // The pane's own reader is the assertion that matters — a format the drop
+ // side does not understand is the same as no drag at all.
+ expect(extractPaneDrop(dt).paths).toEqual([
+ "C:\\work\\Personal Jarvis\\docs\\plans\\x.md",
+ ]);
+ });
+
+ it("also speaks the two formats other applications understand", () => {
+ const dt = dataTransfer();
+ setWorkspaceEntryDrag(dt, { root: "/home/me/project", path: "src" });
+ expect(dt.getData("text/uri-list")).toBe("file:///home/me/project/src");
+ expect(dt.getData("text/plain")).toBe("/home/me/project/src");
+ expect(dt.getData(WORKSPACE_PATH_TYPE)).toBe("/home/me/project/src");
+ });
+
+ it("carries a FOLDER as readily as a file", () => {
+ const dt = dataTransfer();
+ setWorkspaceEntryDrag(dt, { root: "/home/me/project", path: "docs/plans" });
+ expect(extractPaneDrop(dt).paths).toEqual(["/home/me/project/docs/plans"]);
+ });
+
+ it("refuses the gesture when there is no root to join onto", () => {
+ expect(setWorkspaceEntryDrag(dataTransfer(), { root: "", path: "a.md" })).toBe(
+ false,
+ );
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/components/agentic/explorerDrag.ts b/jarvis/ui/web/frontend/src/components/agentic/explorerDrag.ts
new file mode 100644
index 0000000000..325f022939
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/agentic/explorerDrag.ts
@@ -0,0 +1,101 @@
+/**
+ * Lifting a row out of the workspace explorer and carrying it to a pane.
+ *
+ * Dropping a file from the operating system's file manager onto an agent
+ * already worked; the app's own explorer sat right beside those panes and could
+ * not do the same thing. This closes that half, and the only real work is
+ * turning what the explorer knows into what the drop side expects.
+ *
+ * The explorer speaks in paths RELATIVE to the workspace root, because that is
+ * all the file-listing endpoint hands out — it is a workspace browser, not a
+ * host browser. The drop endpoint speaks in absolute paths, because a file
+ * dragged out of Explorer arrives absolute and it decides from the location
+ * whether the file already lies inside the workspace (referenced where it is)
+ * or outside it (copied in). Joining the two is this module's whole job.
+ *
+ * The join has to produce a path the BACKEND's platform understands, which is
+ * not necessarily the one the browser runs on — the desktop app and a phone
+ * pointed at the same server are the same page. So the separator is read off
+ * the workspace root the server sent, never off `navigator`.
+ */
+import { WORKSPACE_PATH_TYPE } from "./paneDrop";
+
+/** A drive letter (`C:\…`) or a UNC share (`\\server\…`) — Windows either way. */
+function isWindowsRoot(root: string): boolean {
+ return /^[a-zA-Z]:[\\/]/.test(root) || root.startsWith("\\\\");
+}
+
+/**
+ * The workspace-relative `path` as an absolute one under `root`.
+ *
+ * A root the server has not sent yet (an explorer rendered a tick before the
+ * session arrives) yields an empty string, which callers read as "not
+ * draggable" — better than a path rooted at nothing.
+ */
+export function absoluteWorkspacePath(root: string, path: string): string {
+ const base = root.trim().replace(/[\\/]+$/, "");
+ const relative = path.trim().replace(/^[\\/]+/, "");
+ if (!base) return "";
+ if (!relative) return root.trim();
+ return isWindowsRoot(base)
+ ? `${base}\\${relative.replace(/\//g, "\\")}`
+ : `${base}/${relative}`;
+}
+
+/**
+ * The same path as a `file://` URI, for drop targets outside this page.
+ *
+ * Only the OUTSIDE case needs this — a pane reads {@link WORKSPACE_PATH_TYPE}
+ * and never has to parse a URL. It is offered anyway because a drag that
+ * carries `text/uri-list` is a drag another application can accept, and
+ * withholding it would make the explorer a dead end everywhere but here.
+ *
+ * A UNC path keeps its host in the authority position (`file://server/share`),
+ * which is the one shape a bare `file:///` prefix would silently corrupt.
+ */
+export function workspaceFileUri(absolute: string): string {
+ const posix = absolute.replace(/\\/g, "/");
+ const encoded = posix
+ .split("/")
+ .map((segment) => encodeURIComponent(segment))
+ .join("/")
+ // A drive letter is not a path segment to be escaped; `C%3A` is a
+ // directory named "C:" as far as anything reading it back is concerned.
+ .replace(/^([A-Za-z])%3A/, "$1:");
+ if (posix.startsWith("//")) return `file:${encoded}`;
+ return `file:///${encoded.replace(/^\/+/, "")}`;
+}
+
+export interface WorkspaceEntryDrag {
+ /** Absolute workspace root, as the server spelled it. */
+ root: string;
+ /** POSIX-style path relative to that root. */
+ path: string;
+}
+
+/**
+ * Load a drag with one explorer entry. Returns false when there is nothing to
+ * carry, so the caller can cancel the gesture instead of starting an empty one.
+ *
+ * Three formats for three audiences, all describing the same file:
+ *
+ * * {@link WORKSPACE_PATH_TYPE} — the panes, verbatim and lossless.
+ * * `text/uri-list` — other applications, and the pane's own arming check,
+ * which is what makes the drop overlay appear as the row crosses a pane.
+ * * `text/plain` — anything that only takes text: a chat composer, an editor,
+ * a text field in another window.
+ */
+export function setWorkspaceEntryDrag(
+ dt: DataTransfer,
+ entry: WorkspaceEntryDrag,
+): boolean {
+ const absolute = absoluteWorkspacePath(entry.root, entry.path);
+ if (!absolute) return false;
+ dt.setData(WORKSPACE_PATH_TYPE, absolute);
+ dt.setData("text/uri-list", workspaceFileUri(absolute));
+ dt.setData("text/plain", absolute);
+ // "copy" and not "move": the file stays where it is. A "move" cursor over a
+ // terminal would promise the explorer is about to lose the row.
+ dt.effectAllowed = "copy";
+ return true;
+}
diff --git a/jarvis/ui/web/frontend/src/components/agentic/paneDrop.test.ts b/jarvis/ui/web/frontend/src/components/agentic/paneDrop.test.ts
index dbc5f7a32f..fb0181ad10 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/paneDrop.test.ts
+++ b/jarvis/ui/web/frontend/src/components/agentic/paneDrop.test.ts
@@ -1,5 +1,6 @@
import { describe, expect, it } from "vitest";
import {
+ WORKSPACE_PATH_TYPE,
dragCarriesFiles,
extractPaneDrop,
extractPasteFiles,
@@ -11,11 +12,15 @@ import {
function dt(opts: {
uriList?: string;
text?: string;
+ workspacePath?: string;
files?: File[];
}): DataTransfer {
return {
- getData: (type: string) =>
- type === "text/uri-list" ? (opts.uriList ?? "") : (opts.text ?? ""),
+ getData: (type: string) => {
+ if (type === "text/uri-list") return opts.uriList ?? "";
+ if (type === WORKSPACE_PATH_TYPE) return opts.workspacePath ?? "";
+ return opts.text ?? "";
+ },
files: opts.files ?? [],
items: (opts.files ?? []).map((file) => ({
kind: "file" as const,
@@ -85,6 +90,28 @@ describe("reading a drop onto a terminal pane", () => {
expect(isEmptyPayload(extractPaneDrop(null))).toBe(true);
expect(isEmptyPayload(extractPaneDrop(dt({})))).toBe(true);
});
+
+ it("takes a row dragged out of the app's own explorer verbatim", () => {
+ // A UNC path is the case the URI round-trip cannot survive, which is why
+ // the in-app drag carries the path under its own type.
+ const payload = extractPaneDrop(
+ dt({ workspacePath: "\\\\nas\\share\\project\\docs\\plan.md" }),
+ );
+ expect(payload.paths).toEqual(["\\\\nas\\share\\project\\docs\\plan.md"]);
+ });
+
+ it("does not attach an explorer row twice when the drag also carries text", () => {
+ // The explorer fills text/plain and text/uri-list too, for drop targets
+ // outside this page. A pane must still see exactly one file.
+ const payload = extractPaneDrop(
+ dt({
+ workspacePath: "C:\\work\\project\\README.md",
+ uriList: "file:///C:/work/project/README.md",
+ text: "C:\\work\\project\\README.md",
+ }),
+ );
+ expect(payload.paths).toEqual(["C:\\work\\project\\README.md"]);
+ });
});
describe("deciding whether a drag in flight is worth offering a pane for", () => {
@@ -101,6 +128,10 @@ describe("deciding whether a drag in flight is worth offering a pane for", () =>
expect(dragCarriesFiles(inFlight(["text/uri-list"]))).toBe(true);
});
+ it("recognises a row lifted out of the app's own explorer", () => {
+ expect(dragCarriesFiles(inFlight([WORKSPACE_PATH_TYPE]))).toBe(true);
+ });
+
it("ignores dragged TEXT — nobody holding a selection is offering a file", () => {
// BUG-110: brushing over terminal output with the mouse down lifts the
// selection into a drag, and the pane announced "drop your file here" to a
diff --git a/jarvis/ui/web/frontend/src/components/agentic/paneDrop.ts b/jarvis/ui/web/frontend/src/components/agentic/paneDrop.ts
index 5963e82a9d..c233a5e54c 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/paneDrop.ts
+++ b/jarvis/ui/web/frontend/src/components/agentic/paneDrop.ts
@@ -29,6 +29,21 @@ export interface PaneDropPayload {
files: File[];
}
+/**
+ * The drag type the app's OWN file explorer uses.
+ *
+ * A drag that starts inside the page could dress itself up as a `file://` URI
+ * and travel the same route as an Explorer drag, but that round-trip is lossy
+ * exactly where it matters: a Windows drive letter and a UNC share
+ * (`\\server\share`) do not survive being parsed back out of a URL, and the
+ * failure is silent — the agent is handed a path to nowhere.
+ *
+ * So an in-app drag carries the path VERBATIM under its own type. It is
+ * newline-separated for the same reason the wire format is: one gesture may
+ * eventually mean several entries.
+ */
+export const WORKSPACE_PATH_TYPE = "application/x-jarvis-workspace-path";
+
/** True when this payload has nothing worth sending. */
export function isEmptyPayload(payload: PaneDropPayload): boolean {
return payload.paths.length === 0 && payload.files.length === 0;
@@ -46,19 +61,24 @@ export function isEmptyPayload(payload: PaneDropPayload): boolean {
* * `Files` — a real drag out of Explorer, Finder, or a file manager.
* * `text/uri-list` — the one shape some Linux file managers send instead, so
* dropping a file there keeps working.
+ * * `WORKSPACE_PATH_TYPE` — a row lifted out of the app's own file explorer.
* * **`text/plain` ALONE is not a file.** That is what selected TEXT looks
* like, and text is what a user drags by accident: brush over terminal
* output with the mouse held down and the browser lifts the selection into a
* drag nobody asked for. A pane that arms on this announces "drop your file
* here" at someone holding nothing (BUG-110).
*
- * An internal mission card carries neither type, so tossing one across the grid
- * stays invisible to the panes it flies over.
+ * An internal mission card carries none of these types, so tossing one across
+ * the grid stays invisible to the panes it flies over.
*/
export function dragCarriesFiles(dt: DataTransfer | null): boolean {
if (!dt) return false;
const types = Array.from(dt.types ?? []);
- return types.includes("Files") || types.includes("text/uri-list");
+ return (
+ types.includes("Files") ||
+ types.includes("text/uri-list") ||
+ types.includes(WORKSPACE_PATH_TYPE)
+ );
}
/**
@@ -107,6 +127,19 @@ export function extractPaneDrop(dt: DataTransfer | null): PaneDropPayload {
const out: PaneDropPayload = { paths: [], files: [] };
if (!dt) return out;
+ // The app's own explorer, when it is the source. Trusted as-is and taken
+ // INSTEAD of the text forms rather than alongside them: the same drag also
+ // carries `text/plain` for the benefit of anything that only understands
+ // text, and reading both would attach every entry twice.
+ const internal = dt.getData(WORKSPACE_PATH_TYPE) || "";
+ if (internal.trim()) {
+ for (const line of internal.split(/[\r\n]+/)) {
+ const candidate = line.trim();
+ if (candidate) out.paths.push(candidate);
+ }
+ return out;
+ }
+
const raw = dt.getData("text/uri-list") || dt.getData("text/plain") || "";
for (const line of raw.split(/[\r\n]+/)) {
const candidate = line.trim();
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 1900db4dc4..33b58a5bde 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -3949,6 +3949,7 @@
"folder": "Ordner",
"symlink": "Symbolische Verknüpfung",
"open_hint": "Eine Datei anklicken, um sie direkt im Workspace zu öffnen.",
+ "drag_hint": "Eine Datei anklicken, um sie hier zu öffnen. Auf ein Terminal ziehen, um sie dem Agenten zu übergeben.",
"truncated": "Dieser Ordner enthält mehr Einträge, als gleichzeitig angezeigt werden können."
},
"viewer": {
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index f8d6fd96e6..4db370ac29 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -3949,6 +3949,7 @@
"folder": "Folder",
"symlink": "Symbolic link",
"open_hint": "Click a file to open it here in the workspace.",
+ "drag_hint": "Click a file to open it here. Drag one onto a terminal to hand it to that agent.",
"truncated": "This folder has more entries than can be shown at once."
},
"viewer": {
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index f1934a41a5..b39aab366e 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -3949,6 +3949,7 @@
"folder": "Carpeta",
"symlink": "Enlace simbólico",
"open_hint": "Haz clic en un archivo para abrirlo aquí en el espacio de trabajo.",
+ "drag_hint": "Haz clic en un archivo para abrirlo aquí. Arrástralo a una terminal para entregárselo a ese agente.",
"truncated": "Esta carpeta tiene más entradas de las que se pueden mostrar a la vez."
},
"viewer": {