spiracha 1.3.2 → 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.
Files changed (160) hide show
  1. package/AGENTS.md +7 -1
  2. package/README.md +6 -0
  3. package/apps/ui/AGENTS.md +8 -0
  4. package/apps/ui/README.md +10 -3
  5. package/apps/ui/dist/client/assets/analytics-DK2jdvmI.js +1 -0
  6. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-DmD0sN8X.js +7 -0
  7. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-KAcXtNxI.js +1 -0
  8. package/apps/ui/dist/client/assets/antigravity-keychain-panel-BRHVjFAM.js +1 -0
  9. package/apps/ui/dist/client/assets/antigravity._workspaceKey-ByitGWki.js +1 -0
  10. package/apps/ui/dist/client/assets/antigravity._workspaceKey-CGV7amas.js +1 -0
  11. package/apps/ui/dist/client/assets/antigravity.index-DEEkjlZa.js +1 -0
  12. package/apps/ui/dist/client/assets/antigravity.index-DgW25FEV.js +1 -0
  13. package/apps/ui/dist/client/assets/badge-DfWvPfKF.js +1 -0
  14. package/apps/ui/dist/client/assets/checkbox-CdHitXWQ.js +1 -0
  15. package/apps/ui/dist/client/assets/createServerFn-CgRRVpBH.js +3 -0
  16. package/apps/ui/dist/client/assets/cursor-threads._composerId-CmBFclK8.js +1 -0
  17. package/apps/ui/dist/client/assets/cursor-threads._composerId-Ti2gTm63.js +1 -0
  18. package/apps/ui/dist/client/assets/cursor._workspaceKey-CaAZjGmm.js +1 -0
  19. package/apps/ui/dist/client/assets/cursor._workspaceKey-DzD_c6j9.js +1 -0
  20. package/apps/ui/dist/client/assets/cursor.index-CrnMwDCi.js +1 -0
  21. package/apps/ui/dist/client/assets/cursor.index-PkCFVcl4.js +2 -0
  22. package/apps/ui/dist/client/assets/{data-table-Cj-v-uyB.js → data-table-Br78_dk3.js} +2 -2
  23. package/apps/ui/dist/client/assets/delete-confirm-dialog-BHRmyLHr.js +11 -0
  24. package/apps/ui/dist/client/assets/dist-B9pyYCVU.js +1 -0
  25. package/apps/ui/dist/client/assets/dist-BhZOxAPP.js +1 -0
  26. package/apps/ui/dist/client/assets/dist-DvMS2965.js +1 -0
  27. package/apps/ui/dist/client/assets/download-Bf0QJKD3.js +1 -0
  28. package/apps/ui/dist/client/assets/dropdown-menu-Dy5cLzTy.js +1 -0
  29. package/apps/ui/dist/client/assets/es2015-BkCWttyM.js +41 -0
  30. package/apps/ui/dist/client/assets/export-dialog-C86SYHJn.js +1 -0
  31. package/apps/ui/dist/client/assets/formatters-BM9kB7ed.js +1 -0
  32. package/apps/ui/dist/client/assets/index-CPvAP-jk.js +149 -0
  33. package/apps/ui/dist/client/assets/jsx-runtime-DGeXAQPT.js +1 -0
  34. package/apps/ui/dist/client/assets/metric-card-Dplm0ZiM.js +1 -0
  35. package/apps/ui/dist/client/assets/page-header-Cwa3p6Tl.js +1 -0
  36. package/apps/ui/dist/client/assets/projects._project-Ckf6muWZ.js +1 -0
  37. package/apps/ui/dist/client/assets/projects._project-DSDwH4NF.js +1 -0
  38. package/apps/ui/dist/client/assets/projects.index-DEfhWqa8.js +1 -0
  39. package/apps/ui/dist/client/assets/projects.index-V5ibNZII.js +3 -0
  40. package/apps/ui/dist/client/assets/react-dom-DL96Jor4.js +1 -0
  41. package/apps/ui/dist/client/assets/refresh-ccw-BgKjOiA6.js +1 -0
  42. package/apps/ui/dist/client/assets/reload-error-panel-AHqu0akK.js +1 -0
  43. package/apps/ui/dist/client/assets/routes-Df2tgpyd.js +1 -0
  44. package/apps/ui/dist/client/assets/scroll-text-fM0sMOB3.js +1 -0
  45. package/apps/ui/dist/client/assets/select-Bf2GwfPR.js +1 -0
  46. package/apps/ui/dist/client/assets/settings-5VQIzME0.js +1 -0
  47. package/apps/ui/dist/client/assets/sqlite-error-B6uZjUe8.js +1 -0
  48. package/apps/ui/dist/client/assets/styles-BhRkXgwB.css +1 -0
  49. package/apps/ui/dist/client/assets/tabs-OO4VU5KR.js +7 -0
  50. package/apps/ui/dist/client/assets/text-filter-DVAZySUS.js +2 -0
  51. package/apps/ui/dist/client/assets/threads._threadId-BB9tTsV4.js +1 -0
  52. package/apps/ui/dist/client/assets/threads._threadId-BgDhFj2I.js +1 -0
  53. package/apps/ui/dist/client/assets/useMutation-CC_B7uy5.js +1 -0
  54. package/apps/ui/dist/client/assets/useQuery-C5By6WKU.js +1 -0
  55. package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CRW2kqj0.js +232 -0
  56. package/apps/ui/dist/server/assets/analytics-CYP_LT5Y.js +16 -0
  57. package/apps/ui/dist/server/assets/{analytics-CBNOYZwJ.js → analytics-CtpOMVMO.js} +13 -6
  58. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-BtexWY-K.js +613 -0
  59. package/apps/ui/dist/server/assets/{antigravity-conversations._conversationId-BIdYNy68.js → antigravity-conversations._conversationId-zMrR6v6R.js} +2 -2
  60. package/apps/ui/dist/server/assets/{antigravity-db-D9gW1D8G.js → antigravity-db-Bh8_U9uw.js} +11 -7
  61. package/apps/ui/dist/server/assets/{antigravity-keychain-panel-DcLyBBwd.js → antigravity-keychain-panel-CC7FLmAK.js} +1 -1
  62. package/apps/ui/dist/server/assets/{antigravity-queries-CgQhlQ7J.js → antigravity-queries-CGrJO9Vr.js} +6 -6
  63. package/apps/ui/dist/server/assets/{antigravity-server-DFUx4Khk.js → antigravity-server-CHRjVFqN.js} +11 -11
  64. package/apps/ui/dist/server/assets/{antigravity._workspaceKey-DnSlSC-C.js → antigravity._workspaceKey-B0QeYUOh.js} +2 -2
  65. package/apps/ui/dist/server/assets/{antigravity._workspaceKey-D42ixtzp.js → antigravity._workspaceKey-C3kP-qyN.js} +5 -5
  66. package/apps/ui/dist/server/assets/{antigravity.index-DZVT-cac.js → antigravity.index-CPCYkqCi.js} +2 -2
  67. package/apps/ui/dist/server/assets/{codex-queries-eOJGfHQj.js → codex-queries-CtgeZ7VL.js} +16 -14
  68. package/apps/ui/dist/server/assets/{codex-server-nrETIF--.js → codex-server-CNXSJuc2.js} +105 -120
  69. package/apps/ui/dist/server/assets/concurrency-VXtYvlGh.js +18 -0
  70. package/apps/ui/dist/server/assets/{createServerRpc-BtXIw2iP.js → createServerRpc-CF_DEwnm.js} +1 -1
  71. package/apps/ui/dist/server/assets/{createSsrRpc-COf5Zuye.js → createSsrRpc-C754NPki.js} +1 -1
  72. package/apps/ui/dist/server/assets/{cursor-db-B7agkAvM.js → cursor-db-cYZEU3WQ.js} +194 -7
  73. package/apps/ui/dist/server/assets/{cursor-queries-BMhuJeUO.js → cursor-queries-NCIM0Nat.js} +13 -11
  74. package/apps/ui/dist/server/assets/{cursor-recovery-9bJLs7vG.js → cursor-recovery-nq-kR62j.js} +1 -1
  75. package/apps/ui/dist/server/assets/{cursor-server-BgylIFgn.js → cursor-server-C3q7hrp-.js} +70 -41
  76. package/apps/ui/dist/server/assets/{cursor-threads._composerId-DXffY_CK.js → cursor-threads._composerId-BPJFWfJj.js} +2 -2
  77. package/apps/ui/dist/server/assets/cursor-threads._composerId-BkMMTQ3v.js +582 -0
  78. package/apps/ui/dist/server/assets/{cursor._workspaceKey-BP2J1x_x.js → cursor._workspaceKey-C5PdTaKB.js} +2 -2
  79. package/apps/ui/dist/server/assets/{cursor._workspaceKey-BQd0e-Pd.js → cursor._workspaceKey-Ckj7apKI.js} +11 -9
  80. package/apps/ui/dist/server/assets/{cursor.index-CQVxtCm8.js → cursor.index-DkWT-mxw.js} +2 -2
  81. package/apps/ui/dist/server/assets/{delete-confirm-dialog-PCD7S0_M.js → delete-confirm-dialog-BcBNCxWB.js} +5 -1
  82. package/apps/ui/dist/server/assets/empty-plugin-adapters-B3lHh1La.js +5 -0
  83. package/apps/ui/dist/server/assets/{export-dialog-DaPlOGFT.js → export-dialog-BItjWgkZ.js} +53 -11
  84. package/apps/ui/dist/server/assets/{projects._project-DUN3iWfg.js → projects._project-Bpbc3C-L.js} +5 -3
  85. package/apps/ui/dist/server/assets/{projects._project-Dim9Y0kD.js → projects._project-CvZho6EQ.js} +42 -12
  86. package/apps/ui/dist/server/assets/{projects.index-DjSQK5dm.js → projects.index-BkLiF2FF.js} +21 -7
  87. package/apps/ui/dist/server/assets/projects.index-DesYXwfi.js +14 -0
  88. package/apps/ui/dist/server/assets/route-search-ts4W9MJ9.js +38 -0
  89. package/apps/ui/dist/server/assets/{router-DrDgc-LD.js → router-6m-ihwqA.js} +78 -62
  90. package/apps/ui/dist/server/assets/{routes-B-GlEe2C.js → routes-Bsact1uB.js} +2 -2
  91. package/apps/ui/dist/server/assets/{routes-CNHAUMwo.js → routes-BzkJgq4W.js} +2 -2
  92. package/apps/ui/dist/server/assets/start-CI_0bSiY.js +4 -0
  93. package/apps/ui/dist/server/assets/tabs-CGA13IZM.js +502 -0
  94. package/apps/ui/dist/server/assets/{threads._threadId-CJzm4KrZ.js → threads._threadId-Bs0yuqO9.js} +2 -2
  95. package/apps/ui/dist/server/assets/threads._threadId-D2GYkVn6.js +639 -0
  96. package/apps/ui/dist/server/assets/ui-export-files-BHLX9bhN.js +83 -0
  97. package/apps/ui/dist/server/server.js +340 -218
  98. package/package.json +9 -9
  99. package/src/lib/antigravity-db.ts +20 -13
  100. package/src/lib/codex-analytics.ts +118 -18
  101. package/src/lib/codex-browser-db.ts +1 -25
  102. package/src/lib/codex-browser-export.ts +9 -69
  103. package/src/lib/cursor-db.ts +318 -7
  104. package/src/lib/cursor-exporter.ts +2 -2
  105. package/src/lib/ui-cache.ts +14 -1
  106. package/src/spiracha.ts +20 -1
  107. package/apps/ui/dist/client/assets/analytics-B_hYz65v.js +0 -1
  108. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-qiyygB7e.js +0 -1
  109. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-z1SQC2Kg.js +0 -1
  110. package/apps/ui/dist/client/assets/antigravity-keychain-panel-dYuRWtCf.js +0 -1
  111. package/apps/ui/dist/client/assets/antigravity._workspaceKey-CliqUr7o.js +0 -1
  112. package/apps/ui/dist/client/assets/antigravity._workspaceKey-CnoBzyX6.js +0 -1
  113. package/apps/ui/dist/client/assets/antigravity.index-CakfZz_E.js +0 -1
  114. package/apps/ui/dist/client/assets/antigravity.index-DY7M1KhG.js +0 -1
  115. package/apps/ui/dist/client/assets/badge-aHE9ETVe.js +0 -1
  116. package/apps/ui/dist/client/assets/checkbox-DN3XnJaA.js +0 -1
  117. package/apps/ui/dist/client/assets/cursor-threads._composerId-BMQyx8qG.js +0 -1
  118. package/apps/ui/dist/client/assets/cursor-threads._composerId-BTlaA-tV.js +0 -1
  119. package/apps/ui/dist/client/assets/cursor._workspaceKey-CrgrfevV.js +0 -1
  120. package/apps/ui/dist/client/assets/cursor._workspaceKey-bYS2syGL.js +0 -1
  121. package/apps/ui/dist/client/assets/cursor.index-CTqZMPYU.js +0 -1
  122. package/apps/ui/dist/client/assets/cursor.index-Clsz4E_e.js +0 -2
  123. package/apps/ui/dist/client/assets/delete-confirm-dialog-DTpzBiNK.js +0 -11
  124. package/apps/ui/dist/client/assets/dist-BNAn99Pu.js +0 -1
  125. package/apps/ui/dist/client/assets/download-P3Rp23Ad.js +0 -1
  126. package/apps/ui/dist/client/assets/dropdown-menu-3qB5j9nt.js +0 -1
  127. package/apps/ui/dist/client/assets/es2015-Dwm_turD.js +0 -41
  128. package/apps/ui/dist/client/assets/export-dialog-CazdrASq.js +0 -1
  129. package/apps/ui/dist/client/assets/formatters-BdnWuM1z.js +0 -1
  130. package/apps/ui/dist/client/assets/index-BVFnfS78.js +0 -22
  131. package/apps/ui/dist/client/assets/json-panel-DLkS30sQ.js +0 -1
  132. package/apps/ui/dist/client/assets/metadata-section-jnIkB7dB.js +0 -1
  133. package/apps/ui/dist/client/assets/metric-card-CBZuWLzQ.js +0 -1
  134. package/apps/ui/dist/client/assets/page-header-CnD21cPn.js +0 -1
  135. package/apps/ui/dist/client/assets/projects._project-BLszwvYL.js +0 -1
  136. package/apps/ui/dist/client/assets/projects._project-DvLxYbvk.js +0 -1
  137. package/apps/ui/dist/client/assets/projects.index-COn8woBR.js +0 -1
  138. package/apps/ui/dist/client/assets/projects.index-DYs98skV.js +0 -3
  139. package/apps/ui/dist/client/assets/refresh-ccw-BDrYXjtD.js +0 -1
  140. package/apps/ui/dist/client/assets/reload-error-panel-DLAg0AW2.js +0 -1
  141. package/apps/ui/dist/client/assets/routes-BtF5-coe.js +0 -1
  142. package/apps/ui/dist/client/assets/scroll-text-CqaFm9by.js +0 -1
  143. package/apps/ui/dist/client/assets/select-DbnpwqL6.js +0 -1
  144. package/apps/ui/dist/client/assets/settings-CGX3VleN.js +0 -1
  145. package/apps/ui/dist/client/assets/styles-Ch0r3kMZ.css +0 -1
  146. package/apps/ui/dist/client/assets/text-document-panel-DPleOmmq.js +0 -1
  147. package/apps/ui/dist/client/assets/text-filter-7M6wRo-t.js +0 -2
  148. package/apps/ui/dist/client/assets/threads._threadId-D5w76IB-.js +0 -7
  149. package/apps/ui/dist/client/assets/threads._threadId-Dx85sI9P.js +0 -1
  150. package/apps/ui/dist/client/assets/useMutation-MZ3Hr9h9.js +0 -1
  151. package/apps/ui/dist/client/assets/useQuery-Cb4V0AT0.js +0 -1
  152. package/apps/ui/dist/server/assets/__23tanstack-start-plugin-adapters-BzCA6dXo.js +0 -5
  153. package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CBbkUXw6.js +0 -227
  154. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-B9Rm4EXh.js +0 -212
  155. package/apps/ui/dist/server/assets/cursor-threads._composerId-BsxFKzoJ.js +0 -218
  156. package/apps/ui/dist/server/assets/json-panel-RYsxWFae.js +0 -16
  157. package/apps/ui/dist/server/assets/metadata-section-D6Lbc7D6.js +0 -54
  158. package/apps/ui/dist/server/assets/start-HeKLHD9b.js +0 -4
  159. package/apps/ui/dist/server/assets/text-document-panel-D8JbQWAn.js +0 -23
  160. package/apps/ui/dist/server/assets/threads._threadId-DODTYddm.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-CgQhlQ7J.js";
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-B9Rm4EXh.js");
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"),
@@ -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 files = await readdir(artifactDir, { withFileTypes: true }).catch(() => []);
287
- for (const file of files) {
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") return "Assistant";
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-CgQhlQ7J.js";
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";