@agimon-ai/doompi-author 0.0.1-alpha.15 → 0.0.1-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensions/web.mjs +92 -81
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/src/extensions/workspaces/sessions/(backend)/root.server.cjs +1 -15
- package/dist/src/extensions/workspaces/sessions/(backend)/root.server.cjs.map +1 -1
- package/dist/src/extensions/workspaces/sessions/(backend)/root.server.mjs +1 -15
- package/dist/src/extensions/workspaces/sessions/(backend)/root.server.mjs.map +1 -1
- package/package.json +9 -9
package/dist/extensions/web.mjs
CHANGED
|
@@ -1857,7 +1857,7 @@ function AuthorToolPalette({ sessionId, kind, activeTool }) {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
//#endregion
|
|
1859
1859
|
//#region src/extensions/workspaces/sessions/(frontend)/dock/_components/AuthorPanel.tsx
|
|
1860
|
-
function AuthorPanel({ sessionId, activeMinorModes, submitCapture, statuses, renderSlot }) {
|
|
1860
|
+
function AuthorPanel({ sessionId, activeMinorModes, submitCapture, statuses, renderSlot, renderSessionActivity }) {
|
|
1861
1861
|
const [captureStatus, setCaptureStatus] = useState();
|
|
1862
1862
|
const [capturing, setCapturing] = useState(false);
|
|
1863
1863
|
const documents = useStore(authorWorkspace.store, (state) => {
|
|
@@ -1868,89 +1868,100 @@ function AuthorPanel({ sessionId, activeMinorModes, submitCapture, statuses, ren
|
|
|
1868
1868
|
const workspace = useStore(authorWorkspace.store, (state) => sessionId === null ? void 0 : state.sessions[sessionId]);
|
|
1869
1869
|
const grid = useStore(authorGrid.store, (state) => sessionId === null ? void 0 : state.sessions[sessionId]);
|
|
1870
1870
|
const focused = documents.find((document) => document.path === workspace?.focusedDocument?.path);
|
|
1871
|
+
const activity = sessionId === null ? null : renderSessionActivity?.() ?? null;
|
|
1871
1872
|
if (!activeMinorModes?.includes("author")) return null;
|
|
1872
1873
|
return /* @__PURE__ */ jsxs("section", {
|
|
1873
1874
|
"data-testid": "author-panel",
|
|
1874
|
-
className: "flex min-h-0 flex-1 flex-col
|
|
1875
|
-
children: [
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1875
|
+
className: "flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
1876
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1877
|
+
className: "min-h-0 flex-1 overflow-y-auto p-3",
|
|
1878
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1879
|
+
className: "flex flex-col gap-2",
|
|
1880
|
+
children: [
|
|
1881
|
+
/* @__PURE__ */ jsx("div", {
|
|
1882
|
+
"data-testid": "author-preview-providers",
|
|
1883
|
+
children: renderSlot("author.preview-provider")
|
|
1884
|
+
}),
|
|
1885
|
+
sessionId !== null && workspace !== void 0 && focused !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1886
|
+
/* @__PURE__ */ jsx("h2", {
|
|
1887
|
+
className: "text-base font-semibold text-doom-text",
|
|
1888
|
+
children: "Annotations"
|
|
1889
|
+
}),
|
|
1890
|
+
/* @__PURE__ */ jsx("p", {
|
|
1891
|
+
className: "text-base leading-normal text-doom-dim sm:text-sm",
|
|
1892
|
+
children: "Drag a region or place a point, add feedback, then submit here. Requests queue while the agent is working."
|
|
1893
|
+
}),
|
|
1894
|
+
focused.kind === "video" ? /* @__PURE__ */ jsx("p", {
|
|
1895
|
+
className: "text-base text-doom-dim sm:text-sm",
|
|
1896
|
+
children: "Annotations reference video frames. They do not save changes to the source video."
|
|
1897
|
+
}) : null,
|
|
1898
|
+
/* @__PURE__ */ jsx(AuthorToolPalette, {
|
|
1899
|
+
sessionId,
|
|
1900
|
+
kind: focused.kind,
|
|
1901
|
+
activeTool: workspace.activeTool
|
|
1902
|
+
}),
|
|
1903
|
+
autonomousVoiceGridVisible(statuses) && grid !== void 0 ? /* @__PURE__ */ jsxs("div", {
|
|
1904
|
+
"data-testid": "author-grid-snapshot",
|
|
1905
|
+
className: "rounded border border-doom-red/40 bg-doom-red/5 p-2 text-base text-doom-dim",
|
|
1906
|
+
children: [/* @__PURE__ */ jsx("strong", {
|
|
1907
|
+
className: "text-doom-red",
|
|
1908
|
+
children: "VOICE GRID A1–H8"
|
|
1909
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
1910
|
+
className: "mt-1 truncate",
|
|
1911
|
+
children: ["token ", grid.geometryToken]
|
|
1912
|
+
})]
|
|
1913
|
+
}) : null,
|
|
1914
|
+
/* @__PURE__ */ jsx(AuthorRegionDrafts, {
|
|
1915
|
+
sessionId,
|
|
1916
|
+
workspace
|
|
1917
|
+
}, focused.path),
|
|
1918
|
+
workspace.annotations.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
1919
|
+
className: "space-y-1.5 border-b border-doom-border-soft pb-3",
|
|
1920
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
1921
|
+
className: "min-h-11 min-w-11 w-full text-base [@media(pointer:fine)]:min-h-8 sm:text-sm",
|
|
1922
|
+
variant: "outline",
|
|
1923
|
+
"data-testid": "author-attach-capture",
|
|
1924
|
+
disabled: capturing || workspace.candidate !== void 0 || submitCapture === void 0,
|
|
1925
|
+
onClick: async () => {
|
|
1926
|
+
if (capturing || workspace.candidate || submitCapture === void 0) return;
|
|
1927
|
+
setCapturing(true);
|
|
1928
|
+
setCaptureStatus("Submitting annotations…");
|
|
1929
|
+
try {
|
|
1930
|
+
const packet = createAuthorCapturePacket(crypto.randomUUID(), Date.now(), focused, workspace.annotations);
|
|
1931
|
+
await submitCapture({
|
|
1932
|
+
...await multiRegionCaptureProvider(workspace.annotations).capture(),
|
|
1933
|
+
context: authorCaptureContext(packet)
|
|
1934
|
+
});
|
|
1935
|
+
setCaptureStatus("Request submitted. You can keep annotating here.");
|
|
1936
|
+
} catch (reason) {
|
|
1937
|
+
setCaptureStatus(reason instanceof Error ? reason.message : String(reason));
|
|
1938
|
+
} finally {
|
|
1939
|
+
setCapturing(false);
|
|
1940
|
+
}
|
|
1941
|
+
},
|
|
1942
|
+
children: capturing ? "Submitting…" : `Submit ${workspace.annotations.length} annotation${workspace.annotations.length === 1 ? "" : "s"}`
|
|
1943
|
+
}), workspace.candidate ? /* @__PURE__ */ jsx("p", {
|
|
1944
|
+
className: "text-base text-doom-dim sm:text-sm",
|
|
1945
|
+
children: "Add or discard the current annotation before submitting."
|
|
1946
|
+
}) : null]
|
|
1947
|
+
}) : null,
|
|
1948
|
+
submitCapture === void 0 ? /* @__PURE__ */ jsx("output", {
|
|
1949
|
+
className: "text-sm text-doom-red",
|
|
1950
|
+
children: "Submission unavailable. Reload to update the app."
|
|
1951
|
+
}) : null,
|
|
1952
|
+
captureStatus ? /* @__PURE__ */ jsx("output", {
|
|
1953
|
+
className: "block text-sm text-doom-dim",
|
|
1954
|
+
children: captureStatus
|
|
1955
|
+
}) : null
|
|
1956
|
+
] }) : null,
|
|
1957
|
+
/* @__PURE__ */ jsx(AuthorRequestLog, { requests: workspace?.requests ?? [] })
|
|
1958
|
+
]
|
|
1959
|
+
})
|
|
1960
|
+
}), activity === null ? null : /* @__PURE__ */ jsx("footer", {
|
|
1961
|
+
"data-testid": "author-session-activity",
|
|
1962
|
+
className: "shrink-0 border-t border-doom-border bg-doom-rail p-3",
|
|
1963
|
+
children: activity
|
|
1964
|
+
})]
|
|
1954
1965
|
});
|
|
1955
1966
|
}
|
|
1956
1967
|
//#endregion
|