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.
- 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-Cj-v-uyB.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-CBNOYZwJ.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-BIdYNy68.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-DcLyBBwd.js → antigravity-keychain-panel-CC7FLmAK.js} +1 -1
- package/apps/ui/dist/server/assets/{antigravity-queries-CgQhlQ7J.js → antigravity-queries-CGrJO9Vr.js} +6 -6
- package/apps/ui/dist/server/assets/{antigravity-server-DFUx4Khk.js → antigravity-server-CHRjVFqN.js} +11 -11
- package/apps/ui/dist/server/assets/{antigravity._workspaceKey-DnSlSC-C.js → antigravity._workspaceKey-B0QeYUOh.js} +2 -2
- package/apps/ui/dist/server/assets/{antigravity._workspaceKey-D42ixtzp.js → antigravity._workspaceKey-C3kP-qyN.js} +5 -5
- package/apps/ui/dist/server/assets/{antigravity.index-DZVT-cac.js → antigravity.index-CPCYkqCi.js} +2 -2
- package/apps/ui/dist/server/assets/{codex-queries-eOJGfHQj.js → codex-queries-CtgeZ7VL.js} +16 -14
- package/apps/ui/dist/server/assets/{codex-server-nrETIF--.js → codex-server-CNXSJuc2.js} +105 -120
- package/apps/ui/dist/server/assets/concurrency-VXtYvlGh.js +18 -0
- package/apps/ui/dist/server/assets/{createServerRpc-BtXIw2iP.js → createServerRpc-CF_DEwnm.js} +1 -1
- package/apps/ui/dist/server/assets/{createSsrRpc-COf5Zuye.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-BMhuJeUO.js → cursor-queries-NCIM0Nat.js} +13 -11
- 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-BgylIFgn.js → cursor-server-C3q7hrp-.js} +70 -41
- package/apps/ui/dist/server/assets/{cursor-threads._composerId-DXffY_CK.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-BP2J1x_x.js → cursor._workspaceKey-C5PdTaKB.js} +2 -2
- package/apps/ui/dist/server/assets/{cursor._workspaceKey-BQd0e-Pd.js → cursor._workspaceKey-Ckj7apKI.js} +11 -9
- package/apps/ui/dist/server/assets/{cursor.index-CQVxtCm8.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-B3lHh1La.js +5 -0
- package/apps/ui/dist/server/assets/{export-dialog-DaPlOGFT.js → export-dialog-BItjWgkZ.js} +53 -11
- package/apps/ui/dist/server/assets/{projects._project-DUN3iWfg.js → projects._project-Bpbc3C-L.js} +5 -3
- package/apps/ui/dist/server/assets/{projects._project-Dim9Y0kD.js → projects._project-CvZho6EQ.js} +42 -12
- package/apps/ui/dist/server/assets/{projects.index-DjSQK5dm.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-DrDgc-LD.js → router-6m-ihwqA.js} +78 -62
- package/apps/ui/dist/server/assets/{routes-B-GlEe2C.js → routes-Bsact1uB.js} +2 -2
- package/apps/ui/dist/server/assets/{routes-CNHAUMwo.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-CJzm4KrZ.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 +340 -218
- 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/src/spiracha.ts +20 -1
- package/apps/ui/dist/client/assets/analytics-B_hYz65v.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-qiyygB7e.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-z1SQC2Kg.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-keychain-panel-dYuRWtCf.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-CliqUr7o.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-CnoBzyX6.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-CakfZz_E.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-DY7M1KhG.js +0 -1
- package/apps/ui/dist/client/assets/badge-aHE9ETVe.js +0 -1
- package/apps/ui/dist/client/assets/checkbox-DN3XnJaA.js +0 -1
- package/apps/ui/dist/client/assets/cursor-threads._composerId-BMQyx8qG.js +0 -1
- package/apps/ui/dist/client/assets/cursor-threads._composerId-BTlaA-tV.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-CrgrfevV.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-bYS2syGL.js +0 -1
- package/apps/ui/dist/client/assets/cursor.index-CTqZMPYU.js +0 -1
- package/apps/ui/dist/client/assets/cursor.index-Clsz4E_e.js +0 -2
- package/apps/ui/dist/client/assets/delete-confirm-dialog-DTpzBiNK.js +0 -11
- package/apps/ui/dist/client/assets/dist-BNAn99Pu.js +0 -1
- package/apps/ui/dist/client/assets/download-P3Rp23Ad.js +0 -1
- package/apps/ui/dist/client/assets/dropdown-menu-3qB5j9nt.js +0 -1
- package/apps/ui/dist/client/assets/es2015-Dwm_turD.js +0 -41
- package/apps/ui/dist/client/assets/export-dialog-CazdrASq.js +0 -1
- package/apps/ui/dist/client/assets/formatters-BdnWuM1z.js +0 -1
- package/apps/ui/dist/client/assets/index-BVFnfS78.js +0 -22
- package/apps/ui/dist/client/assets/json-panel-DLkS30sQ.js +0 -1
- package/apps/ui/dist/client/assets/metadata-section-jnIkB7dB.js +0 -1
- package/apps/ui/dist/client/assets/metric-card-CBZuWLzQ.js +0 -1
- package/apps/ui/dist/client/assets/page-header-CnD21cPn.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-BLszwvYL.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-DvLxYbvk.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-COn8woBR.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-DYs98skV.js +0 -3
- package/apps/ui/dist/client/assets/refresh-ccw-BDrYXjtD.js +0 -1
- package/apps/ui/dist/client/assets/reload-error-panel-DLAg0AW2.js +0 -1
- package/apps/ui/dist/client/assets/routes-BtF5-coe.js +0 -1
- package/apps/ui/dist/client/assets/scroll-text-CqaFm9by.js +0 -1
- package/apps/ui/dist/client/assets/select-DbnpwqL6.js +0 -1
- package/apps/ui/dist/client/assets/settings-CGX3VleN.js +0 -1
- package/apps/ui/dist/client/assets/styles-Ch0r3kMZ.css +0 -1
- package/apps/ui/dist/client/assets/text-document-panel-DPleOmmq.js +0 -1
- package/apps/ui/dist/client/assets/text-filter-7M6wRo-t.js +0 -2
- package/apps/ui/dist/client/assets/threads._threadId-D5w76IB-.js +0 -7
- package/apps/ui/dist/client/assets/threads._threadId-Dx85sI9P.js +0 -1
- package/apps/ui/dist/client/assets/useMutation-MZ3Hr9h9.js +0 -1
- package/apps/ui/dist/client/assets/useQuery-Cb4V0AT0.js +0 -1
- package/apps/ui/dist/server/assets/__23tanstack-start-plugin-adapters-BzCA6dXo.js +0 -5
- package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CBbkUXw6.js +0 -227
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-B9Rm4EXh.js +0 -212
- package/apps/ui/dist/server/assets/cursor-threads._composerId-BsxFKzoJ.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-HeKLHD9b.js +0 -4
- package/apps/ui/dist/server/assets/text-document-panel-D8JbQWAn.js +0 -23
- package/apps/ui/dist/server/assets/threads._threadId-DODTYddm.js +0 -1052
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
import { t as Button } from "./button-CmTDnzOn.js";
|
|
2
|
+
import { i as deleteCursorThreadsFn, o as exportCursorThreadFn, t as cursorThreadDetailQueryOptions } from "./cursor-queries-NCIM0Nat.js";
|
|
3
|
+
import { t as Route } from "./cursor-threads._composerId-BPJFWfJj.js";
|
|
4
|
+
import { t as Checkbox } from "./checkbox-C0hovF41.js";
|
|
5
|
+
import { t as MetricCard } from "./metric-card-ByEeLu0r.js";
|
|
6
|
+
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
7
|
+
import { i as formatList, n as formatBytes, o as formatNumber, r as formatDateTime } from "./formatters-FJaGZgJk.js";
|
|
8
|
+
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";
|
|
9
|
+
import { n as downloadUrlFile, t as downloadTextFile } from "./download-DMmiy1xf.js";
|
|
10
|
+
import { t as DeleteConfirmDialog } from "./delete-confirm-dialog-BcBNCxWB.js";
|
|
11
|
+
import { t as ExportDialog } from "./export-dialog-BItjWgkZ.js";
|
|
12
|
+
import { useMemo, useState } from "react";
|
|
13
|
+
import { Link, useNavigate } from "@tanstack/react-router";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
|
|
16
|
+
import { Download, Trash2 } from "lucide-react";
|
|
17
|
+
//#region src/lib/cursor-transcript-events.ts
|
|
18
|
+
var toTimestamp = (value) => {
|
|
19
|
+
if (value === null || !Number.isFinite(value)) return null;
|
|
20
|
+
return new Date(value).toISOString();
|
|
21
|
+
};
|
|
22
|
+
var toolCallToJson = (toolCall) => {
|
|
23
|
+
if (!toolCall) return null;
|
|
24
|
+
return {
|
|
25
|
+
argumentsText: toolCall.argumentsText,
|
|
26
|
+
callId: toolCall.callId,
|
|
27
|
+
name: toolCall.name,
|
|
28
|
+
resultText: toolCall.resultText,
|
|
29
|
+
status: toolCall.status
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
var buildBubbleRaw = (bubble, eventType, extra = {}) => ({
|
|
33
|
+
bubbleId: bubble.bubbleId,
|
|
34
|
+
createdAtMs: bubble.createdAtMs,
|
|
35
|
+
eventType,
|
|
36
|
+
kind: bubble.kind,
|
|
37
|
+
source: "cursor_bubble",
|
|
38
|
+
text: bubble.text,
|
|
39
|
+
thinking: bubble.thinking,
|
|
40
|
+
toolCall: toolCallToJson(bubble.toolCall),
|
|
41
|
+
...extra
|
|
42
|
+
});
|
|
43
|
+
var buildMessageEvent = (bubble, sequence, role, text, phase) => ({
|
|
44
|
+
isHiddenByDefault: false,
|
|
45
|
+
kind: "message",
|
|
46
|
+
memoryCitation: null,
|
|
47
|
+
model: null,
|
|
48
|
+
phase,
|
|
49
|
+
raw: buildBubbleRaw(bubble, phase === "commentary" ? "thinking" : "message"),
|
|
50
|
+
role,
|
|
51
|
+
sequence,
|
|
52
|
+
text,
|
|
53
|
+
timestamp: toTimestamp(bubble.createdAtMs),
|
|
54
|
+
variant: role === "user" ? "user_message" : "agent_message"
|
|
55
|
+
});
|
|
56
|
+
var buildToolCallCommand = (toolCall) => {
|
|
57
|
+
if (!toolCall.argumentsText?.trim()) return toolCall.name;
|
|
58
|
+
return `${toolCall.name}\n${toolCall.argumentsText}`;
|
|
59
|
+
};
|
|
60
|
+
var buildToolCallEvent = (bubble, sequence, toolCall) => ({
|
|
61
|
+
argumentsParseFailed: false,
|
|
62
|
+
argumentsText: toolCall.argumentsText,
|
|
63
|
+
callId: toolCall.callId,
|
|
64
|
+
command: buildToolCallCommand(toolCall),
|
|
65
|
+
kind: "tool_call",
|
|
66
|
+
name: toolCall.name,
|
|
67
|
+
raw: buildBubbleRaw(bubble, "tool_call", {
|
|
68
|
+
argumentsText: toolCall.argumentsText,
|
|
69
|
+
callId: toolCall.callId,
|
|
70
|
+
name: toolCall.name,
|
|
71
|
+
status: toolCall.status
|
|
72
|
+
}),
|
|
73
|
+
sequence,
|
|
74
|
+
timestamp: toTimestamp(bubble.createdAtMs),
|
|
75
|
+
workdir: null
|
|
76
|
+
});
|
|
77
|
+
var buildToolOutputEvent = (bubble, sequence, toolCall) => {
|
|
78
|
+
const outputText = toolCall.resultText?.trim();
|
|
79
|
+
if (!outputText) return null;
|
|
80
|
+
return {
|
|
81
|
+
callId: toolCall.callId,
|
|
82
|
+
exitCode: null,
|
|
83
|
+
kind: "tool_output",
|
|
84
|
+
outputText,
|
|
85
|
+
raw: buildBubbleRaw(bubble, "tool_output", {
|
|
86
|
+
callId: toolCall.callId,
|
|
87
|
+
name: toolCall.name,
|
|
88
|
+
resultText: outputText,
|
|
89
|
+
status: toolCall.status
|
|
90
|
+
}),
|
|
91
|
+
sequence,
|
|
92
|
+
summary: outputText,
|
|
93
|
+
timestamp: toTimestamp(bubble.createdAtMs),
|
|
94
|
+
wallTime: null
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
var getAssistantFinalTextIndexes = (bubbles) => {
|
|
98
|
+
const finalTextIndexes = /* @__PURE__ */ new Set();
|
|
99
|
+
let currentAssistantTextIndex = null;
|
|
100
|
+
const flushAssistantRun = () => {
|
|
101
|
+
if (currentAssistantTextIndex !== null) {
|
|
102
|
+
finalTextIndexes.add(currentAssistantTextIndex);
|
|
103
|
+
currentAssistantTextIndex = null;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
bubbles.forEach((bubble, index) => {
|
|
107
|
+
if (bubble.kind !== "assistant") {
|
|
108
|
+
flushAssistantRun();
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (bubble.text.trim()) currentAssistantTextIndex = index;
|
|
112
|
+
});
|
|
113
|
+
flushAssistantRun();
|
|
114
|
+
return finalTextIndexes;
|
|
115
|
+
};
|
|
116
|
+
var cursorBubbleToThreadEvents = (bubble, bubbleIndex, finalTextIndexes) => {
|
|
117
|
+
if (bubble.kind !== "assistant" && bubble.kind !== "user") return [];
|
|
118
|
+
const baseSequence = bubbleIndex * 10;
|
|
119
|
+
const events = [];
|
|
120
|
+
if (bubble.kind === "assistant" && bubble.thinking?.trim()) events.push(buildMessageEvent(bubble, baseSequence, "assistant", bubble.thinking.trim(), "commentary"));
|
|
121
|
+
if (bubble.text.trim()) {
|
|
122
|
+
const phase = bubble.kind === "assistant" ? finalTextIndexes.has(bubbleIndex) ? "final_answer" : "commentary" : null;
|
|
123
|
+
events.push(buildMessageEvent(bubble, baseSequence + 1, bubble.kind, bubble.text, phase));
|
|
124
|
+
}
|
|
125
|
+
if (bubble.kind === "assistant" && bubble.toolCall) {
|
|
126
|
+
events.push(buildToolCallEvent(bubble, baseSequence + 2, bubble.toolCall));
|
|
127
|
+
const output = buildToolOutputEvent(bubble, baseSequence + 3, bubble.toolCall);
|
|
128
|
+
if (output) events.push(output);
|
|
129
|
+
}
|
|
130
|
+
return events;
|
|
131
|
+
};
|
|
132
|
+
var cursorTranscriptToThreadEvents = (transcript) => {
|
|
133
|
+
const finalTextIndexes = getAssistantFinalTextIndexes(transcript.bubbles);
|
|
134
|
+
return transcript.bubbles.flatMap((bubble, index) => cursorBubbleToThreadEvents(bubble, index, finalTextIndexes));
|
|
135
|
+
};
|
|
136
|
+
var updateMessageStats = (stats, event) => {
|
|
137
|
+
stats.messageCount += 1;
|
|
138
|
+
if (event.role === "assistant") stats.assistantMessageCount += 1;
|
|
139
|
+
if (event.role === "user") stats.userMessageCount += 1;
|
|
140
|
+
if (event.phase === "commentary") stats.commentaryCount += 1;
|
|
141
|
+
if (event.phase === "final_answer") stats.finalAnswerCount += 1;
|
|
142
|
+
};
|
|
143
|
+
var updateCursorStats = (stats, event) => {
|
|
144
|
+
switch (event.kind) {
|
|
145
|
+
case "message":
|
|
146
|
+
updateMessageStats(stats, event);
|
|
147
|
+
break;
|
|
148
|
+
case "tool_call":
|
|
149
|
+
stats.toolCallCount += 1;
|
|
150
|
+
break;
|
|
151
|
+
case "tool_output":
|
|
152
|
+
stats.toolOutputCount += 1;
|
|
153
|
+
break;
|
|
154
|
+
case "web_search":
|
|
155
|
+
stats.webSearchEventCount += 1;
|
|
156
|
+
break;
|
|
157
|
+
default: break;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
var getCursorThreadTranscriptStats = (events) => {
|
|
161
|
+
const stats = {
|
|
162
|
+
assistantMessageCount: 0,
|
|
163
|
+
commentaryCount: 0,
|
|
164
|
+
execCommandCount: 0,
|
|
165
|
+
finalAnswerCount: 0,
|
|
166
|
+
messageCount: 0,
|
|
167
|
+
toolCallCount: 0,
|
|
168
|
+
toolOutputCount: 0,
|
|
169
|
+
userMessageCount: 0,
|
|
170
|
+
webSearchEventCount: 0
|
|
171
|
+
};
|
|
172
|
+
for (const event of events) updateCursorStats(stats, event);
|
|
173
|
+
return stats;
|
|
174
|
+
};
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/routes/cursor-threads.$composerId.tsx?tsr-split=component
|
|
177
|
+
var buildCursorThreadMetadata = (detail) => {
|
|
178
|
+
return [
|
|
179
|
+
{
|
|
180
|
+
label: "Composer ID",
|
|
181
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
182
|
+
"data-mono": "true",
|
|
183
|
+
children: detail.thread.composerId
|
|
184
|
+
})
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
label: "Workspace",
|
|
188
|
+
value: /* @__PURE__ */ jsx(Link, {
|
|
189
|
+
className: "text-[var(--accent)]",
|
|
190
|
+
params: { workspaceKey: detail.thread.workspaceKey },
|
|
191
|
+
to: "/cursor/$workspaceKey",
|
|
192
|
+
children: detail.thread.workspaceLabel
|
|
193
|
+
})
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: "Workspace key",
|
|
197
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
198
|
+
"data-mono": "true",
|
|
199
|
+
children: detail.thread.workspaceKey
|
|
200
|
+
})
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
label: "Mode",
|
|
204
|
+
value: detail.thread.mode ?? "unknown"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
label: "Created",
|
|
208
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
209
|
+
suppressHydrationWarning: true,
|
|
210
|
+
children: formatDateTime(detail.thread.createdAtMs)
|
|
211
|
+
})
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
label: "Updated",
|
|
215
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
216
|
+
suppressHydrationWarning: true,
|
|
217
|
+
children: formatDateTime(detail.thread.lastUpdatedAtMs)
|
|
218
|
+
})
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: "Transcript dirs",
|
|
222
|
+
value: detail.thread.transcriptDirs.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
223
|
+
className: "space-y-1",
|
|
224
|
+
children: detail.thread.transcriptDirs.map((directory) => /* @__PURE__ */ jsx("div", {
|
|
225
|
+
"data-mono": "true",
|
|
226
|
+
children: directory
|
|
227
|
+
}, directory))
|
|
228
|
+
}) : "n/a"
|
|
229
|
+
}
|
|
230
|
+
];
|
|
231
|
+
};
|
|
232
|
+
var buildCursorTranscriptStatsItems = (detail, events, stats) => {
|
|
233
|
+
if (!detail.transcript) return [{
|
|
234
|
+
label: "Transcript load",
|
|
235
|
+
value: "No renderable Cursor transcript content was found."
|
|
236
|
+
}];
|
|
237
|
+
return [
|
|
238
|
+
{
|
|
239
|
+
label: "Event kinds",
|
|
240
|
+
value: formatList([...new Set(events.map((event) => event.kind))])
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
label: "Messages",
|
|
244
|
+
value: formatNumber(stats.messageCount)
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
label: "User messages",
|
|
248
|
+
value: formatNumber(stats.userMessageCount)
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
label: "Assistant messages",
|
|
252
|
+
value: formatNumber(stats.assistantMessageCount)
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
label: "Commentary updates",
|
|
256
|
+
value: formatNumber(stats.commentaryCount)
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
label: "Tool calls",
|
|
260
|
+
value: formatNumber(stats.toolCallCount)
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
label: "Tool outputs",
|
|
264
|
+
value: formatNumber(stats.toolOutputCount)
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
label: "Renderable bubbles",
|
|
268
|
+
value: formatNumber(detail.transcript.renderableBubbleCount)
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
label: "Omitted bubbles",
|
|
272
|
+
value: formatNumber(detail.transcript.omittedBubbleCount)
|
|
273
|
+
}
|
|
274
|
+
];
|
|
275
|
+
};
|
|
276
|
+
var CursorTranscriptControls = ({ rawJsonDisabled = false, showCommentary, showExtraEvents, showRawJson, showToolCalls, showUserMessages, onShowCommentaryChange, onShowExtraEventsChange, onShowRawJsonChange, onShowToolCallsChange, onShowUserMessagesChange }) => {
|
|
277
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
278
|
+
className: "flex flex-wrap gap-4 rounded-xl border border-[var(--border)] bg-[var(--panel)] px-4 py-3 shadow-[var(--panel-shadow)]",
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ jsxs("div", {
|
|
281
|
+
className: "flex items-center gap-2 text-sm",
|
|
282
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
283
|
+
checked: showToolCalls,
|
|
284
|
+
id: "cursor-transcript-show-tool-calls",
|
|
285
|
+
onCheckedChange: (checked) => onShowToolCallsChange(checked === true)
|
|
286
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
287
|
+
htmlFor: "cursor-transcript-show-tool-calls",
|
|
288
|
+
children: "Show tool calls"
|
|
289
|
+
})]
|
|
290
|
+
}),
|
|
291
|
+
/* @__PURE__ */ jsxs("div", {
|
|
292
|
+
className: "flex items-center gap-2 text-sm",
|
|
293
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
294
|
+
checked: showCommentary,
|
|
295
|
+
id: "cursor-transcript-show-commentary",
|
|
296
|
+
onCheckedChange: (checked) => onShowCommentaryChange(checked === true)
|
|
297
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
298
|
+
htmlFor: "cursor-transcript-show-commentary",
|
|
299
|
+
children: "Show commentary"
|
|
300
|
+
})]
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ jsxs("div", {
|
|
303
|
+
className: "flex items-center gap-2 text-sm",
|
|
304
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
305
|
+
checked: showExtraEvents,
|
|
306
|
+
id: "cursor-transcript-show-extra-events",
|
|
307
|
+
onCheckedChange: (checked) => onShowExtraEventsChange(checked === true)
|
|
308
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
309
|
+
htmlFor: "cursor-transcript-show-extra-events",
|
|
310
|
+
children: "Show extra events"
|
|
311
|
+
})]
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ jsxs("div", {
|
|
314
|
+
className: "flex items-center gap-2 text-sm",
|
|
315
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
316
|
+
checked: showRawJson,
|
|
317
|
+
disabled: rawJsonDisabled,
|
|
318
|
+
id: "cursor-transcript-show-raw-json",
|
|
319
|
+
onCheckedChange: (checked) => onShowRawJsonChange(checked === true)
|
|
320
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
321
|
+
htmlFor: "cursor-transcript-show-raw-json",
|
|
322
|
+
children: "Raw JSON"
|
|
323
|
+
})]
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ jsxs("div", {
|
|
326
|
+
className: "flex items-center gap-2 text-sm",
|
|
327
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
328
|
+
checked: showUserMessages,
|
|
329
|
+
id: "cursor-transcript-show-user-messages",
|
|
330
|
+
onCheckedChange: (checked) => onShowUserMessagesChange(checked === true)
|
|
331
|
+
}), /* @__PURE__ */ jsx("label", {
|
|
332
|
+
htmlFor: "cursor-transcript-show-user-messages",
|
|
333
|
+
children: "User"
|
|
334
|
+
})]
|
|
335
|
+
})
|
|
336
|
+
]
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
var CursorThreadMetadataPanels = ({ detail, events, stats }) => {
|
|
340
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
341
|
+
className: "grid gap-4 xl:grid-cols-[1.1fr_0.9fr]",
|
|
342
|
+
children: [/* @__PURE__ */ jsx(MetadataSection, {
|
|
343
|
+
items: buildCursorThreadMetadata(detail),
|
|
344
|
+
title: "Thread metadata"
|
|
345
|
+
}), /* @__PURE__ */ jsx(MetadataSection, {
|
|
346
|
+
items: buildCursorTranscriptStatsItems(detail, events, stats),
|
|
347
|
+
title: "Transcript stats"
|
|
348
|
+
})]
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
var CursorThreadRawPanels = ({ detail, events }) => {
|
|
352
|
+
if (!detail.transcript) return /* @__PURE__ */ jsx("div", {
|
|
353
|
+
className: "rounded-xl border border-[var(--border)] bg-[var(--panel)] px-5 py-4 text-sm",
|
|
354
|
+
children: "No Cursor transcript payload was found for this thread."
|
|
355
|
+
});
|
|
356
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
357
|
+
className: "space-y-4",
|
|
358
|
+
children: [
|
|
359
|
+
/* @__PURE__ */ jsx(JsonPanel, {
|
|
360
|
+
title: "Thread summary",
|
|
361
|
+
value: detail.thread
|
|
362
|
+
}),
|
|
363
|
+
/* @__PURE__ */ jsx(JsonPanel, {
|
|
364
|
+
title: "Transcript head",
|
|
365
|
+
value: detail.transcript.head
|
|
366
|
+
}),
|
|
367
|
+
/* @__PURE__ */ jsx(JsonPanel, {
|
|
368
|
+
title: "Cursor bubbles",
|
|
369
|
+
value: detail.transcript.bubbles
|
|
370
|
+
}),
|
|
371
|
+
/* @__PURE__ */ jsx(JsonPanel, {
|
|
372
|
+
title: "Transcript events",
|
|
373
|
+
value: events
|
|
374
|
+
})
|
|
375
|
+
]
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
var CursorThreadDetailPage = () => {
|
|
379
|
+
const navigate = useNavigate();
|
|
380
|
+
const queryClient = useQueryClient();
|
|
381
|
+
const detail = useSuspenseQuery(cursorThreadDetailQueryOptions(Route.useParams().composerId)).data;
|
|
382
|
+
const [pendingDelete, setPendingDelete] = useState(false);
|
|
383
|
+
const [pendingExport, setPendingExport] = useState(false);
|
|
384
|
+
const [showToolCalls, setShowToolCalls] = useState(false);
|
|
385
|
+
const [showCommentary, setShowCommentary] = useState(false);
|
|
386
|
+
const [showExtraEvents, setShowExtraEvents] = useState(false);
|
|
387
|
+
const [showRawJson, setShowRawJson] = useState(false);
|
|
388
|
+
const [showUserMessages, setShowUserMessages] = useState(true);
|
|
389
|
+
const transcriptEvents = useMemo(() => detail.transcript ? cursorTranscriptToThreadEvents(detail.transcript) : [], [detail.transcript]);
|
|
390
|
+
const transcriptStats = useMemo(() => getCursorThreadTranscriptStats(transcriptEvents), [transcriptEvents]);
|
|
391
|
+
const deleteThreadMutation = useMutation({
|
|
392
|
+
mutationFn: () => deleteCursorThreadsFn({ data: { composerIds: [detail.thread.composerId] } }),
|
|
393
|
+
onSuccess: async () => {
|
|
394
|
+
await navigate({
|
|
395
|
+
params: { workspaceKey: detail.thread.workspaceKey },
|
|
396
|
+
to: "/cursor/$workspaceKey"
|
|
397
|
+
});
|
|
398
|
+
await Promise.all([
|
|
399
|
+
queryClient.invalidateQueries({ queryKey: ["cursor-thread", detail.thread.composerId] }),
|
|
400
|
+
queryClient.invalidateQueries({ queryKey: ["cursor-threads", detail.thread.workspaceKey] }),
|
|
401
|
+
queryClient.invalidateQueries({ queryKey: ["cursor-workspaces"] })
|
|
402
|
+
]);
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
const exportThreadMutation = useMutation({
|
|
406
|
+
mutationFn: async (options) => {
|
|
407
|
+
const download = await exportCursorThreadFn({ data: {
|
|
408
|
+
...options,
|
|
409
|
+
composerId: detail.thread.composerId
|
|
410
|
+
} });
|
|
411
|
+
if (download.mode === "download") {
|
|
412
|
+
downloadTextFile(download.fileName, download.content, download.mimeType);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
await downloadUrlFile(download.fileName, download.downloadUrl);
|
|
416
|
+
},
|
|
417
|
+
onSuccess: () => {
|
|
418
|
+
setPendingExport(false);
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
422
|
+
className: "space-y-6",
|
|
423
|
+
children: [
|
|
424
|
+
/* @__PURE__ */ jsx(PageHeader, {
|
|
425
|
+
actions: /* @__PURE__ */ jsxs("div", {
|
|
426
|
+
className: "flex flex-wrap gap-2",
|
|
427
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
428
|
+
className: "rounded-full",
|
|
429
|
+
type: "button",
|
|
430
|
+
variant: "outline",
|
|
431
|
+
onClick: () => setPendingExport(true),
|
|
432
|
+
children: [/* @__PURE__ */ jsx(Download, { className: "mr-2 size-4" }), "Export"]
|
|
433
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
434
|
+
className: "rounded-full border-[var(--destructive)]/20 text-[var(--destructive)]",
|
|
435
|
+
type: "button",
|
|
436
|
+
variant: "outline",
|
|
437
|
+
onClick: () => setPendingDelete(true),
|
|
438
|
+
children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4" }), "Delete"]
|
|
439
|
+
})]
|
|
440
|
+
}),
|
|
441
|
+
breadcrumb: /* @__PURE__ */ jsx(Breadcrumbs, { items: [
|
|
442
|
+
{
|
|
443
|
+
label: "Cursor",
|
|
444
|
+
to: "/cursor"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
label: detail.thread.workspaceLabel,
|
|
448
|
+
params: { workspaceKey: detail.thread.workspaceKey },
|
|
449
|
+
to: "/cursor/$workspaceKey"
|
|
450
|
+
},
|
|
451
|
+
{ label: detail.thread.name }
|
|
452
|
+
] }),
|
|
453
|
+
eyebrow: "Cursor thread",
|
|
454
|
+
subtitle: "Thread detail for the selected Cursor workspace conversation.",
|
|
455
|
+
title: detail.thread.name
|
|
456
|
+
}),
|
|
457
|
+
/* @__PURE__ */ jsxs("div", {
|
|
458
|
+
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
|
|
459
|
+
children: [
|
|
460
|
+
/* @__PURE__ */ jsx(MetricCard, {
|
|
461
|
+
label: "Messages",
|
|
462
|
+
value: formatNumber(detail.thread.bubbleCount)
|
|
463
|
+
}),
|
|
464
|
+
/* @__PURE__ */ jsx(MetricCard, {
|
|
465
|
+
label: "Size",
|
|
466
|
+
value: formatBytes(detail.thread.bubbleBytes)
|
|
467
|
+
}),
|
|
468
|
+
/* @__PURE__ */ jsx(MetricCard, {
|
|
469
|
+
label: "Mode",
|
|
470
|
+
value: detail.thread.mode ?? "unknown"
|
|
471
|
+
}),
|
|
472
|
+
/* @__PURE__ */ jsx(MetricCard, {
|
|
473
|
+
helper: `${formatNumber(detail.transcript?.renderableBubbleCount ?? 0)} renderable`,
|
|
474
|
+
label: "Omitted",
|
|
475
|
+
value: formatNumber(detail.transcript?.omittedBubbleCount ?? 0)
|
|
476
|
+
})
|
|
477
|
+
]
|
|
478
|
+
}),
|
|
479
|
+
/* @__PURE__ */ jsxs(Tabs, {
|
|
480
|
+
className: "space-y-4",
|
|
481
|
+
defaultValue: "transcript",
|
|
482
|
+
children: [
|
|
483
|
+
/* @__PURE__ */ jsxs(TabsList, {
|
|
484
|
+
className: "grid w-fit min-w-[24rem] grid-cols-3 rounded-full border border-[var(--border)] bg-[var(--panel)] p-1",
|
|
485
|
+
children: [
|
|
486
|
+
/* @__PURE__ */ jsx(TabsTrigger, {
|
|
487
|
+
className: "rounded-full px-5 text-sm",
|
|
488
|
+
value: "transcript",
|
|
489
|
+
children: "Transcript"
|
|
490
|
+
}),
|
|
491
|
+
/* @__PURE__ */ jsx(TabsTrigger, {
|
|
492
|
+
className: "rounded-full px-5 text-sm",
|
|
493
|
+
value: "metadata",
|
|
494
|
+
children: "Metadata"
|
|
495
|
+
}),
|
|
496
|
+
/* @__PURE__ */ jsx(TabsTrigger, {
|
|
497
|
+
className: "rounded-full px-5 text-sm",
|
|
498
|
+
value: "raw",
|
|
499
|
+
children: "Raw"
|
|
500
|
+
})
|
|
501
|
+
]
|
|
502
|
+
}),
|
|
503
|
+
/* @__PURE__ */ jsxs(TabsContent, {
|
|
504
|
+
className: "space-y-3",
|
|
505
|
+
value: "transcript",
|
|
506
|
+
children: [/* @__PURE__ */ jsx(CursorTranscriptControls, {
|
|
507
|
+
rawJsonDisabled: !detail.transcript,
|
|
508
|
+
showCommentary,
|
|
509
|
+
showExtraEvents,
|
|
510
|
+
showRawJson,
|
|
511
|
+
showToolCalls,
|
|
512
|
+
showUserMessages,
|
|
513
|
+
onShowCommentaryChange: setShowCommentary,
|
|
514
|
+
onShowExtraEventsChange: setShowExtraEvents,
|
|
515
|
+
onShowRawJsonChange: setShowRawJson,
|
|
516
|
+
onShowToolCallsChange: setShowToolCalls,
|
|
517
|
+
onShowUserMessagesChange: setShowUserMessages
|
|
518
|
+
}), detail.transcript && transcriptEvents.length > 0 ? /* @__PURE__ */ jsx(TranscriptView, {
|
|
519
|
+
assistantModel: null,
|
|
520
|
+
events: transcriptEvents,
|
|
521
|
+
projectPath: null,
|
|
522
|
+
showCommentary,
|
|
523
|
+
showExtraEvents,
|
|
524
|
+
showRawJson,
|
|
525
|
+
showToolCalls,
|
|
526
|
+
showUserMessages
|
|
527
|
+
}) : /* @__PURE__ */ jsxs("section", {
|
|
528
|
+
className: "rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
|
|
529
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
530
|
+
className: "font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]",
|
|
531
|
+
children: "Transcript"
|
|
532
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
533
|
+
className: "mt-4 text-[var(--muted-foreground)] text-sm",
|
|
534
|
+
children: "No renderable Cursor transcript content was found for this thread."
|
|
535
|
+
})]
|
|
536
|
+
})]
|
|
537
|
+
}),
|
|
538
|
+
/* @__PURE__ */ jsx(TabsContent, {
|
|
539
|
+
value: "metadata",
|
|
540
|
+
children: /* @__PURE__ */ jsx(CursorThreadMetadataPanels, {
|
|
541
|
+
detail,
|
|
542
|
+
events: transcriptEvents,
|
|
543
|
+
stats: transcriptStats
|
|
544
|
+
})
|
|
545
|
+
}),
|
|
546
|
+
/* @__PURE__ */ jsx(TabsContent, {
|
|
547
|
+
value: "raw",
|
|
548
|
+
children: /* @__PURE__ */ jsx(CursorThreadRawPanels, {
|
|
549
|
+
detail,
|
|
550
|
+
events: transcriptEvents
|
|
551
|
+
})
|
|
552
|
+
})
|
|
553
|
+
]
|
|
554
|
+
}),
|
|
555
|
+
/* @__PURE__ */ jsx(DeleteConfirmDialog, {
|
|
556
|
+
confirmLabel: deleteThreadMutation.isPending ? "Deleting..." : "Delete thread",
|
|
557
|
+
description: `Permanently delete "${detail.thread.name}" from Cursor's database and remove any on-disk transcript directories. Quit Cursor first. This cannot be undone.`,
|
|
558
|
+
errorMessage: deleteThreadMutation.isError ? deleteThreadMutation.error instanceof Error ? deleteThreadMutation.error.message : "Delete failed" : null,
|
|
559
|
+
open: pendingDelete,
|
|
560
|
+
title: "Delete Cursor thread?",
|
|
561
|
+
onConfirm: () => deleteThreadMutation.mutate(),
|
|
562
|
+
onOpenChange: (nextOpen) => {
|
|
563
|
+
setPendingDelete(nextOpen);
|
|
564
|
+
if (!nextOpen) deleteThreadMutation.reset();
|
|
565
|
+
}
|
|
566
|
+
}),
|
|
567
|
+
/* @__PURE__ */ jsx(ExportDialog, {
|
|
568
|
+
errorMessage: exportThreadMutation.isError ? exportThreadMutation.error instanceof Error ? exportThreadMutation.error.message : "Export failed" : null,
|
|
569
|
+
open: pendingExport,
|
|
570
|
+
pending: exportThreadMutation.isPending,
|
|
571
|
+
title: `Export ${detail.thread.name}`,
|
|
572
|
+
onExport: (options) => exportThreadMutation.mutate(options),
|
|
573
|
+
onOpenChange: (nextOpen) => {
|
|
574
|
+
setPendingExport(nextOpen);
|
|
575
|
+
if (!nextOpen) exportThreadMutation.reset();
|
|
576
|
+
}
|
|
577
|
+
})
|
|
578
|
+
]
|
|
579
|
+
});
|
|
580
|
+
};
|
|
581
|
+
//#endregion
|
|
582
|
+
export { CursorThreadDetailPage as component };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as cursorThreadsQueryOptions, r as cursorWorkspacesQueryOptions } from "./cursor-queries-
|
|
1
|
+
import { n as cursorThreadsQueryOptions, r as cursorWorkspacesQueryOptions } from "./cursor-queries-NCIM0Nat.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";
|
|
@@ -11,7 +11,7 @@ var findWorkspaceOrThrow = (workspaces, workspaceKey) => {
|
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/routes/cursor.$workspaceKey.tsx
|
|
13
13
|
var $$splitErrorComponentImporter = () => import("./cursor._workspaceKey-nmg3YIOQ.js");
|
|
14
|
-
var $$splitComponentImporter = () => import("./cursor._workspaceKey-
|
|
14
|
+
var $$splitComponentImporter = () => import("./cursor._workspaceKey-Ckj7apKI.js");
|
|
15
15
|
var Route = createFileRoute("/cursor/$workspaceKey")({
|
|
16
16
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
17
17
|
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as Button } from "./button-CmTDnzOn.js";
|
|
2
|
-
import { a as deleteCursorWorkspaceFn, c as recoverCursorWorkspaceFn, i as deleteCursorThreadsFn, n as cursorThreadsQueryOptions, o as exportCursorThreadFn, r as cursorWorkspacesQueryOptions, s as exportCursorThreadsFn } from "./cursor-queries-
|
|
3
|
-
import { n as findWorkspaceOrThrow, t as Route } from "./cursor._workspaceKey-
|
|
2
|
+
import { a as deleteCursorWorkspaceFn, c as recoverCursorWorkspaceFn, i as deleteCursorThreadsFn, n as cursorThreadsQueryOptions, o as exportCursorThreadFn, r as cursorWorkspacesQueryOptions, s as exportCursorThreadsFn } from "./cursor-queries-NCIM0Nat.js";
|
|
3
|
+
import { n as findWorkspaceOrThrow, t as Route } from "./cursor._workspaceKey-C5PdTaKB.js";
|
|
4
4
|
import { t as DataTable } from "./data-table-Cdct823O.js";
|
|
5
5
|
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
6
6
|
import { n as formatBytes, o as formatNumber, r as formatDateTime } from "./formatters-FJaGZgJk.js";
|
|
7
|
-
import { t as downloadTextFile } from "./download-DMmiy1xf.js";
|
|
7
|
+
import { n as downloadUrlFile, t as downloadTextFile } from "./download-DMmiy1xf.js";
|
|
8
8
|
import { i as DropdownMenuTrigger, n as DropdownMenuContent, r as DropdownMenuItem, t as DropdownMenu } from "./dropdown-menu-Dy_9t6TN.js";
|
|
9
9
|
import { n as ListSearchInput, t as matchesTextQuery } from "./text-filter-CGKxMCKt.js";
|
|
10
|
-
import { t as DeleteConfirmDialog } from "./delete-confirm-dialog-
|
|
11
|
-
import { t as ExportDialog } from "./export-dialog-
|
|
10
|
+
import { t as DeleteConfirmDialog } from "./delete-confirm-dialog-BcBNCxWB.js";
|
|
11
|
+
import { t as ExportDialog } from "./export-dialog-BItjWgkZ.js";
|
|
12
12
|
import { useDeferredValue, useMemo, useState } from "react";
|
|
13
13
|
import { Link, useNavigate } from "@tanstack/react-router";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -200,9 +200,6 @@ var getCursorDeleteTitle = (pendingDelete) => {
|
|
|
200
200
|
if (pendingDelete && pendingDelete.threads.length > 1) return `Delete ${pendingDelete.threads.length} Cursor threads?`;
|
|
201
201
|
return "Delete Cursor thread?";
|
|
202
202
|
};
|
|
203
|
-
var getCursorExportMimeType = (outputFormat) => {
|
|
204
|
-
return outputFormat === "md" ? "text/markdown; charset=utf-8" : "text/plain; charset=utf-8";
|
|
205
|
-
};
|
|
206
203
|
var CursorWorkspacePage = () => {
|
|
207
204
|
const navigate = useNavigate();
|
|
208
205
|
const params = Route.useParams();
|
|
@@ -247,7 +244,11 @@ var CursorWorkspacePage = () => {
|
|
|
247
244
|
...options,
|
|
248
245
|
composerIds: pendingExport.composerIds
|
|
249
246
|
} });
|
|
250
|
-
|
|
247
|
+
if (download.mode === "download") {
|
|
248
|
+
downloadTextFile(download.fileName, download.content, download.mimeType);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
await downloadUrlFile(download.fileName, download.downloadUrl);
|
|
251
252
|
},
|
|
252
253
|
onSuccess: () => {
|
|
253
254
|
setPendingExport(null);
|
|
@@ -318,6 +319,7 @@ var CursorWorkspacePage = () => {
|
|
|
318
319
|
}
|
|
319
320
|
}),
|
|
320
321
|
/* @__PURE__ */ jsx(ExportDialog, {
|
|
322
|
+
forceZipArchive: pendingExport ? pendingExport.composerIds.length > 1 : false,
|
|
321
323
|
open: pendingExport !== null,
|
|
322
324
|
pending: exportMutation.isPending,
|
|
323
325
|
title: pendingExport ? `Export ${pendingExport.label}` : "Export thread",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as Button } from "./button-CmTDnzOn.js";
|
|
2
|
-
import { a as deleteCursorWorkspaceFn, c as recoverCursorWorkspaceFn, r as cursorWorkspacesQueryOptions } from "./cursor-queries-
|
|
2
|
+
import { a as deleteCursorWorkspaceFn, c as recoverCursorWorkspaceFn, r as cursorWorkspacesQueryOptions } from "./cursor-queries-NCIM0Nat.js";
|
|
3
3
|
import { t as DataTable } from "./data-table-Cdct823O.js";
|
|
4
4
|
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
5
5
|
import { o as formatNumber, r as formatDateTime } from "./formatters-FJaGZgJk.js";
|
|
6
6
|
import { t as Badge } from "./badge-EvdhKK_Z.js";
|
|
7
7
|
import { i as DropdownMenuTrigger, n as DropdownMenuContent, r as DropdownMenuItem, t as DropdownMenu } from "./dropdown-menu-Dy_9t6TN.js";
|
|
8
8
|
import { n as ListSearchInput, t as matchesTextQuery } from "./text-filter-CGKxMCKt.js";
|
|
9
|
-
import { t as DeleteConfirmDialog } from "./delete-confirm-dialog-
|
|
9
|
+
import { t as DeleteConfirmDialog } from "./delete-confirm-dialog-BcBNCxWB.js";
|
|
10
10
|
import { useDeferredValue, useState } from "react";
|
|
11
11
|
import { Link } from "@tanstack/react-router";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -86,7 +86,7 @@ function AlertDialogCancel({ className, variant = "outline", size = "default", .
|
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/components/delete-confirm-dialog.tsx
|
|
89
|
-
function DeleteConfirmDialog({ confirmLabel = "Delete", defaultDeleteSessionFiles = false, description, open, showDeleteSessionFilesOption = false, title, onConfirm, onOpenChange }) {
|
|
89
|
+
function DeleteConfirmDialog({ confirmLabel = "Delete", defaultDeleteSessionFiles = false, description, errorMessage = null, open, showDeleteSessionFilesOption = false, title, onConfirm, onOpenChange }) {
|
|
90
90
|
const checkboxId = useId();
|
|
91
91
|
const checkboxDescriptionId = useId();
|
|
92
92
|
const [deleteSessionFiles, setDeleteSessionFiles] = useState(defaultDeleteSessionFiles);
|
|
@@ -124,6 +124,10 @@ function DeleteConfirmDialog({ confirmLabel = "Delete", defaultDeleteSessionFile
|
|
|
124
124
|
})]
|
|
125
125
|
})]
|
|
126
126
|
}) : null,
|
|
127
|
+
errorMessage ? /* @__PURE__ */ jsx("p", {
|
|
128
|
+
className: "text-[var(--destructive)] text-sm",
|
|
129
|
+
children: errorMessage
|
|
130
|
+
}) : null,
|
|
127
131
|
/* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
|
|
128
132
|
className: "border-[var(--border)]",
|
|
129
133
|
children: "Cancel"
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region ../../node_modules/.bun/@tanstack+start-server-core@1.169.14/node_modules/@tanstack/start-server-core/dist/esm/empty-plugin-adapters.js
|
|
2
|
+
var pluginSerializationAdapters = [];
|
|
3
|
+
var hasPluginAdapters = false;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { hasPluginAdapters, pluginSerializationAdapters };
|