@agimon-ai/doompi-author 0.0.1-alpha.16 → 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.
@@ -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 gap-2 overflow-y-auto p-3",
1875
- children: [
1876
- /* @__PURE__ */ jsx("div", {
1877
- "data-testid": "author-preview-providers",
1878
- children: renderSlot("author.preview-provider")
1879
- }),
1880
- sessionId !== null && workspace !== void 0 && focused !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
1881
- /* @__PURE__ */ jsx("h2", {
1882
- className: "text-base font-semibold text-doom-text",
1883
- children: "Annotations"
1884
- }),
1885
- /* @__PURE__ */ jsx("p", {
1886
- className: "text-base leading-normal text-doom-dim sm:text-sm",
1887
- children: "Drag a region or place a point, add feedback, then submit here. Requests queue while the agent is working."
1888
- }),
1889
- focused.kind === "video" ? /* @__PURE__ */ jsx("p", {
1890
- className: "text-base text-doom-dim sm:text-sm",
1891
- children: "Annotations reference video frames. They do not save changes to the source video."
1892
- }) : null,
1893
- /* @__PURE__ */ jsx(AuthorToolPalette, {
1894
- sessionId,
1895
- kind: focused.kind,
1896
- activeTool: workspace.activeTool
1897
- }),
1898
- autonomousVoiceGridVisible(statuses) && grid !== void 0 ? /* @__PURE__ */ jsxs("div", {
1899
- "data-testid": "author-grid-snapshot",
1900
- className: "rounded border border-doom-red/40 bg-doom-red/5 p-2 text-base text-doom-dim",
1901
- children: [/* @__PURE__ */ jsx("strong", {
1902
- className: "text-doom-red",
1903
- children: "VOICE GRID A1–H8"
1904
- }), /* @__PURE__ */ jsxs("p", {
1905
- className: "mt-1 truncate",
1906
- children: ["token ", grid.geometryToken]
1907
- })]
1908
- }) : null,
1909
- /* @__PURE__ */ jsx(AuthorRegionDrafts, {
1910
- sessionId,
1911
- workspace
1912
- }, focused.path),
1913
- workspace.annotations.length > 0 ? /* @__PURE__ */ jsxs("div", {
1914
- className: "space-y-1.5 border-b border-doom-border-soft pb-3",
1915
- children: [/* @__PURE__ */ jsx(Button, {
1916
- className: "min-h-11 min-w-11 w-full text-base [@media(pointer:fine)]:min-h-8 sm:text-sm",
1917
- variant: "outline",
1918
- "data-testid": "author-attach-capture",
1919
- disabled: capturing || workspace.candidate !== void 0 || submitCapture === void 0,
1920
- onClick: async () => {
1921
- if (capturing || workspace.candidate || submitCapture === void 0) return;
1922
- setCapturing(true);
1923
- setCaptureStatus("Submitting annotations…");
1924
- try {
1925
- const packet = createAuthorCapturePacket(crypto.randomUUID(), Date.now(), focused, workspace.annotations);
1926
- await submitCapture({
1927
- ...await multiRegionCaptureProvider(workspace.annotations).capture(),
1928
- context: authorCaptureContext(packet)
1929
- });
1930
- setCaptureStatus("Request submitted. You can keep annotating here.");
1931
- } catch (reason) {
1932
- setCaptureStatus(reason instanceof Error ? reason.message : String(reason));
1933
- } finally {
1934
- setCapturing(false);
1935
- }
1936
- },
1937
- children: capturing ? "Submitting…" : `Submit ${workspace.annotations.length} annotation${workspace.annotations.length === 1 ? "" : "s"}`
1938
- }), workspace.candidate ? /* @__PURE__ */ jsx("p", {
1939
- className: "text-base text-doom-dim sm:text-sm",
1940
- children: "Add or discard the current annotation before submitting."
1941
- }) : null]
1942
- }) : null,
1943
- submitCapture === void 0 ? /* @__PURE__ */ jsx("output", {
1944
- className: "text-sm text-doom-red",
1945
- children: "Submission unavailable. Reload to update the app."
1946
- }) : null,
1947
- captureStatus ? /* @__PURE__ */ jsx("output", {
1948
- className: "block text-sm text-doom-dim",
1949
- children: captureStatus
1950
- }) : null
1951
- ] }) : null,
1952
- /* @__PURE__ */ jsx(AuthorRequestLog, { requests: workspace?.requests ?? [] })
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