@blade-hq/agent-kit 0.5.31 → 0.5.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BUQRNLEE.js → chunk-CFW62YND.js} +3 -3
- package/dist/{chunk-KMQQDKGU.js → chunk-EAZ7AGFY.js} +19 -3
- package/dist/chunk-EAZ7AGFY.js.map +1 -0
- package/dist/{chunk-HFVB57MR.js → chunk-FXEELOLI.js} +16 -11
- package/dist/{chunk-HFVB57MR.js.map → chunk-FXEELOLI.js.map} +1 -1
- package/dist/{chunk-OPMRX65X.js → chunk-QMOW3TDA.js} +9 -3
- package/dist/chunk-QMOW3TDA.js.map +1 -0
- package/dist/{chunk-4XBNTPVS.js → chunk-YPFIWC45.js} +2 -2
- package/dist/client/index.d.ts +117 -0
- package/dist/react/api/vibe-coding.js +1 -1
- package/dist/react/components/chat/index.js +4 -4
- package/dist/react/components/plan/index.js +3 -3
- package/dist/react/components/session/index.js +2 -2
- package/dist/react/components/workspace/index.js +2 -2
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.js +7 -5
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-KMQQDKGU.js.map +0 -1
- package/dist/chunk-OPMRX65X.js.map +0 -1
- /package/dist/{chunk-BUQRNLEE.js.map → chunk-CFW62YND.js.map} +0 -0
- /package/dist/{chunk-4XBNTPVS.js.map → chunk-YPFIWC45.js.map} +0 -0
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getSessionFilePath,
|
|
7
7
|
resolveSessionFilePreviewTarget
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EAZ7AGFY.js";
|
|
9
9
|
import {
|
|
10
10
|
formatToolName,
|
|
11
11
|
getAuthedUrl,
|
|
12
12
|
useUiStore
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QMOW3TDA.js";
|
|
14
14
|
import {
|
|
15
15
|
cn,
|
|
16
16
|
copyToClipboard
|
|
@@ -1933,4 +1933,4 @@ export {
|
|
|
1933
1933
|
PlanSummaryCard,
|
|
1934
1934
|
extractLatestPlanMessages
|
|
1935
1935
|
};
|
|
1936
|
-
//# sourceMappingURL=chunk-
|
|
1936
|
+
//# sourceMappingURL=chunk-CFW62YND.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
apiFetchResponse,
|
|
3
3
|
getAuthedUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QMOW3TDA.js";
|
|
5
5
|
|
|
6
6
|
// src/react/lib/session-file-preview.ts
|
|
7
7
|
var IMAGE_EXTS = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "svg", "webp", "ico", "bmp"]);
|
|
@@ -11,6 +11,7 @@ var PPT_EXTS = /* @__PURE__ */ new Set(["pptx", "ppt"]);
|
|
|
11
11
|
var CSV_EXTS = /* @__PURE__ */ new Set(["csv"]);
|
|
12
12
|
var MARKDOWN_EXTS = /* @__PURE__ */ new Set(["md", "markdown"]);
|
|
13
13
|
var HTML_EXTS = /* @__PURE__ */ new Set(["html", "htm"]);
|
|
14
|
+
var OFFICE_PDF_EXTS = /* @__PURE__ */ new Set(["vsdx", "vsd", "odt", "ods", "odp", "odg", "rtf", "wps", "wpd"]);
|
|
14
15
|
function getExt(fileName) {
|
|
15
16
|
return fileName.split(".").pop()?.toLowerCase() ?? "";
|
|
16
17
|
}
|
|
@@ -20,6 +21,9 @@ function getDisplayFileName(filePath, fileName) {
|
|
|
20
21
|
function getSessionFilePath(sessionId, filePath) {
|
|
21
22
|
return `/api/sessions/${sessionId}/files/${encodeURIComponent(filePath)}`;
|
|
22
23
|
}
|
|
24
|
+
function getSessionPreviewPdfPath(sessionId, filePath) {
|
|
25
|
+
return `/api/sessions/${sessionId}/preview-pdf/${encodeURIComponent(filePath)}`;
|
|
26
|
+
}
|
|
23
27
|
function getSessionFileDownloadUrl(sessionId, filePath) {
|
|
24
28
|
return getAuthedUrl(getSessionFilePath(sessionId, filePath));
|
|
25
29
|
}
|
|
@@ -55,7 +59,18 @@ function buildBinaryPreviewTarget(fileUrl, downloadUrl, filePath, fileName) {
|
|
|
55
59
|
function buildSessionBinaryPreviewTarget(sessionId, filePath, fileName) {
|
|
56
60
|
const fileUrl = getSessionFilePath(sessionId, filePath);
|
|
57
61
|
const downloadUrl = getSessionFileDownloadUrl(sessionId, filePath);
|
|
58
|
-
|
|
62
|
+
const common = buildBinaryPreviewTarget(fileUrl, downloadUrl, filePath, fileName);
|
|
63
|
+
if (common) return common;
|
|
64
|
+
const resolvedFileName = getDisplayFileName(filePath, fileName);
|
|
65
|
+
const ext = getExt(resolvedFileName);
|
|
66
|
+
if (OFFICE_PDF_EXTS.has(ext)) {
|
|
67
|
+
const pdfUrl = getAuthedUrl(getSessionPreviewPdfPath(sessionId, filePath));
|
|
68
|
+
return { type: "pdf", content: pdfUrl, title: resolvedFileName, key: filePath };
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function isOfficePdfPreviewable(fileName) {
|
|
73
|
+
return OFFICE_PDF_EXTS.has(getExt(fileName));
|
|
59
74
|
}
|
|
60
75
|
function resolveTextPreviewType(fileName) {
|
|
61
76
|
const ext = getExt(fileName);
|
|
@@ -98,7 +113,8 @@ export {
|
|
|
98
113
|
getSessionFilePath,
|
|
99
114
|
buildBinaryPreviewTarget,
|
|
100
115
|
buildSessionBinaryPreviewTarget,
|
|
116
|
+
isOfficePdfPreviewable,
|
|
101
117
|
resolveTextPreviewType,
|
|
102
118
|
resolveSessionFilePreviewTarget
|
|
103
119
|
};
|
|
104
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-EAZ7AGFY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react/lib/session-file-preview.ts"],"sourcesContent":["import { apiFetchResponse, getAuthedUrl } from \"../api/client\"\nimport type { PreviewTarget } from \"../stores/ui-store\"\n\nconst IMAGE_EXTS = new Set([\"png\", \"jpg\", \"jpeg\", \"gif\", \"svg\", \"webp\", \"ico\", \"bmp\"])\nconst DOCX_EXTS = new Set([\"docx\", \"doc\"])\nconst EXCEL_EXTS = new Set([\"xlsx\", \"xls\", \"xlsm\", \"xlsb\"])\nconst PPT_EXTS = new Set([\"pptx\", \"ppt\"])\nconst CSV_EXTS = new Set([\"csv\"])\nconst MARKDOWN_EXTS = new Set([\"md\", \"markdown\"])\nconst HTML_EXTS = new Set([\"html\", \"htm\"])\n\n/** 需要后端 soffice 转 PDF 才能预览的 Office 格式 */\nconst OFFICE_PDF_EXTS = new Set([\"vsdx\", \"vsd\", \"odt\", \"ods\", \"odp\", \"odg\", \"rtf\", \"wps\", \"wpd\"])\n\nfunction getExt(fileName: string): string {\n return fileName.split(\".\").pop()?.toLowerCase() ?? \"\"\n}\n\nfunction getDisplayFileName(filePath: string, fileName?: string): string {\n return fileName?.trim() || filePath.split(\"/\").pop() || filePath\n}\n\nexport function getSessionFilePath(sessionId: string, filePath: string): string {\n return `/api/sessions/${sessionId}/files/${encodeURIComponent(filePath)}`\n}\n\nfunction getSessionPreviewPdfPath(sessionId: string, filePath: string): string {\n return `/api/sessions/${sessionId}/preview-pdf/${encodeURIComponent(filePath)}`\n}\n\nfunction getSessionFileDownloadUrl(sessionId: string, filePath: string): string {\n return getAuthedUrl(getSessionFilePath(sessionId, filePath))\n}\n\n/**\n * 后端把可解码为 UTF-8 的文件返回为 text/plain,二进制文件返回各自的 MIME。\n * 只有文本类内容才能安全地整体读进内存渲染——其余一律不能读 body。\n */\nfunction isTextualContentType(contentType: string): boolean {\n return (\n contentType.startsWith(\"text/\") ||\n contentType.includes(\"json\") ||\n contentType.includes(\"xml\") ||\n contentType.includes(\"yaml\") ||\n contentType.includes(\"javascript\")\n )\n}\n\nexport function buildBinaryPreviewTarget(\n fileUrl: string,\n downloadUrl: string,\n filePath: string,\n fileName?: string,\n): PreviewTarget | null {\n const resolvedFileName = getDisplayFileName(filePath, fileName)\n const ext = getExt(resolvedFileName)\n\n if (IMAGE_EXTS.has(ext)) {\n return { type: \"image\", content: downloadUrl, title: resolvedFileName, key: filePath }\n }\n\n if (ext === \"pdf\") {\n return { type: \"pdf\", content: downloadUrl, title: resolvedFileName, key: filePath }\n }\n\n if (DOCX_EXTS.has(ext)) {\n return { type: \"docx\", content: downloadUrl, title: resolvedFileName, key: filePath }\n }\n\n if (EXCEL_EXTS.has(ext)) {\n return { type: \"excel\", content: downloadUrl, title: resolvedFileName, key: filePath }\n }\n\n if (PPT_EXTS.has(ext)) {\n return {\n type: \"ppt\",\n content: fileUrl,\n sourceUrl: downloadUrl,\n title: resolvedFileName,\n key: filePath,\n }\n }\n\n return null\n}\n\nexport function buildSessionBinaryPreviewTarget(\n sessionId: string,\n filePath: string,\n fileName?: string,\n): PreviewTarget | null {\n const fileUrl = getSessionFilePath(sessionId, filePath)\n const downloadUrl = getSessionFileDownloadUrl(sessionId, filePath)\n const common = buildBinaryPreviewTarget(fileUrl, downloadUrl, filePath, fileName)\n if (common) return common\n\n // 需要后端 soffice 转 PDF 的 Office 格式(Visio 等)\n const resolvedFileName = getDisplayFileName(filePath, fileName)\n const ext = getExt(resolvedFileName)\n if (OFFICE_PDF_EXTS.has(ext)) {\n const pdfUrl = getAuthedUrl(getSessionPreviewPdfPath(sessionId, filePath))\n return { type: \"pdf\", content: pdfUrl, title: resolvedFileName, key: filePath }\n }\n\n return null\n}\n\n/** 判断文件是否需要后端 soffice 转 PDF 才能预览 */\nexport function isOfficePdfPreviewable(fileName: string): boolean {\n return OFFICE_PDF_EXTS.has(getExt(fileName))\n}\n\nexport function resolveTextPreviewType(fileName: string): PreviewTarget[\"type\"] {\n const ext = getExt(fileName)\n if (MARKDOWN_EXTS.has(ext)) return \"markdown\"\n if (CSV_EXTS.has(ext)) return \"csv\"\n if (HTML_EXTS.has(ext)) return \"html\"\n return \"file\"\n}\n\nexport async function resolveSessionFilePreviewTarget(\n sessionId: string,\n filePath: string,\n fileName?: string,\n): Promise<PreviewTarget> {\n const resolvedFileName = getDisplayFileName(filePath, fileName)\n const binaryTarget = buildSessionBinaryPreviewTarget(sessionId, filePath, resolvedFileName)\n if (binaryTarget) {\n return binaryTarget\n }\n\n const downloadUrl = getSessionFileDownloadUrl(sessionId, filePath)\n\n // 其余文件按后端返回的 Content-Type 分派,而不是猜扩展名:\n // 视频/音频/压缩包等二进制文件绝不能读 body(整体读进内存会卡死页面),\n // 改为把下载 URL 交给原生 <video>/<audio> 流式播放,或回退为下载。\n const res = await apiFetchResponse(getSessionFilePath(sessionId, filePath))\n const contentType = (res.headers.get(\"content-type\") ?? \"\").toLowerCase()\n\n if (contentType.startsWith(\"video/\")) {\n void res.body?.cancel()\n return { type: \"video\", content: downloadUrl, title: resolvedFileName, key: filePath }\n }\n\n if (contentType.startsWith(\"audio/\")) {\n void res.body?.cancel()\n return { type: \"audio\", content: downloadUrl, title: resolvedFileName, key: filePath }\n }\n\n if (!isTextualContentType(contentType)) {\n void res.body?.cancel()\n return { type: \"download\", content: downloadUrl, title: resolvedFileName, key: filePath }\n }\n\n const content = await res.text()\n\n return {\n type: resolveTextPreviewType(resolvedFileName),\n content,\n title: resolvedFileName,\n key: filePath,\n }\n}\n"],"mappings":";;;;;;AAGA,IAAM,aAAa,oBAAI,IAAI,CAAC,OAAO,OAAO,QAAQ,OAAO,OAAO,QAAQ,OAAO,KAAK,CAAC;AACrF,IAAM,YAAY,oBAAI,IAAI,CAAC,QAAQ,KAAK,CAAC;AACzC,IAAM,aAAa,oBAAI,IAAI,CAAC,QAAQ,OAAO,QAAQ,MAAM,CAAC;AAC1D,IAAM,WAAW,oBAAI,IAAI,CAAC,QAAQ,KAAK,CAAC;AACxC,IAAM,WAAW,oBAAI,IAAI,CAAC,KAAK,CAAC;AAChC,IAAM,gBAAgB,oBAAI,IAAI,CAAC,MAAM,UAAU,CAAC;AAChD,IAAM,YAAY,oBAAI,IAAI,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AW,QAAQ;AAKjE,QAAM,MAAM,MAAM,iBAAiB,mBAAmB,WAAW,QAAQ,CAAC;AAC1E,QAAM,eAAe,IAAI,QAAQ,IAAI,cAAc,KAAK,IAAI,YAAY;AAExE,MAAI,YAAY,WAAW,QAAQ,GAAG;AACpC,SAAK,IAAI,MAAM,OAAO;AACtB,WAAO,EAAE,MAAM,SAAS,SAAS,aAAa,OAAO,kBAAkB,KAAK,SAAS;AAAA,EACvF;AAEA,MAAI,YAAY,WAAW,QAAQ,GAAG;AACpC,SAAK,IAAI,MAAM,OAAO;AACtB,WAAO,EAAE,MAAM,SAAS,SAAS,aAAa,OAAO,kBAAkB,KAAK,SAAS;AAAA,EACvF;AAEA,MAAI,CAAC,qBAAqB,WAAW,GAAG;AACtC,SAAK,IAAI,MAAM,OAAO;AACtB,WAAO,EAAE,MAAM,YAAY,SAAS,aAAa,OAAO,kBAAkB,KAAK,SAAS;AAAA,EAC1F;AAEA,QAAM,UAAU,MAAM,IAAI,KAAK;AAE/B,SAAO;AAAA,IACL,MAAM,uBAAuB,gBAAgB;AAAA,IAC7C;AAAA,IACA,OAAO;AAAA,IACP,KAAK;AAAA,EACP;AACF;","names":[]}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getCodeLanguageFromFilename,
|
|
9
9
|
parseAskUserQuestion,
|
|
10
10
|
useHighlightedCodeHtml
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CFW62YND.js";
|
|
12
12
|
import {
|
|
13
13
|
Collapsible,
|
|
14
14
|
CollapsibleContent,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-H62LH2AG.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveSessionFilePreviewTarget
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EAZ7AGFY.js";
|
|
20
20
|
import {
|
|
21
21
|
apiFetchResponse,
|
|
22
22
|
buildMessageContent,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
useUiBridgeStore,
|
|
61
61
|
useUiStore,
|
|
62
62
|
writeFile
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-QMOW3TDA.js";
|
|
64
64
|
import {
|
|
65
65
|
registerBridgeIframe,
|
|
66
66
|
tapBridgeEvent
|
|
@@ -4525,7 +4525,7 @@ ReasoningTrigger.displayName = "ReasoningTrigger";
|
|
|
4525
4525
|
ReasoningContent.displayName = "ReasoningContent";
|
|
4526
4526
|
|
|
4527
4527
|
// src/react/components/chat/AgentLoopBlock.tsx
|
|
4528
|
-
import { Bot, Check as Check3, ChevronRight as ChevronRight4, FileText as FileText6, Loader2 as
|
|
4528
|
+
import { Bot, Check as Check3, ChevronRight as ChevronRight4, FileText as FileText6, Loader2 as Loader25, MessageSquareMore as MessageSquareMore2 } from "lucide-react";
|
|
4529
4529
|
import { useEffect as useEffect14, useMemo as useMemo14, useState as useState17 } from "react";
|
|
4530
4530
|
|
|
4531
4531
|
// src/react/components/chat/ResourceIframe.tsx
|
|
@@ -5820,6 +5820,7 @@ function buildAskUserPayload(argumentsJson) {
|
|
|
5820
5820
|
|
|
5821
5821
|
// src/react/components/chat/UserMessageBubble.tsx
|
|
5822
5822
|
import { useQueries } from "@tanstack/react-query";
|
|
5823
|
+
import { Loader2 as Loader24 } from "lucide-react";
|
|
5823
5824
|
import { useEffect as useEffect13, useRef as useRef11, useState as useState16 } from "react";
|
|
5824
5825
|
|
|
5825
5826
|
// src/react/lib/preview-dispatch.ts
|
|
@@ -6298,6 +6299,7 @@ function buildSessionFileUrl(sessionId, filePath) {
|
|
|
6298
6299
|
`/api/sessions/${encodeURIComponent(sessionId)}/files/${encodeURIComponent(filePath)}`
|
|
6299
6300
|
);
|
|
6300
6301
|
}
|
|
6302
|
+
var isSending = (message) => message.status === "streaming";
|
|
6301
6303
|
function UserMessageBubble({ message, className }) {
|
|
6302
6304
|
const activeSessionId = useSessionStore((state) => state.activeSessionId);
|
|
6303
6305
|
const _textContent = getTextContent(message.content);
|
|
@@ -6474,13 +6476,16 @@ function UserMessageBubble({ message, className }) {
|
|
|
6474
6476
|
children: cleanText
|
|
6475
6477
|
}
|
|
6476
6478
|
) }),
|
|
6477
|
-
trimmedClean && /* @__PURE__ */
|
|
6479
|
+
trimmedClean && (isSending(message) ? /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
6480
|
+
/* @__PURE__ */ jsx29(Loader24, { size: 12, className: "animate-spin" }),
|
|
6481
|
+
/* @__PURE__ */ jsx29("span", { children: "\u53D1\u9001\u4E2D" })
|
|
6482
|
+
] }) : /* @__PURE__ */ jsx29(
|
|
6478
6483
|
MessageActions,
|
|
6479
6484
|
{
|
|
6480
6485
|
content: cleanText,
|
|
6481
6486
|
className: "opacity-0 transition-opacity group-hover:opacity-100"
|
|
6482
6487
|
}
|
|
6483
|
-
)
|
|
6488
|
+
))
|
|
6484
6489
|
] }) });
|
|
6485
6490
|
}
|
|
6486
6491
|
function ErrorMessageBlock({
|
|
@@ -6669,7 +6674,7 @@ function AgentLoopBlock({ toolCall, sessionId, reasoning }) {
|
|
|
6669
6674
|
},
|
|
6670
6675
|
childToolCall.id
|
|
6671
6676
|
)) : /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 px-4 py-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
6672
|
-
/* @__PURE__ */ jsx30(
|
|
6677
|
+
/* @__PURE__ */ jsx30(Loader25, { size: 12, className: "shrink-0 animate-spin text-blue-500" }),
|
|
6673
6678
|
/* @__PURE__ */ jsx30("span", { children: "\u6B63\u5728\u542F\u52A8..." })
|
|
6674
6679
|
] }) }) : status === "awaiting_answer" ? /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-1 py-2", children: /* @__PURE__ */ jsx30("div", { className: "px-4 py-1 text-xs text-[hsl(var(--muted-foreground))]", children: "\u8BF7\u5728\u4E0B\u65B9\u5B50\u667A\u80FD\u4F53\u5BF9\u8BDD\u4E2D\u5B8C\u6210\u786E\u8BA4" }) }) : null
|
|
6675
6680
|
] }) : /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
@@ -6792,7 +6797,7 @@ function AgentLoopBlock({ toolCall, sessionId, reasoning }) {
|
|
|
6792
6797
|
message.entry_id ?? `${message.timestamp ?? "error"}-${index}`
|
|
6793
6798
|
) : null
|
|
6794
6799
|
) }) : status === "running" ? /* @__PURE__ */ jsxs25("div", { className: "px-3 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
|
|
6795
|
-
/* @__PURE__ */ jsx30(
|
|
6800
|
+
/* @__PURE__ */ jsx30(Loader25, { size: 12, className: "mr-1.5 inline animate-spin" }),
|
|
6796
6801
|
"\u6B63\u5728\u542F\u52A8..."
|
|
6797
6802
|
] }) : toolCall.result ? /* @__PURE__ */ jsx30("pre", { className: "max-h-[400px] overflow-auto px-3 py-2 whitespace-pre-wrap text-[11px] text-[hsl(var(--muted-foreground))]", children: typeof toolCall.result === "string" ? toolCall.result : JSON.stringify(toolCall.result, null, 2) }) : null
|
|
6798
6803
|
] })
|
|
@@ -7493,7 +7498,7 @@ function MemoryRefsHint({ refs: rawRefs }) {
|
|
|
7493
7498
|
}
|
|
7494
7499
|
|
|
7495
7500
|
// src/react/components/chat/CompactionCard.tsx
|
|
7496
|
-
import { ChevronDown as ChevronDown2, ChevronRight as ChevronRight6, Loader2 as
|
|
7501
|
+
import { ChevronDown as ChevronDown2, ChevronRight as ChevronRight6, Loader2 as Loader26, Square as Square3, XCircle } from "lucide-react";
|
|
7497
7502
|
import { useState as useState19 } from "react";
|
|
7498
7503
|
import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7499
7504
|
var PERCENT_FORMATTER = new Intl.NumberFormat("zh-CN", {
|
|
@@ -7570,7 +7575,7 @@ function CompactionCard({
|
|
|
7570
7575
|
children: [
|
|
7571
7576
|
canExpand ? expanded ? /* @__PURE__ */ jsx32(ChevronDown2, { size: 12, className: "shrink-0" }) : /* @__PURE__ */ jsx32(ChevronRight6, { size: 12, className: "shrink-0" }) : null,
|
|
7572
7577
|
/* @__PURE__ */ jsx32("span", { children: source.status === "streaming" ? /* @__PURE__ */ jsxs27("span", { className: "inline-flex items-center gap-1", children: [
|
|
7573
|
-
/* @__PURE__ */ jsx32(
|
|
7578
|
+
/* @__PURE__ */ jsx32(Loader26, { size: 12, className: "animate-spin" }),
|
|
7574
7579
|
"\u6B63\u5728\u538B\u7F29\u4E0A\u4E0B\u6587"
|
|
7575
7580
|
] }) : source.status === "failed" ? /* @__PURE__ */ jsxs27("span", { className: "inline-flex items-center gap-1 text-rose-500/80", children: [
|
|
7576
7581
|
/* @__PURE__ */ jsx32(XCircle, { size: 12 }),
|
|
@@ -8534,4 +8539,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
|
|
|
8534
8539
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8535
8540
|
*--------------------------------------------------------------------------------------------*)
|
|
8536
8541
|
*/
|
|
8537
|
-
//# sourceMappingURL=chunk-
|
|
8542
|
+
//# sourceMappingURL=chunk-FXEELOLI.js.map
|