spiracha 1.3.3 → 1.4.0
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/AGENTS.md +7 -1
- package/README.md +6 -0
- package/apps/ui/AGENTS.md +8 -0
- package/apps/ui/README.md +10 -3
- package/apps/ui/dist/client/assets/analytics-DK2jdvmI.js +1 -0
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-DmD0sN8X.js +7 -0
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-KAcXtNxI.js +1 -0
- package/apps/ui/dist/client/assets/antigravity-keychain-panel-BRHVjFAM.js +1 -0
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-ByitGWki.js +1 -0
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-CGV7amas.js +1 -0
- package/apps/ui/dist/client/assets/antigravity.index-DEEkjlZa.js +1 -0
- package/apps/ui/dist/client/assets/antigravity.index-DgW25FEV.js +1 -0
- package/apps/ui/dist/client/assets/badge-DfWvPfKF.js +1 -0
- package/apps/ui/dist/client/assets/checkbox-CdHitXWQ.js +1 -0
- package/apps/ui/dist/client/assets/createServerFn-CgRRVpBH.js +3 -0
- package/apps/ui/dist/client/assets/cursor-threads._composerId-CmBFclK8.js +1 -0
- package/apps/ui/dist/client/assets/cursor-threads._composerId-Ti2gTm63.js +1 -0
- package/apps/ui/dist/client/assets/cursor._workspaceKey-CaAZjGmm.js +1 -0
- package/apps/ui/dist/client/assets/cursor._workspaceKey-DzD_c6j9.js +1 -0
- package/apps/ui/dist/client/assets/cursor.index-CrnMwDCi.js +1 -0
- package/apps/ui/dist/client/assets/cursor.index-PkCFVcl4.js +2 -0
- package/apps/ui/dist/client/assets/{data-table-DeQq8xdt.js → data-table-Br78_dk3.js} +2 -2
- package/apps/ui/dist/client/assets/delete-confirm-dialog-BHRmyLHr.js +11 -0
- package/apps/ui/dist/client/assets/dist-B9pyYCVU.js +1 -0
- package/apps/ui/dist/client/assets/dist-BhZOxAPP.js +1 -0
- package/apps/ui/dist/client/assets/dist-DvMS2965.js +1 -0
- package/apps/ui/dist/client/assets/download-Bf0QJKD3.js +1 -0
- package/apps/ui/dist/client/assets/dropdown-menu-Dy5cLzTy.js +1 -0
- package/apps/ui/dist/client/assets/es2015-BkCWttyM.js +41 -0
- package/apps/ui/dist/client/assets/export-dialog-C86SYHJn.js +1 -0
- package/apps/ui/dist/client/assets/formatters-BM9kB7ed.js +1 -0
- package/apps/ui/dist/client/assets/index-CPvAP-jk.js +149 -0
- package/apps/ui/dist/client/assets/jsx-runtime-DGeXAQPT.js +1 -0
- package/apps/ui/dist/client/assets/metric-card-Dplm0ZiM.js +1 -0
- package/apps/ui/dist/client/assets/page-header-Cwa3p6Tl.js +1 -0
- package/apps/ui/dist/client/assets/projects._project-Ckf6muWZ.js +1 -0
- package/apps/ui/dist/client/assets/projects._project-DSDwH4NF.js +1 -0
- package/apps/ui/dist/client/assets/projects.index-DEfhWqa8.js +1 -0
- package/apps/ui/dist/client/assets/projects.index-V5ibNZII.js +3 -0
- package/apps/ui/dist/client/assets/react-dom-DL96Jor4.js +1 -0
- package/apps/ui/dist/client/assets/refresh-ccw-BgKjOiA6.js +1 -0
- package/apps/ui/dist/client/assets/reload-error-panel-AHqu0akK.js +1 -0
- package/apps/ui/dist/client/assets/routes-Df2tgpyd.js +1 -0
- package/apps/ui/dist/client/assets/scroll-text-fM0sMOB3.js +1 -0
- package/apps/ui/dist/client/assets/select-Bf2GwfPR.js +1 -0
- package/apps/ui/dist/client/assets/settings-5VQIzME0.js +1 -0
- package/apps/ui/dist/client/assets/sqlite-error-B6uZjUe8.js +1 -0
- package/apps/ui/dist/client/assets/styles-BhRkXgwB.css +1 -0
- package/apps/ui/dist/client/assets/tabs-OO4VU5KR.js +7 -0
- package/apps/ui/dist/client/assets/text-filter-DVAZySUS.js +2 -0
- package/apps/ui/dist/client/assets/threads._threadId-BB9tTsV4.js +1 -0
- package/apps/ui/dist/client/assets/threads._threadId-BgDhFj2I.js +1 -0
- package/apps/ui/dist/client/assets/useMutation-CC_B7uy5.js +1 -0
- package/apps/ui/dist/client/assets/useQuery-C5By6WKU.js +1 -0
- package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CRW2kqj0.js +232 -0
- package/apps/ui/dist/server/assets/analytics-CYP_LT5Y.js +16 -0
- package/apps/ui/dist/server/assets/{analytics-Dc_QDZZC.js → analytics-CtpOMVMO.js} +13 -6
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-BtexWY-K.js +613 -0
- package/apps/ui/dist/server/assets/{antigravity-conversations._conversationId-C9z4AeN-.js → antigravity-conversations._conversationId-zMrR6v6R.js} +2 -2
- package/apps/ui/dist/server/assets/{antigravity-db-D9gW1D8G.js → antigravity-db-Bh8_U9uw.js} +11 -7
- package/apps/ui/dist/server/assets/{antigravity-keychain-panel-bpPoxhyp.js → antigravity-keychain-panel-CC7FLmAK.js} +1 -1
- package/apps/ui/dist/server/assets/{antigravity-queries-DVIKyOXi.js → antigravity-queries-CGrJO9Vr.js} +5 -5
- package/apps/ui/dist/server/assets/{antigravity-server-Cp1lc8fp.js → antigravity-server-CHRjVFqN.js} +11 -11
- package/apps/ui/dist/server/assets/{antigravity._workspaceKey-Dl8o1ptg.js → antigravity._workspaceKey-B0QeYUOh.js} +2 -2
- package/apps/ui/dist/server/assets/{antigravity._workspaceKey-BAoa4izU.js → antigravity._workspaceKey-C3kP-qyN.js} +4 -4
- package/apps/ui/dist/server/assets/{antigravity.index-BOlrJasZ.js → antigravity.index-CPCYkqCi.js} +2 -2
- package/apps/ui/dist/server/assets/{codex-queries-ev_mRUzr.js → codex-queries-CtgeZ7VL.js} +15 -13
- package/apps/ui/dist/server/assets/{codex-server-DIYFLozB.js → codex-server-CNXSJuc2.js} +104 -119
- package/apps/ui/dist/server/assets/concurrency-VXtYvlGh.js +18 -0
- package/apps/ui/dist/server/assets/{createServerRpc-Cg-Zr1rq.js → createServerRpc-CF_DEwnm.js} +1 -1
- package/apps/ui/dist/server/assets/{createSsrRpc-DVnVQhGx.js → createSsrRpc-C754NPki.js} +1 -1
- package/apps/ui/dist/server/assets/{cursor-db-B7agkAvM.js → cursor-db-cYZEU3WQ.js} +194 -7
- package/apps/ui/dist/server/assets/{cursor-queries-f7DjBKSD.js → cursor-queries-NCIM0Nat.js} +12 -10
- package/apps/ui/dist/server/assets/{cursor-recovery-9bJLs7vG.js → cursor-recovery-nq-kR62j.js} +1 -1
- package/apps/ui/dist/server/assets/{cursor-server-nPzojHN3.js → cursor-server-C3q7hrp-.js} +70 -41
- package/apps/ui/dist/server/assets/{cursor-threads._composerId-B3qcsh9C.js → cursor-threads._composerId-BPJFWfJj.js} +2 -2
- package/apps/ui/dist/server/assets/cursor-threads._composerId-BkMMTQ3v.js +582 -0
- package/apps/ui/dist/server/assets/{cursor._workspaceKey-BL_CQyHQ.js → cursor._workspaceKey-C5PdTaKB.js} +2 -2
- package/apps/ui/dist/server/assets/{cursor._workspaceKey-BhQeepXB.js → cursor._workspaceKey-Ckj7apKI.js} +11 -9
- package/apps/ui/dist/server/assets/{cursor.index-CsrdckZD.js → cursor.index-DkWT-mxw.js} +2 -2
- package/apps/ui/dist/server/assets/{delete-confirm-dialog-PCD7S0_M.js → delete-confirm-dialog-BcBNCxWB.js} +5 -1
- package/apps/ui/dist/server/assets/{empty-plugin-adapters-D3qLMPfC.js → empty-plugin-adapters-B3lHh1La.js} +1 -1
- package/apps/ui/dist/server/assets/{export-dialog-DaPlOGFT.js → export-dialog-BItjWgkZ.js} +53 -11
- package/apps/ui/dist/server/assets/{projects._project-CqqUFr4l.js → projects._project-Bpbc3C-L.js} +5 -3
- package/apps/ui/dist/server/assets/{projects._project-DahGqNYS.js → projects._project-CvZho6EQ.js} +42 -12
- package/apps/ui/dist/server/assets/{projects.index-CkTeFWNU.js → projects.index-BkLiF2FF.js} +21 -7
- package/apps/ui/dist/server/assets/projects.index-DesYXwfi.js +14 -0
- package/apps/ui/dist/server/assets/route-search-ts4W9MJ9.js +38 -0
- package/apps/ui/dist/server/assets/{router-K0m7dK4T.js → router-6m-ihwqA.js} +78 -62
- package/apps/ui/dist/server/assets/{routes-Xix3ZeSo.js → routes-Bsact1uB.js} +2 -2
- package/apps/ui/dist/server/assets/{routes-0x1U0IHq.js → routes-BzkJgq4W.js} +2 -2
- package/apps/ui/dist/server/assets/start-CI_0bSiY.js +4 -0
- package/apps/ui/dist/server/assets/tabs-CGA13IZM.js +502 -0
- package/apps/ui/dist/server/assets/{threads._threadId-BLCkGW--.js → threads._threadId-Bs0yuqO9.js} +2 -2
- package/apps/ui/dist/server/assets/threads._threadId-D2GYkVn6.js +639 -0
- package/apps/ui/dist/server/assets/ui-export-files-BHLX9bhN.js +83 -0
- package/apps/ui/dist/server/server.js +93 -83
- package/package.json +9 -9
- package/src/lib/antigravity-db.ts +20 -13
- package/src/lib/codex-analytics.ts +118 -18
- package/src/lib/codex-browser-db.ts +1 -25
- package/src/lib/codex-browser-export.ts +9 -69
- package/src/lib/cursor-db.ts +318 -7
- package/src/lib/cursor-exporter.ts +2 -2
- package/src/lib/ui-cache.ts +14 -1
- package/apps/ui/dist/client/assets/analytics-C83LcWNb.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-DkY8EEpK.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-OraHuz8j.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-keychain-panel-DnDcq1ge.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-CQaZscA5.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-DTs99obU.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-DbJa715k.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-P-rs6w5X.js +0 -1
- package/apps/ui/dist/client/assets/badge-wgTVp-aq.js +0 -1
- package/apps/ui/dist/client/assets/checkbox-BUx0Gkuf.js +0 -1
- package/apps/ui/dist/client/assets/cursor-threads._composerId-D0DFXt8t.js +0 -1
- package/apps/ui/dist/client/assets/cursor-threads._composerId-tFa6Cf6A.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-Df4PfA2k.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-DwrzEtnV.js +0 -1
- package/apps/ui/dist/client/assets/cursor.index-CNBf4ZiR.js +0 -1
- package/apps/ui/dist/client/assets/cursor.index-DP9Hy8X6.js +0 -2
- package/apps/ui/dist/client/assets/delete-confirm-dialog-CPlNsLhM.js +0 -11
- package/apps/ui/dist/client/assets/dist-Ds3kS91l.js +0 -1
- package/apps/ui/dist/client/assets/download-DLuPnxpV.js +0 -1
- package/apps/ui/dist/client/assets/dropdown-menu-lFk6zjoL.js +0 -1
- package/apps/ui/dist/client/assets/es2015-D-H_iZF6.js +0 -41
- package/apps/ui/dist/client/assets/export-dialog-CyqyvwiP.js +0 -1
- package/apps/ui/dist/client/assets/formatters-DbCKP02D.js +0 -1
- package/apps/ui/dist/client/assets/index-C-ZPpKJ0.js +0 -22
- package/apps/ui/dist/client/assets/json-panel-BsngvucB.js +0 -1
- package/apps/ui/dist/client/assets/metadata-section-Dtl8dNag.js +0 -1
- package/apps/ui/dist/client/assets/metric-card-DNzR1Rne.js +0 -1
- package/apps/ui/dist/client/assets/page-header-dha_O7ZL.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-B7HBhbXv.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-DHVvuT7A.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-BUUtx2AZ.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-BojAe1Y4.js +0 -3
- package/apps/ui/dist/client/assets/refresh-ccw-B-ASKHtx.js +0 -1
- package/apps/ui/dist/client/assets/reload-error-panel-DD8M1BIY.js +0 -1
- package/apps/ui/dist/client/assets/routes-q7bzFp35.js +0 -1
- package/apps/ui/dist/client/assets/scroll-text-TvHyiJ_N.js +0 -1
- package/apps/ui/dist/client/assets/select-BFv1HMiT.js +0 -1
- package/apps/ui/dist/client/assets/settings-CvegTo4F.js +0 -1
- package/apps/ui/dist/client/assets/styles-Ch0r3kMZ.css +0 -1
- package/apps/ui/dist/client/assets/text-document-panel-D7Rws41o.js +0 -1
- package/apps/ui/dist/client/assets/text-filter-2q5pEoZh.js +0 -2
- package/apps/ui/dist/client/assets/threads._threadId-LpZVUlPq.js +0 -7
- package/apps/ui/dist/client/assets/threads._threadId-MSmNIBkq.js +0 -1
- package/apps/ui/dist/client/assets/useMutation-BOPJU9e0.js +0 -1
- package/apps/ui/dist/client/assets/useQuery-CbxZiVGF.js +0 -1
- package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-zvGzK-Yx.js +0 -229
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-JEhx-f2R.js +0 -212
- package/apps/ui/dist/server/assets/cursor-threads._composerId-BK3iW-3e.js +0 -218
- package/apps/ui/dist/server/assets/json-panel-RYsxWFae.js +0 -16
- package/apps/ui/dist/server/assets/metadata-section-D6Lbc7D6.js +0 -54
- package/apps/ui/dist/server/assets/start-bX7bXjzw.js +0 -4
- package/apps/ui/dist/server/assets/text-document-panel-D8JbQWAn.js +0 -23
- package/apps/ui/dist/server/assets/threads._threadId-LjgsGUh-.js +0 -1052
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
import { t as canExportAntigravityConversation } from "./antigravity-conversation-state-HgzS302O.js";
|
|
2
|
+
import { t as Button } from "./button-CmTDnzOn.js";
|
|
3
|
+
import { a as exportAntigravityArtifactsFn, o as exportAntigravityConversationFn, r as antigravityDecryptionQueryOptions, t as antigravityConversationDetailQueryOptions } from "./antigravity-queries-CGrJO9Vr.js";
|
|
4
|
+
import { t as Route } from "./antigravity-conversations._conversationId-zMrR6v6R.js";
|
|
5
|
+
import { t as Checkbox } from "./checkbox-C0hovF41.js";
|
|
6
|
+
import { t as MetricCard } from "./metric-card-ByEeLu0r.js";
|
|
7
|
+
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
8
|
+
import { n as formatBytes, o as formatNumber, r as formatDateTime } from "./formatters-FJaGZgJk.js";
|
|
9
|
+
import { t as AntigravityKeychainPanel } from "./antigravity-keychain-panel-CC7FLmAK.js";
|
|
10
|
+
import { a as TranscriptView, c as Breadcrumbs, i as TabsTrigger, n as TabsContent, o as MetadataSection, r as TabsList, s as JsonPanel, t as Tabs } from "./tabs-CGA13IZM.js";
|
|
11
|
+
import { t as downloadTextFile } from "./download-DMmiy1xf.js";
|
|
12
|
+
import { useMemo, useState } from "react";
|
|
13
|
+
import { Link } from "@tanstack/react-router";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { useMutation, useSuspenseQuery } from "@tanstack/react-query";
|
|
16
|
+
import { Download, ScrollText } from "lucide-react";
|
|
17
|
+
//#region src/components/text-document-panel.tsx
|
|
18
|
+
var TextDocumentPanel = ({ content, description, title }) => {
|
|
19
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
20
|
+
className: "rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx("h3", {
|
|
23
|
+
className: "font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]",
|
|
24
|
+
children: title
|
|
25
|
+
}),
|
|
26
|
+
description ? /* @__PURE__ */ jsx("p", {
|
|
27
|
+
className: "mt-2 text-[var(--muted-foreground)] text-sm",
|
|
28
|
+
children: description
|
|
29
|
+
}) : null,
|
|
30
|
+
/* @__PURE__ */ jsx("pre", {
|
|
31
|
+
className: "mt-4 overflow-x-auto whitespace-pre-wrap rounded-2xl border border-[var(--border)] bg-[var(--code-background)] p-4 text-sm leading-6 [overflow-wrap:anywhere]",
|
|
32
|
+
children: content
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/lib/antigravity-transcript-events.ts
|
|
39
|
+
var HEADING_PATTERN = /^##\s+(.+)$/u;
|
|
40
|
+
var TIMESTAMP_PATTERN = /^_Timestamp:\s*(.+?)_$/u;
|
|
41
|
+
var TOOL_HEADING_PATTERN = /^tool:\s*(.+)$/iu;
|
|
42
|
+
var splitMarkdownSections = (markdown) => {
|
|
43
|
+
if (!markdown?.trim()) return [];
|
|
44
|
+
const sections = [];
|
|
45
|
+
const lines = markdown.split(/\r?\n/u);
|
|
46
|
+
let currentHeading = null;
|
|
47
|
+
let currentLines = [];
|
|
48
|
+
const flush = () => {
|
|
49
|
+
if (!currentHeading) return;
|
|
50
|
+
sections.push({
|
|
51
|
+
body: currentLines.join("\n").trim(),
|
|
52
|
+
heading: currentHeading,
|
|
53
|
+
sequence: sections.length * 10
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
for (const line of lines) {
|
|
57
|
+
const heading = HEADING_PATTERN.exec(line);
|
|
58
|
+
if (heading) {
|
|
59
|
+
flush();
|
|
60
|
+
currentHeading = heading[1].trim();
|
|
61
|
+
currentLines = [];
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (currentHeading) currentLines.push(line);
|
|
65
|
+
}
|
|
66
|
+
flush();
|
|
67
|
+
return sections;
|
|
68
|
+
};
|
|
69
|
+
var extractTimestamp = (body) => {
|
|
70
|
+
const lines = body.split(/\r?\n/u);
|
|
71
|
+
const timestamp = TIMESTAMP_PATTERN.exec(lines[0]?.trim() ?? "")?.[1]?.trim() ?? null;
|
|
72
|
+
return {
|
|
73
|
+
body: timestamp ? lines.slice(1).join("\n").trim() : body.trim(),
|
|
74
|
+
timestamp
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
var sectionBodyBeforeSubheading = (body) => {
|
|
78
|
+
return body.split(/^###\s+/mu)[0]?.trim() ?? "";
|
|
79
|
+
};
|
|
80
|
+
var extractSubheadingBlock = (body, title) => {
|
|
81
|
+
const lines = body.split(/\r?\n/u);
|
|
82
|
+
const startIndex = lines.findIndex((line) => line.trim().toLowerCase() === `### ${title.toLowerCase()}`);
|
|
83
|
+
if (startIndex === -1) return "";
|
|
84
|
+
const nextSubheadingIndex = lines.findIndex((line, index) => index > startIndex && line.startsWith("### "));
|
|
85
|
+
return lines.slice(startIndex + 1, nextSubheadingIndex === -1 ? void 0 : nextSubheadingIndex).join("\n").trim();
|
|
86
|
+
};
|
|
87
|
+
var parseToolCalls = (body) => {
|
|
88
|
+
const toolCallsBlock = extractSubheadingBlock(body, "Tool Calls");
|
|
89
|
+
if (!toolCallsBlock) return [];
|
|
90
|
+
const calls = [];
|
|
91
|
+
for (const match of toolCallsBlock.matchAll(/-\s+`([^`]+)`(?:\s*\n+```json\s*\n([\s\S]*?)\n```)?/gu)) calls.push({
|
|
92
|
+
argumentsText: match[2]?.trim() ?? null,
|
|
93
|
+
name: match[1]?.trim() || "unknown"
|
|
94
|
+
});
|
|
95
|
+
return calls;
|
|
96
|
+
};
|
|
97
|
+
var parseAssistantSection = (body) => {
|
|
98
|
+
const content = sectionBodyBeforeSubheading(body);
|
|
99
|
+
const [thinking, ...remainingThinkingBlock] = extractSubheadingBlock(body, "Thinking").split(/\n{2,}/u).map((entry) => entry.trim());
|
|
100
|
+
return {
|
|
101
|
+
content: content || remainingThinkingBlock.join("\n\n").trim(),
|
|
102
|
+
thinking: thinking ?? "",
|
|
103
|
+
toolCalls: parseToolCalls(body)
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
var buildRaw = (section, extra = {}) => ({
|
|
107
|
+
heading: section.heading,
|
|
108
|
+
source: "antigravity_markdown",
|
|
109
|
+
...extra
|
|
110
|
+
});
|
|
111
|
+
var buildMessageEvent = (section, role, text, timestamp, phase, sequenceOffset = 0) => ({
|
|
112
|
+
isHiddenByDefault: role !== "assistant" && role !== "user",
|
|
113
|
+
kind: "message",
|
|
114
|
+
memoryCitation: null,
|
|
115
|
+
model: null,
|
|
116
|
+
phase,
|
|
117
|
+
raw: buildRaw(section, { role }),
|
|
118
|
+
role,
|
|
119
|
+
sequence: section.sequence + sequenceOffset,
|
|
120
|
+
text,
|
|
121
|
+
timestamp,
|
|
122
|
+
variant: role === "user" ? "user_message" : role === "assistant" ? "agent_message" : "message"
|
|
123
|
+
});
|
|
124
|
+
var buildToolCallEvent = (section, toolCall, timestamp, sequenceOffset) => ({
|
|
125
|
+
argumentsParseFailed: false,
|
|
126
|
+
argumentsText: toolCall.argumentsText,
|
|
127
|
+
callId: null,
|
|
128
|
+
command: [toolCall.name, toolCall.argumentsText].filter(Boolean).join("\n"),
|
|
129
|
+
kind: "tool_call",
|
|
130
|
+
name: toolCall.name,
|
|
131
|
+
raw: buildRaw(section, {
|
|
132
|
+
argumentsText: toolCall.argumentsText,
|
|
133
|
+
name: toolCall.name
|
|
134
|
+
}),
|
|
135
|
+
sequence: section.sequence + sequenceOffset,
|
|
136
|
+
timestamp,
|
|
137
|
+
workdir: null
|
|
138
|
+
});
|
|
139
|
+
var buildToolOutputEvent = (section, toolName, outputText, timestamp) => ({
|
|
140
|
+
callId: null,
|
|
141
|
+
exitCode: null,
|
|
142
|
+
kind: "tool_output",
|
|
143
|
+
outputText,
|
|
144
|
+
raw: buildRaw(section, { name: toolName }),
|
|
145
|
+
sequence: section.sequence,
|
|
146
|
+
summary: outputText,
|
|
147
|
+
timestamp,
|
|
148
|
+
wallTime: null
|
|
149
|
+
});
|
|
150
|
+
var getFinalAssistantSectionSequences = (sections) => {
|
|
151
|
+
const finalAssistantSectionSequences = /* @__PURE__ */ new Set();
|
|
152
|
+
let currentAssistantContentSequence = null;
|
|
153
|
+
const flushAssistantRun = () => {
|
|
154
|
+
if (currentAssistantContentSequence !== null) finalAssistantSectionSequences.add(currentAssistantContentSequence);
|
|
155
|
+
currentAssistantContentSequence = null;
|
|
156
|
+
};
|
|
157
|
+
for (const section of sections) {
|
|
158
|
+
const heading = section.heading.toLowerCase();
|
|
159
|
+
if (heading === "user") {
|
|
160
|
+
flushAssistantRun();
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (heading !== "assistant") continue;
|
|
164
|
+
const { body } = extractTimestamp(section.body);
|
|
165
|
+
const parsed = parseAssistantSection(body);
|
|
166
|
+
if (parsed.toolCalls.length > 0) currentAssistantContentSequence = null;
|
|
167
|
+
else if (parsed.content) currentAssistantContentSequence = section.sequence;
|
|
168
|
+
}
|
|
169
|
+
flushAssistantRun();
|
|
170
|
+
return finalAssistantSectionSequences;
|
|
171
|
+
};
|
|
172
|
+
var textSectionToEvents = (section, role, body, timestamp) => {
|
|
173
|
+
return body ? [buildMessageEvent(section, role, body, timestamp, null)] : [];
|
|
174
|
+
};
|
|
175
|
+
var toolOutputSectionToEvents = (section, toolName, body, timestamp) => {
|
|
176
|
+
return body ? [buildToolOutputEvent(section, toolName, body, timestamp)] : [];
|
|
177
|
+
};
|
|
178
|
+
var assistantSectionToEvents = (section, body, timestamp, finalAssistantSectionSequences) => {
|
|
179
|
+
const parsed = parseAssistantSection(body);
|
|
180
|
+
const events = [];
|
|
181
|
+
if (parsed.thinking) events.push(buildMessageEvent(section, "assistant", parsed.thinking, timestamp, "commentary"));
|
|
182
|
+
if (parsed.content) {
|
|
183
|
+
const phase = finalAssistantSectionSequences.has(section.sequence) ? "final_answer" : "commentary";
|
|
184
|
+
events.push(buildMessageEvent(section, "assistant", parsed.content, timestamp, phase, 1));
|
|
185
|
+
}
|
|
186
|
+
parsed.toolCalls.forEach((toolCall, index) => {
|
|
187
|
+
events.push(buildToolCallEvent(section, toolCall, timestamp, 2 + index));
|
|
188
|
+
});
|
|
189
|
+
return events;
|
|
190
|
+
};
|
|
191
|
+
var sectionToEvents = (section, finalAssistantSectionSequences) => {
|
|
192
|
+
const { body, timestamp } = extractTimestamp(section.body);
|
|
193
|
+
const heading = section.heading.toLowerCase();
|
|
194
|
+
const toolHeading = TOOL_HEADING_PATTERN.exec(section.heading);
|
|
195
|
+
if (heading === "user") return textSectionToEvents(section, "user", body, timestamp);
|
|
196
|
+
if (toolHeading) return toolOutputSectionToEvents(section, toolHeading[1]?.trim() || "unknown", body, timestamp);
|
|
197
|
+
if (heading === "assistant") return assistantSectionToEvents(section, body, timestamp, finalAssistantSectionSequences);
|
|
198
|
+
if (heading === "system") return textSectionToEvents(section, "system", body, timestamp);
|
|
199
|
+
return textSectionToEvents(section, "event", body, timestamp);
|
|
200
|
+
};
|
|
201
|
+
var antigravityMarkdownToThreadEvents = (markdown) => {
|
|
202
|
+
const sections = splitMarkdownSections(markdown);
|
|
203
|
+
const finalAssistantSectionSequences = getFinalAssistantSectionSequences(sections);
|
|
204
|
+
return sections.flatMap((section) => sectionToEvents(section, finalAssistantSectionSequences));
|
|
205
|
+
};
|
|
206
|
+
var updateMessageStats = (stats, event) => {
|
|
207
|
+
stats.messageCount += 1;
|
|
208
|
+
if (event.role === "assistant") stats.assistantMessageCount += 1;
|
|
209
|
+
if (event.role === "user") stats.userMessageCount += 1;
|
|
210
|
+
if (event.phase === "commentary") stats.commentaryCount += 1;
|
|
211
|
+
if (event.phase === "final_answer") stats.finalAnswerCount += 1;
|
|
212
|
+
};
|
|
213
|
+
var getAntigravityThreadTranscriptStats = (events) => {
|
|
214
|
+
const stats = {
|
|
215
|
+
assistantMessageCount: 0,
|
|
216
|
+
commentaryCount: 0,
|
|
217
|
+
execCommandCount: 0,
|
|
218
|
+
finalAnswerCount: 0,
|
|
219
|
+
messageCount: 0,
|
|
220
|
+
toolCallCount: 0,
|
|
221
|
+
toolOutputCount: 0,
|
|
222
|
+
userMessageCount: 0,
|
|
223
|
+
webSearchEventCount: 0
|
|
224
|
+
};
|
|
225
|
+
for (const event of events) {
|
|
226
|
+
if (event.kind === "message") updateMessageStats(stats, event);
|
|
227
|
+
if (event.kind === "tool_call") stats.toolCallCount += 1;
|
|
228
|
+
if (event.kind === "tool_output") stats.toolOutputCount += 1;
|
|
229
|
+
}
|
|
230
|
+
return stats;
|
|
231
|
+
};
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/routes/antigravity-conversations.$conversationId.tsx?tsr-split=component
|
|
234
|
+
var buildConversationMetadata = (detail) => {
|
|
235
|
+
return [
|
|
236
|
+
{
|
|
237
|
+
label: "Conversation ID",
|
|
238
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
239
|
+
"data-mono": "true",
|
|
240
|
+
children: detail.conversation.conversationId
|
|
241
|
+
})
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
label: "Workspace",
|
|
245
|
+
value: /* @__PURE__ */ jsx(Link, {
|
|
246
|
+
className: "text-[var(--accent)]",
|
|
247
|
+
params: { workspaceKey: detail.conversation.workspaceKey },
|
|
248
|
+
to: "/antigravity/$workspaceKey",
|
|
249
|
+
children: detail.conversation.workspaceLabel
|
|
250
|
+
})
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
label: "Created",
|
|
254
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
255
|
+
suppressHydrationWarning: true,
|
|
256
|
+
children: formatDateTime(detail.conversation.createdAtMs)
|
|
257
|
+
})
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
label: "Updated",
|
|
261
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
262
|
+
suppressHydrationWarning: true,
|
|
263
|
+
children: formatDateTime(detail.conversation.lastUpdatedAtMs)
|
|
264
|
+
})
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
label: "Transcript source",
|
|
268
|
+
value: detail.conversation.transcriptSource ?? "n/a"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
label: "Conversation path",
|
|
272
|
+
value: detail.conversation.conversationPath ?? "n/a"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
label: "Transcript path",
|
|
276
|
+
value: detail.conversation.transcriptPath ?? "n/a"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
label: "Summary path",
|
|
280
|
+
value: detail.conversation.summaryPath ?? "n/a"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
label: "Source root",
|
|
284
|
+
value: detail.conversation.sourceRoot ?? "n/a"
|
|
285
|
+
}
|
|
286
|
+
];
|
|
287
|
+
};
|
|
288
|
+
var buildTranscriptStatsItems = (detail, events) => {
|
|
289
|
+
if (detail.transcriptLocked) return [{
|
|
290
|
+
label: "Transcript load",
|
|
291
|
+
value: "Transcript is locked until Antigravity Keychain access is enabled."
|
|
292
|
+
}];
|
|
293
|
+
if (!detail.conversationMarkdown) return [{
|
|
294
|
+
label: "Transcript load",
|
|
295
|
+
value: "No renderable transcript content was found."
|
|
296
|
+
}];
|
|
297
|
+
const stats = getAntigravityThreadTranscriptStats(events);
|
|
298
|
+
return [
|
|
299
|
+
{
|
|
300
|
+
label: "Event kinds",
|
|
301
|
+
value: [...new Set(events.map((event) => event.kind))].join(", ") || "n/a"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
label: "Messages",
|
|
305
|
+
value: formatNumber(stats.messageCount)
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
label: "User messages",
|
|
309
|
+
value: formatNumber(stats.userMessageCount)
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
label: "Assistant messages",
|
|
313
|
+
value: formatNumber(stats.assistantMessageCount)
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
label: "Commentary updates",
|
|
317
|
+
value: formatNumber(stats.commentaryCount)
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
label: "Final answers",
|
|
321
|
+
value: formatNumber(stats.finalAnswerCount)
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
label: "Tool calls",
|
|
325
|
+
value: formatNumber(stats.toolCallCount)
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
label: "Tool outputs",
|
|
329
|
+
value: formatNumber(stats.toolOutputCount)
|
|
330
|
+
}
|
|
331
|
+
];
|
|
332
|
+
};
|
|
333
|
+
function AntigravityConversationHeaderActions({ canExportArtifacts, canExportConversation, exportArtifactsPending, exportConversationPending, showConversationExport, onExportArtifacts, onExportConversation }) {
|
|
334
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
335
|
+
className: "flex flex-wrap gap-2",
|
|
336
|
+
children: [showConversationExport ? /* @__PURE__ */ jsxs(Button, {
|
|
337
|
+
className: "rounded-full",
|
|
338
|
+
disabled: !canExportConversation || exportConversationPending,
|
|
339
|
+
type: "button",
|
|
340
|
+
variant: "outline",
|
|
341
|
+
onClick: onExportConversation,
|
|
342
|
+
children: [/* @__PURE__ */ jsx(Download, { className: "mr-2 size-4" }), "Export conversation"]
|
|
343
|
+
}) : null, canExportArtifacts ? /* @__PURE__ */ jsxs(Button, {
|
|
344
|
+
className: "rounded-full",
|
|
345
|
+
disabled: exportArtifactsPending,
|
|
346
|
+
type: "button",
|
|
347
|
+
variant: "outline",
|
|
348
|
+
onClick: onExportArtifacts,
|
|
349
|
+
children: [/* @__PURE__ */ jsx(ScrollText, { className: "mr-2 size-4" }), "Export artifacts"]
|
|
350
|
+
}) : null]
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
var AntigravityTranscriptControls = ({ rawJsonDisabled = false, showCommentary, showExtraEvents, showRawJson, showToolCalls, showUserMessages, onShowCommentaryChange, onShowExtraEventsChange, onShowRawJsonChange, onShowToolCallsChange, onShowUserMessagesChange }) => {
|
|
354
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
355
|
+
className: "flex flex-wrap gap-4 rounded-xl border border-[var(--border)] bg-[var(--panel)] px-4 py-3 shadow-[var(--panel-shadow)]",
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ jsxs("div", {
|
|
358
|
+
className: "flex items-center gap-2 text-sm",
|
|
359
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
360
|
+
checked: showToolCalls,
|
|
361
|
+
id: "antigravity-transcript-show-tool-calls",
|
|
362
|
+
onCheckedChange: (checked) => onShowToolCallsChange(checked === true)
|
|
363
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
364
|
+
htmlFor: "antigravity-transcript-show-tool-calls",
|
|
365
|
+
children: "Show tool calls"
|
|
366
|
+
})]
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ jsxs("div", {
|
|
369
|
+
className: "flex items-center gap-2 text-sm",
|
|
370
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
371
|
+
checked: showCommentary,
|
|
372
|
+
id: "antigravity-transcript-show-commentary",
|
|
373
|
+
onCheckedChange: (checked) => onShowCommentaryChange(checked === true)
|
|
374
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
375
|
+
htmlFor: "antigravity-transcript-show-commentary",
|
|
376
|
+
children: "Show commentary"
|
|
377
|
+
})]
|
|
378
|
+
}),
|
|
379
|
+
/* @__PURE__ */ jsxs("div", {
|
|
380
|
+
className: "flex items-center gap-2 text-sm",
|
|
381
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
382
|
+
checked: showExtraEvents,
|
|
383
|
+
id: "antigravity-transcript-show-extra-events",
|
|
384
|
+
onCheckedChange: (checked) => onShowExtraEventsChange(checked === true)
|
|
385
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
386
|
+
htmlFor: "antigravity-transcript-show-extra-events",
|
|
387
|
+
children: "Show extra events"
|
|
388
|
+
})]
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ jsxs("div", {
|
|
391
|
+
className: "flex items-center gap-2 text-sm",
|
|
392
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
393
|
+
checked: showRawJson,
|
|
394
|
+
disabled: rawJsonDisabled,
|
|
395
|
+
id: "antigravity-transcript-show-raw-json",
|
|
396
|
+
onCheckedChange: (checked) => onShowRawJsonChange(checked === true)
|
|
397
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
398
|
+
htmlFor: "antigravity-transcript-show-raw-json",
|
|
399
|
+
children: "Raw JSON"
|
|
400
|
+
})]
|
|
401
|
+
}),
|
|
402
|
+
/* @__PURE__ */ jsxs("div", {
|
|
403
|
+
className: "flex items-center gap-2 text-sm",
|
|
404
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
405
|
+
checked: showUserMessages,
|
|
406
|
+
id: "antigravity-transcript-show-user-messages",
|
|
407
|
+
onCheckedChange: (checked) => onShowUserMessagesChange(checked === true)
|
|
408
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
409
|
+
htmlFor: "antigravity-transcript-show-user-messages",
|
|
410
|
+
children: "User"
|
|
411
|
+
})]
|
|
412
|
+
})
|
|
413
|
+
]
|
|
414
|
+
});
|
|
415
|
+
};
|
|
416
|
+
function EmptyAntigravityTranscript({ detail }) {
|
|
417
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
418
|
+
className: "rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
|
|
419
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
420
|
+
className: "font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]",
|
|
421
|
+
children: "Transcript"
|
|
422
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
423
|
+
className: "mt-4 text-[var(--muted-foreground)] text-sm",
|
|
424
|
+
children: detail.transcriptLocked ? "Unlock Antigravity transcript export to inspect the rendered conversation content here." : detail.artifactsMarkdown ? "No transcript preview is available for this conversation. Generated artifacts are available in the Raw tab." : "No transcript preview is available for this conversation."
|
|
425
|
+
})]
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
function AntigravityRawPanels({ detail, events }) {
|
|
429
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
430
|
+
className: "space-y-4",
|
|
431
|
+
children: [
|
|
432
|
+
/* @__PURE__ */ jsx(JsonPanel, {
|
|
433
|
+
title: "Conversation summary",
|
|
434
|
+
value: detail.conversation
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ jsx(JsonPanel, {
|
|
437
|
+
title: "Transcript events",
|
|
438
|
+
value: events
|
|
439
|
+
}),
|
|
440
|
+
detail.conversationMarkdown ? /* @__PURE__ */ jsx(TextDocumentPanel, {
|
|
441
|
+
content: detail.conversationMarkdown,
|
|
442
|
+
description: "Rendered transcript Markdown used for export.",
|
|
443
|
+
title: "Transcript Markdown"
|
|
444
|
+
}) : null,
|
|
445
|
+
detail.artifactsMarkdown ? /* @__PURE__ */ jsx(TextDocumentPanel, {
|
|
446
|
+
content: detail.artifactsMarkdown,
|
|
447
|
+
description: "Generated artifacts.",
|
|
448
|
+
title: "Artifacts"
|
|
449
|
+
}) : null
|
|
450
|
+
]
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
function AntigravityConversationDetailPage() {
|
|
454
|
+
const decryptionState = useSuspenseQuery(antigravityDecryptionQueryOptions()).data;
|
|
455
|
+
const detail = useSuspenseQuery(antigravityConversationDetailQueryOptions(Route.useParams().conversationId)).data;
|
|
456
|
+
const [showToolCalls, setShowToolCalls] = useState(false);
|
|
457
|
+
const [showCommentary, setShowCommentary] = useState(false);
|
|
458
|
+
const [showExtraEvents, setShowExtraEvents] = useState(false);
|
|
459
|
+
const [showRawJson, setShowRawJson] = useState(false);
|
|
460
|
+
const [showUserMessages, setShowUserMessages] = useState(true);
|
|
461
|
+
const transcriptEvents = useMemo(() => antigravityMarkdownToThreadEvents(detail.conversationMarkdown), [detail.conversationMarkdown]);
|
|
462
|
+
const canExportConversation = canExportAntigravityConversation(detail.conversation, Boolean(decryptionState?.isUnlocked));
|
|
463
|
+
const canExportArtifacts = detail.artifactsMarkdown !== null;
|
|
464
|
+
const showConversationExport = canExportConversation || detail.transcriptLocked;
|
|
465
|
+
const exportConversationMutation = useMutation({
|
|
466
|
+
mutationFn: () => exportAntigravityConversationFn({ data: { conversationId: detail.conversation.conversationId } }),
|
|
467
|
+
onSuccess: (result) => {
|
|
468
|
+
downloadTextFile(result.filename, result.content, "text/markdown; charset=utf-8");
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
const exportArtifactsMutation = useMutation({
|
|
472
|
+
mutationFn: () => exportAntigravityArtifactsFn({ data: { conversationId: detail.conversation.conversationId } }),
|
|
473
|
+
onSuccess: (result) => {
|
|
474
|
+
downloadTextFile(result.filename, result.content, "text/markdown; charset=utf-8");
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
478
|
+
className: "space-y-6",
|
|
479
|
+
children: [
|
|
480
|
+
/* @__PURE__ */ jsx(PageHeader, {
|
|
481
|
+
actions: /* @__PURE__ */ jsx(AntigravityConversationHeaderActions, {
|
|
482
|
+
canExportArtifacts,
|
|
483
|
+
canExportConversation,
|
|
484
|
+
exportArtifactsPending: exportArtifactsMutation.isPending,
|
|
485
|
+
exportConversationPending: exportConversationMutation.isPending,
|
|
486
|
+
showConversationExport,
|
|
487
|
+
onExportArtifacts: () => exportArtifactsMutation.mutate(),
|
|
488
|
+
onExportConversation: () => exportConversationMutation.mutate()
|
|
489
|
+
}),
|
|
490
|
+
breadcrumb: /* @__PURE__ */ jsx(Breadcrumbs, { items: [
|
|
491
|
+
{
|
|
492
|
+
label: "Antigravity",
|
|
493
|
+
to: "/antigravity"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
label: detail.conversation.workspaceLabel,
|
|
497
|
+
params: { workspaceKey: detail.conversation.workspaceKey },
|
|
498
|
+
to: "/antigravity/$workspaceKey"
|
|
499
|
+
},
|
|
500
|
+
{ label: detail.conversation.title }
|
|
501
|
+
] }),
|
|
502
|
+
eyebrow: "Antigravity conversation",
|
|
503
|
+
subtitle: "Conversation detail for the selected Antigravity workspace session.",
|
|
504
|
+
title: detail.conversation.title
|
|
505
|
+
}),
|
|
506
|
+
/* @__PURE__ */ jsx(AntigravityKeychainPanel, {}),
|
|
507
|
+
/* @__PURE__ */ jsxs("div", {
|
|
508
|
+
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
|
|
509
|
+
children: [
|
|
510
|
+
/* @__PURE__ */ jsx(MetricCard, {
|
|
511
|
+
label: "Transcript entries",
|
|
512
|
+
value: formatNumber(detail.conversation.transcriptEntryCount)
|
|
513
|
+
}),
|
|
514
|
+
/* @__PURE__ */ jsx(MetricCard, {
|
|
515
|
+
label: "Artifacts",
|
|
516
|
+
value: formatNumber(detail.conversation.artifactCount)
|
|
517
|
+
}),
|
|
518
|
+
/* @__PURE__ */ jsx(MetricCard, {
|
|
519
|
+
label: "Size",
|
|
520
|
+
value: formatBytes(detail.conversation.conversationBytes)
|
|
521
|
+
}),
|
|
522
|
+
/* @__PURE__ */ jsx(MetricCard, {
|
|
523
|
+
helper: detail.conversation.transcriptSource ?? "summary",
|
|
524
|
+
label: "Indexed items",
|
|
525
|
+
value: formatNumber(detail.conversation.indexedItemCount ?? 0)
|
|
526
|
+
})
|
|
527
|
+
]
|
|
528
|
+
}),
|
|
529
|
+
/* @__PURE__ */ jsxs(Tabs, {
|
|
530
|
+
className: "space-y-4",
|
|
531
|
+
defaultValue: "transcript",
|
|
532
|
+
children: [
|
|
533
|
+
/* @__PURE__ */ jsxs(TabsList, {
|
|
534
|
+
className: "grid w-fit min-w-[24rem] grid-cols-3 rounded-full border border-[var(--border)] bg-[var(--panel)] p-1",
|
|
535
|
+
children: [
|
|
536
|
+
/* @__PURE__ */ jsx(TabsTrigger, {
|
|
537
|
+
className: "rounded-full px-5 text-sm",
|
|
538
|
+
value: "transcript",
|
|
539
|
+
children: "Transcript"
|
|
540
|
+
}),
|
|
541
|
+
/* @__PURE__ */ jsx(TabsTrigger, {
|
|
542
|
+
className: "rounded-full px-5 text-sm",
|
|
543
|
+
value: "metadata",
|
|
544
|
+
children: "Metadata"
|
|
545
|
+
}),
|
|
546
|
+
/* @__PURE__ */ jsx(TabsTrigger, {
|
|
547
|
+
className: "rounded-full px-5 text-sm",
|
|
548
|
+
value: "raw",
|
|
549
|
+
children: "Raw"
|
|
550
|
+
})
|
|
551
|
+
]
|
|
552
|
+
}),
|
|
553
|
+
/* @__PURE__ */ jsxs(TabsContent, {
|
|
554
|
+
className: "space-y-3",
|
|
555
|
+
value: "transcript",
|
|
556
|
+
children: [/* @__PURE__ */ jsx(AntigravityTranscriptControls, {
|
|
557
|
+
rawJsonDisabled: transcriptEvents.length === 0,
|
|
558
|
+
showCommentary,
|
|
559
|
+
showExtraEvents,
|
|
560
|
+
showRawJson,
|
|
561
|
+
showToolCalls,
|
|
562
|
+
showUserMessages,
|
|
563
|
+
onShowCommentaryChange: setShowCommentary,
|
|
564
|
+
onShowExtraEventsChange: setShowExtraEvents,
|
|
565
|
+
onShowRawJsonChange: setShowRawJson,
|
|
566
|
+
onShowToolCallsChange: setShowToolCalls,
|
|
567
|
+
onShowUserMessagesChange: setShowUserMessages
|
|
568
|
+
}), transcriptEvents.length > 0 ? /* @__PURE__ */ jsx(TranscriptView, {
|
|
569
|
+
assistantModel: null,
|
|
570
|
+
events: transcriptEvents,
|
|
571
|
+
projectPath: detail.conversation.workspaceFolder,
|
|
572
|
+
showCommentary,
|
|
573
|
+
showExtraEvents,
|
|
574
|
+
showRawJson,
|
|
575
|
+
showToolCalls,
|
|
576
|
+
showUserMessages
|
|
577
|
+
}) : /* @__PURE__ */ jsx(EmptyAntigravityTranscript, { detail })]
|
|
578
|
+
}),
|
|
579
|
+
/* @__PURE__ */ jsx(TabsContent, {
|
|
580
|
+
value: "metadata",
|
|
581
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
582
|
+
className: "grid gap-4 xl:grid-cols-[0.95fr_1.05fr]",
|
|
583
|
+
children: [/* @__PURE__ */ jsx(MetadataSection, {
|
|
584
|
+
items: buildConversationMetadata(detail),
|
|
585
|
+
title: "Conversation metadata"
|
|
586
|
+
}), /* @__PURE__ */ jsx(MetadataSection, {
|
|
587
|
+
items: buildTranscriptStatsItems(detail, transcriptEvents),
|
|
588
|
+
title: "Transcript stats"
|
|
589
|
+
})]
|
|
590
|
+
})
|
|
591
|
+
}),
|
|
592
|
+
/* @__PURE__ */ jsx(TabsContent, {
|
|
593
|
+
value: "raw",
|
|
594
|
+
children: /* @__PURE__ */ jsx(AntigravityRawPanels, {
|
|
595
|
+
detail,
|
|
596
|
+
events: transcriptEvents
|
|
597
|
+
})
|
|
598
|
+
})
|
|
599
|
+
]
|
|
600
|
+
}),
|
|
601
|
+
exportConversationMutation.isError ? /* @__PURE__ */ jsx("p", {
|
|
602
|
+
className: "text-[var(--destructive)] text-sm",
|
|
603
|
+
children: exportConversationMutation.error instanceof Error ? exportConversationMutation.error.message : "Conversation export failed"
|
|
604
|
+
}) : null,
|
|
605
|
+
exportArtifactsMutation.isError ? /* @__PURE__ */ jsx("p", {
|
|
606
|
+
className: "text-[var(--destructive)] text-sm",
|
|
607
|
+
children: exportArtifactsMutation.error instanceof Error ? exportArtifactsMutation.error.message : "Artifact export failed"
|
|
608
|
+
}) : null
|
|
609
|
+
]
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
//#endregion
|
|
613
|
+
export { AntigravityConversationDetailPage as component };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as antigravityDecryptionQueryOptions, t as antigravityConversationDetailQueryOptions } from "./antigravity-queries-
|
|
1
|
+
import { r as antigravityDecryptionQueryOptions, t as antigravityConversationDetailQueryOptions } from "./antigravity-queries-CGrJO9Vr.js";
|
|
2
2
|
import { t as LoadingPanel } from "./loading-panel-BGFnWseS.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/routes/antigravity-conversations.$conversationId.tsx
|
|
6
6
|
var $$splitErrorComponentImporter = () => import("./antigravity-conversations._conversationId-D426O-64.js");
|
|
7
|
-
var $$splitComponentImporter = () => import("./antigravity-conversations._conversationId-
|
|
7
|
+
var $$splitComponentImporter = () => import("./antigravity-conversations._conversationId-BtexWY-K.js");
|
|
8
8
|
var Route = createFileRoute("/antigravity-conversations/$conversationId")({
|
|
9
9
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
10
10
|
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
|
package/apps/ui/dist/server/assets/{antigravity-db-D9gW1D8G.js → antigravity-db-Bh8_U9uw.js}
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as mapWithConcurrency } from "./concurrency-VXtYvlGh.js";
|
|
1
2
|
import { decryptAntigravitySafeStoragePayload } from "./antigravity-keychain-DOiuHDwK.js";
|
|
2
3
|
import { readdir, stat } from "node:fs/promises";
|
|
3
4
|
import os from "node:os";
|
|
@@ -15,6 +16,9 @@ var getAntigravityBrainDir = (root) => path.join(root, "brain");
|
|
|
15
16
|
var getAntigravitySummaryIndexPath = (root) => path.join(root, "agyhub_summaries_proto.pb");
|
|
16
17
|
//#endregion
|
|
17
18
|
//#region ../../src/lib/antigravity-db.ts
|
|
19
|
+
var ANTIGRAVITY_ARTIFACT_READ_CONCURRENCY = 16;
|
|
20
|
+
var SAFE_CONVERSATION_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu;
|
|
21
|
+
var isSafeConversationId = (value) => SAFE_CONVERSATION_ID_PATTERN.test(value);
|
|
18
22
|
var UNKNOWN_WORKSPACE = {
|
|
19
23
|
workspaceFolder: null,
|
|
20
24
|
workspaceKey: "unknown",
|
|
@@ -281,13 +285,10 @@ var readArtifactsForRoot = async (root) => {
|
|
|
281
285
|
}
|
|
282
286
|
const artifactsByConversation = /* @__PURE__ */ new Map();
|
|
283
287
|
for (const entry of entries) {
|
|
284
|
-
if (!entry.isDirectory()) continue;
|
|
288
|
+
if (!entry.isDirectory() || !isSafeConversationId(entry.name)) continue;
|
|
285
289
|
const artifactDir = path.join(brainDir, entry.name);
|
|
286
|
-
const
|
|
287
|
-
for (const
|
|
288
|
-
if (!file.isFile() || !file.name.endsWith(".md")) continue;
|
|
289
|
-
const artifact = await readArtifactCandidate(root, path.join(artifactDir, file.name), file.name);
|
|
290
|
-
if (!artifact) continue;
|
|
290
|
+
const artifacts = await mapWithConcurrency((await readdir(artifactDir, { withFileTypes: true }).catch(() => [])).filter((file) => file.isFile() && file.name.endsWith(".md")), ANTIGRAVITY_ARTIFACT_READ_CONCURRENCY, (file) => readArtifactCandidate(root, path.join(artifactDir, file.name), file.name));
|
|
291
|
+
for (const artifact of artifacts) if (artifact) {
|
|
291
292
|
const list = artifactsByConversation.get(entry.name) ?? [];
|
|
292
293
|
list.push(artifact);
|
|
293
294
|
artifactsByConversation.set(entry.name, list);
|
|
@@ -506,7 +507,10 @@ var logEntryHeading = (entry) => {
|
|
|
506
507
|
const source = getString(entry.source);
|
|
507
508
|
const type = getString(entry.type);
|
|
508
509
|
if (source?.startsWith("USER")) return "User";
|
|
509
|
-
if (source === "MODEL")
|
|
510
|
+
if (source === "MODEL") {
|
|
511
|
+
if (type && type !== "PLANNER_RESPONSE") return `Tool: ${type}`;
|
|
512
|
+
return "Assistant";
|
|
513
|
+
}
|
|
510
514
|
if (source === "SYSTEM") return "System";
|
|
511
515
|
return type ? `Tool: ${type}` : "Event";
|
|
512
516
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cn } from "./utils-C_uf36nf.js";
|
|
2
2
|
import { t as Button } from "./button-CmTDnzOn.js";
|
|
3
|
-
import { r as antigravityDecryptionQueryOptions, s as unlockAntigravityDecryptionFn } from "./antigravity-queries-
|
|
3
|
+
import { r as antigravityDecryptionQueryOptions, s as unlockAntigravityDecryptionFn } from "./antigravity-queries-CGrJO9Vr.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
import { KeyRound, LockKeyhole, ShieldCheck, TriangleAlert } from "lucide-react";
|