@blade-hq/agent-kit 1.0.29 → 1.0.31
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-TVWC3PED.js → chunk-3EVO45IN.js} +2 -2
- package/dist/{chunk-UWNQ4PXK.js → chunk-3PX2W7II.js} +51 -12
- package/dist/chunk-3PX2W7II.js.map +1 -0
- package/dist/{chunk-YJ6BX3FU.js → chunk-DSC6KQOI.js} +45 -2
- package/dist/chunk-DSC6KQOI.js.map +1 -0
- package/dist/{chunk-PYYDXV2A.js → chunk-O32JOWYM.js} +2 -2
- package/dist/{chunk-N2OE5MVV.js → chunk-RAWQ7LWR.js} +973 -712
- package/dist/chunk-RAWQ7LWR.js.map +1 -0
- package/dist/{chunk-YXHPJGXR.js → chunk-XUWAM6MF.js} +173 -59
- package/dist/chunk-XUWAM6MF.js.map +1 -0
- package/dist/{chunk-HCQDDDOX.js → chunk-ZPZMN7KQ.js} +2 -2
- package/dist/client/index.js +1 -1
- package/dist/client/resources/sessions.d.ts +2 -0
- package/dist/client/types/rest.d.ts +639 -92
- package/dist/react/api/model-config.d.ts +8 -11
- package/dist/react/api/published-apps.js +3 -3
- package/dist/react/api/sessions.js +2 -2
- package/dist/react/components/chat/FileDeliveryCards.d.ts +11 -0
- package/dist/react/components/chat/PlanningToggle.d.ts +7 -0
- package/dist/react/components/chat/UserMessageBubble.d.ts +1 -1
- package/dist/react/components/chat/index.d.ts +1 -0
- package/dist/react/components/chat/index.js +7 -5
- package/dist/react/components/markdown/ExternalLinkDialog.d.ts +3 -1
- package/dist/react/components/plan/index.js +4 -4
- package/dist/react/components/session/index.js +3 -3
- package/dist/react/components/workspace/index.js +61 -42
- package/dist/react/components/workspace/index.js.map +1 -1
- package/dist/react/hooks/use-model-preferences.d.ts +2 -0
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +20 -8
- package/dist/react/index.js.map +1 -1
- package/dist/react/schemas/session.d.ts +4 -0
- package/dist/react/sockets/event-bridge.d.ts +6 -0
- package/dist/react/stores/ui-store.d.ts +6 -1
- package/dist/react/types/solution.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-N2OE5MVV.js.map +0 -1
- package/dist/chunk-UWNQ4PXK.js.map +0 -1
- package/dist/chunk-YJ6BX3FU.js.map +0 -1
- package/dist/chunk-YXHPJGXR.js.map +0 -1
- /package/dist/{chunk-TVWC3PED.js.map → chunk-3EVO45IN.js.map} +0 -0
- /package/dist/{chunk-PYYDXV2A.js.map → chunk-O32JOWYM.js.map} +0 -0
- /package/dist/{chunk-HCQDDDOX.js.map → chunk-ZPZMN7KQ.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type ThinkingRequestFormat = "auto" | "none" | "openai_reasoning_effort" | "openrouter_reasoning" | "deepseek_thinking" | "together_reasoning" | "zai_thinking" | "qwen_enable_thinking" | "sglang_chat_template";
|
|
2
|
-
export interface
|
|
2
|
+
export interface RuntimeModelService {
|
|
3
3
|
name: string;
|
|
4
4
|
base_url: string;
|
|
5
5
|
api_key_configured: boolean;
|
|
@@ -13,15 +13,15 @@ export interface RuntimeModelDetails {
|
|
|
13
13
|
}
|
|
14
14
|
export interface RuntimeModelConfig {
|
|
15
15
|
id: string;
|
|
16
|
-
provider: RuntimeProviderConfig;
|
|
17
16
|
model: RuntimeModelDetails;
|
|
18
17
|
}
|
|
19
18
|
export interface RuntimeModelConfigCollection {
|
|
19
|
+
service: RuntimeModelService;
|
|
20
20
|
items: RuntimeModelConfig[];
|
|
21
21
|
default_config_id: string;
|
|
22
22
|
source: "saved" | "startup";
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
24
|
+
export interface UpdateRuntimeModelService {
|
|
25
25
|
base_url: string;
|
|
26
26
|
api_key?: string;
|
|
27
27
|
thinking_request_format: ThinkingRequestFormat;
|
|
@@ -32,33 +32,30 @@ export interface UpdateModelDetails {
|
|
|
32
32
|
supports_vision: boolean;
|
|
33
33
|
}
|
|
34
34
|
export interface UpdateRuntimeModelConfig {
|
|
35
|
-
provider: UpdateProviderConfig;
|
|
36
35
|
model: UpdateModelDetails;
|
|
37
36
|
}
|
|
38
37
|
export interface ModelConfigProbe {
|
|
39
|
-
provider: UpdateProviderConfig;
|
|
40
38
|
model_id: string;
|
|
41
|
-
config_id?: string;
|
|
42
39
|
}
|
|
43
40
|
export interface ModelCandidatesRequest {
|
|
44
|
-
|
|
45
|
-
config_id?: string;
|
|
41
|
+
service: UpdateRuntimeModelService;
|
|
46
42
|
}
|
|
47
43
|
export interface ModelCandidatesResult {
|
|
48
|
-
|
|
44
|
+
service_name: string;
|
|
49
45
|
models: string[];
|
|
50
46
|
}
|
|
51
47
|
export interface ContextWindowDetectionResult {
|
|
52
|
-
|
|
48
|
+
service_name: string;
|
|
53
49
|
model_id: string;
|
|
54
50
|
context_window: number;
|
|
55
51
|
}
|
|
56
52
|
export interface ModelConfigTestResult {
|
|
57
53
|
ok: boolean;
|
|
58
|
-
|
|
54
|
+
service_name: string;
|
|
59
55
|
model_id: string;
|
|
60
56
|
}
|
|
61
57
|
export declare function getRuntimeModelConfigs(): Promise<RuntimeModelConfigCollection>;
|
|
58
|
+
export declare function updateRuntimeModelService(service: UpdateRuntimeModelService): Promise<RuntimeModelConfigCollection>;
|
|
62
59
|
export declare function createRuntimeModelConfig(config: UpdateRuntimeModelConfig): Promise<RuntimeModelConfigCollection>;
|
|
63
60
|
export declare function updateRuntimeModelConfig(configId: string, config: UpdateRuntimeModelConfig): Promise<RuntimeModelConfigCollection>;
|
|
64
61
|
export declare function deleteRuntimeModelConfig(configId: string): Promise<RuntimeModelConfigCollection>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listPublishedApps,
|
|
3
3
|
unpublishApp
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-ZPZMN7KQ.js";
|
|
5
|
+
import "../../chunk-3PX2W7II.js";
|
|
6
6
|
import "../../chunk-J3XVFPOV.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-DSC6KQOI.js";
|
|
8
8
|
import "../../chunk-JCJFFJ42.js";
|
|
9
9
|
import "../../chunk-PZ5AY32C.js";
|
|
10
10
|
export {
|
|
@@ -41,9 +41,9 @@ import {
|
|
|
41
41
|
updateSharing,
|
|
42
42
|
uploadFiles,
|
|
43
43
|
writeFile
|
|
44
|
-
} from "../../chunk-
|
|
44
|
+
} from "../../chunk-3PX2W7II.js";
|
|
45
45
|
import "../../chunk-J3XVFPOV.js";
|
|
46
|
-
import "../../chunk-
|
|
46
|
+
import "../../chunk-DSC6KQOI.js";
|
|
47
47
|
import "../../chunk-JCJFFJ42.js";
|
|
48
48
|
import "../../chunk-PZ5AY32C.js";
|
|
49
49
|
export {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ToolCallInfo } from "../../schemas/message.js";
|
|
2
|
+
/** 从该轮工具调用中提取智能体写入的工作区文件(去重、按出现顺序)。 */
|
|
3
|
+
export declare function collectDeliveredFiles(toolCalls: ToolCallInfo[], sessionId: string): Array<{
|
|
4
|
+
relPath: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}>;
|
|
7
|
+
/** 文件交付卡片组(需求 10):助手在本轮写入的工作区文件,以卡片形式内联展示。 */
|
|
8
|
+
export declare function FileDeliveryCards({ toolCalls, sessionId, }: {
|
|
9
|
+
toolCalls: ToolCallInfo[];
|
|
10
|
+
sessionId: string;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -11,7 +11,7 @@ interface UserMessageProps {
|
|
|
11
11
|
message: UserChatMessage;
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const USER_MESSAGE_MARKDOWN_CLASS = "prose prose-
|
|
14
|
+
export declare const USER_MESSAGE_MARKDOWN_CLASS = "prose prose-invert chat-prose max-w-none [&_li>p]:inline [&_li>p]:whitespace-pre-wrap [&_p]:whitespace-pre-wrap";
|
|
15
15
|
export declare function UserMessageBubble({ message, className }: UserMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export declare function ErrorMessageBlock({ message, className, }: {
|
|
17
17
|
message: ErrorChatMessage;
|
|
@@ -2,6 +2,7 @@ export { ChatView, type ChatViewProps } from "./ChatView.js";
|
|
|
2
2
|
export { AttachmentPreviewDialog } from "./AttachmentPreviewDialog.js";
|
|
3
3
|
export { ChatInput, type ChatSendOptions, type ComposerAttachment, type EnsureSessionResult, type FileComposerAttachment, } from "./ChatInput.js";
|
|
4
4
|
export { ThinkingToggle } from "./ThinkingToggle.js";
|
|
5
|
+
export { PlanningToggle } from "./PlanningToggle.js";
|
|
5
6
|
export { FileSizeLimitDialog } from "./FileSizeLimitDialog.js";
|
|
6
7
|
export { ImageLightbox } from "./ImageLightbox.js";
|
|
7
8
|
export { CompactionCard } from "./CompactionCard.js";
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
FileSizeLimitDialog,
|
|
9
9
|
ImageLightbox,
|
|
10
10
|
MessageList,
|
|
11
|
+
PlanningToggle,
|
|
11
12
|
SkillStatusBar,
|
|
12
13
|
ThinkingToggle,
|
|
13
14
|
ToolCallBlock,
|
|
@@ -17,16 +18,16 @@ import {
|
|
|
17
18
|
isErrorMessage,
|
|
18
19
|
isUserMessage,
|
|
19
20
|
useWhatIfQuoteContext
|
|
20
|
-
} from "../../../chunk-
|
|
21
|
+
} from "../../../chunk-RAWQ7LWR.js";
|
|
21
22
|
import "../../../chunk-H62LH2AG.js";
|
|
22
23
|
import {
|
|
23
24
|
AskUserQuestionBlock
|
|
24
|
-
} from "../../../chunk-
|
|
25
|
-
import "../../../chunk-
|
|
25
|
+
} from "../../../chunk-XUWAM6MF.js";
|
|
26
|
+
import "../../../chunk-O32JOWYM.js";
|
|
26
27
|
import "../../../chunk-2UP7MG3J.js";
|
|
27
|
-
import "../../../chunk-
|
|
28
|
+
import "../../../chunk-3PX2W7II.js";
|
|
28
29
|
import "../../../chunk-J3XVFPOV.js";
|
|
29
|
-
import "../../../chunk-
|
|
30
|
+
import "../../../chunk-DSC6KQOI.js";
|
|
30
31
|
import "../../../chunk-7LEKQI47.js";
|
|
31
32
|
import "../../../chunk-JCJFFJ42.js";
|
|
32
33
|
import "../../../chunk-PZ5AY32C.js";
|
|
@@ -41,6 +42,7 @@ export {
|
|
|
41
42
|
FileSizeLimitDialog,
|
|
42
43
|
ImageLightbox,
|
|
43
44
|
MessageList,
|
|
45
|
+
PlanningToggle,
|
|
44
46
|
SkillStatusBar,
|
|
45
47
|
ThinkingToggle,
|
|
46
48
|
ToolCallBlock,
|
|
@@ -3,6 +3,8 @@ interface Props {
|
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
onConfirm: () => void;
|
|
5
5
|
url: string;
|
|
6
|
+
/** 在会话的沙盒浏览器(「浏览器」面板)中打开链接;不传则不显示该按钮 */
|
|
7
|
+
onOpenInternal?: () => void | Promise<void>;
|
|
6
8
|
}
|
|
7
|
-
export declare function ExternalLinkDialog({ isOpen, onClose, onConfirm, url }: Props): import("react").ReactPortal | null;
|
|
9
|
+
export declare function ExternalLinkDialog({ isOpen, onClose, onConfirm, url, onOpenInternal }: Props): import("react").ReactPortal | null;
|
|
8
10
|
export {};
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
PlanSummaryCard,
|
|
4
4
|
extractLatestPlanMessages,
|
|
5
5
|
parsePlanMessages
|
|
6
|
-
} from "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
6
|
+
} from "../../../chunk-XUWAM6MF.js";
|
|
7
|
+
import "../../../chunk-O32JOWYM.js";
|
|
8
8
|
import "../../../chunk-2UP7MG3J.js";
|
|
9
|
-
import "../../../chunk-
|
|
9
|
+
import "../../../chunk-3PX2W7II.js";
|
|
10
10
|
import "../../../chunk-J3XVFPOV.js";
|
|
11
|
-
import "../../../chunk-
|
|
11
|
+
import "../../../chunk-DSC6KQOI.js";
|
|
12
12
|
import {
|
|
13
13
|
cn
|
|
14
14
|
} from "../../../chunk-7LEKQI47.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useSession
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-3EVO45IN.js";
|
|
4
4
|
import {
|
|
5
5
|
checkoutSession,
|
|
6
6
|
getSessionCheckpoints,
|
|
7
7
|
useChatStore,
|
|
8
8
|
useSessionStore
|
|
9
|
-
} from "../../../chunk-
|
|
9
|
+
} from "../../../chunk-3PX2W7II.js";
|
|
10
10
|
import "../../../chunk-J3XVFPOV.js";
|
|
11
|
-
import "../../../chunk-
|
|
11
|
+
import "../../../chunk-DSC6KQOI.js";
|
|
12
12
|
import {
|
|
13
13
|
cn
|
|
14
14
|
} from "../../../chunk-7LEKQI47.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "../../../chunk-H62LH2AG.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveSessionFilePreviewTarget
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-O32JOWYM.js";
|
|
9
9
|
import {
|
|
10
10
|
apiFetchText,
|
|
11
11
|
copyFile,
|
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
useChatStore,
|
|
20
20
|
useSessionStore,
|
|
21
21
|
useUiStore
|
|
22
|
-
} from "../../../chunk-
|
|
22
|
+
} from "../../../chunk-3PX2W7II.js";
|
|
23
23
|
import "../../../chunk-J3XVFPOV.js";
|
|
24
|
-
import "../../../chunk-
|
|
24
|
+
import "../../../chunk-DSC6KQOI.js";
|
|
25
25
|
import {
|
|
26
26
|
cn
|
|
27
27
|
} from "../../../chunk-7LEKQI47.js";
|
|
@@ -124,7 +124,7 @@ var FileTree = ({
|
|
|
124
124
|
),
|
|
125
125
|
role: "tree",
|
|
126
126
|
...props,
|
|
127
|
-
children: /* @__PURE__ */ jsx("div", { className: "
|
|
127
|
+
children: /* @__PURE__ */ jsx("div", { className: "px-1 py-1", children })
|
|
128
128
|
}
|
|
129
129
|
) });
|
|
130
130
|
};
|
|
@@ -285,7 +285,7 @@ var GENERIC_FILE_ICON_ASSET = new URL("../../assets/file-icons/generic-file.png"
|
|
|
285
285
|
// src/react/components/workspace/FileTree.tsx
|
|
286
286
|
import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
287
287
|
var ROOT_PATH = ".";
|
|
288
|
-
var TREE_ROW_CLASS = "group flex w-full items-center gap-1
|
|
288
|
+
var TREE_ROW_CLASS = "group flex w-full items-center gap-1 rounded-md px-1.5 py-1 text-left transition-colors hover:bg-muted/50";
|
|
289
289
|
var FOLDER_PATH_MAX_LENGTH = 36;
|
|
290
290
|
function FileTree2({
|
|
291
291
|
sessionId,
|
|
@@ -409,8 +409,8 @@ function FileTree2({
|
|
|
409
409
|
return /* @__PURE__ */ jsx2(EmptyState, { title: "\u6682\u65E0\u6D3B\u8DC3\u4F1A\u8BDD", description: "\u9009\u62E9\u6216\u521B\u5EFA\u4F1A\u8BDD\u540E\u67E5\u770B\u5DE5\u4F5C\u533A\u6587\u4EF6" });
|
|
410
410
|
}
|
|
411
411
|
if (rootLoading) {
|
|
412
|
-
return /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-
|
|
413
|
-
/* @__PURE__ */ jsx2(Loader2, { size:
|
|
412
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1.5 px-2 py-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
|
|
413
|
+
/* @__PURE__ */ jsx2(Loader2, { size: 12, className: "animate-spin" }),
|
|
414
414
|
/* @__PURE__ */ jsx2("span", { children: "\u52A0\u8F7D\u4E2D..." })
|
|
415
415
|
] });
|
|
416
416
|
}
|
|
@@ -433,7 +433,7 @@ function FileTree2({
|
|
|
433
433
|
onExpandedChange: handleExpandedChange,
|
|
434
434
|
selectedPath,
|
|
435
435
|
onSelect: handleSelect,
|
|
436
|
-
className: "border-none bg-transparent",
|
|
436
|
+
className: "border-none bg-transparent text-[12px]",
|
|
437
437
|
children: rootEntries.map(
|
|
438
438
|
(entry) => entry.is_dir ? /* @__PURE__ */ jsx2(
|
|
439
439
|
FolderNode,
|
|
@@ -742,6 +742,7 @@ function FileNode({
|
|
|
742
742
|
const downloadUrl = getAuthedUrl(`/api/sessions/${sessionId}/files/${encodeURIComponent(entry.path)}`);
|
|
743
743
|
const isOpening = openingFilePath === entry.path;
|
|
744
744
|
const isSelected = selectedPath === entry.path;
|
|
745
|
+
const isUnread = useUiStore((state) => state.previewUnreadArtifactKeys.includes(entry.path));
|
|
745
746
|
const queryClient = useQueryClient();
|
|
746
747
|
const renameInputRef = useRef(null);
|
|
747
748
|
const [isRenaming, setIsRenaming] = useState2(false);
|
|
@@ -839,7 +840,7 @@ function FileNode({
|
|
|
839
840
|
}
|
|
840
841
|
},
|
|
841
842
|
children: [
|
|
842
|
-
/* @__PURE__ */ jsx2("span", { className: "size-
|
|
843
|
+
/* @__PURE__ */ jsx2("span", { className: "size-2 shrink-0" }),
|
|
843
844
|
/* @__PURE__ */ jsx2(FileTreeIcon, { children: getFileIcon(entry.name) }),
|
|
844
845
|
isRenaming ? /* @__PURE__ */ jsx2(
|
|
845
846
|
"input",
|
|
@@ -865,6 +866,14 @@ function FileNode({
|
|
|
865
866
|
) : /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-1 items-center text-left", children: [
|
|
866
867
|
/* @__PURE__ */ jsx2(FileTreeName, { className: "min-w-0 flex-1", children: entry.name }),
|
|
867
868
|
/* @__PURE__ */ jsx2(FolderPathHoverLabel, { path: getFolderPath(entry.path) }),
|
|
869
|
+
isUnread ? /* @__PURE__ */ jsx2(
|
|
870
|
+
"span",
|
|
871
|
+
{
|
|
872
|
+
className: "ml-1.5 h-2 w-2 shrink-0 rounded-full bg-[hsl(var(--primary))] group-hover:hidden",
|
|
873
|
+
title: "\u65B0\u6587\u4EF6",
|
|
874
|
+
"aria-label": "\u65B0\u6587\u4EF6"
|
|
875
|
+
}
|
|
876
|
+
) : null,
|
|
868
877
|
/* @__PURE__ */ jsx2(FileTagList, { tags: entry.tags })
|
|
869
878
|
] }),
|
|
870
879
|
isOpening ? /* @__PURE__ */ jsx2(Loader2, { size: 12, className: "ml-auto shrink-0 animate-spin text-[hsl(var(--muted-foreground))]" }) : null,
|
|
@@ -1022,24 +1031,34 @@ function LazyDirChildren({
|
|
|
1022
1031
|
)
|
|
1023
1032
|
) });
|
|
1024
1033
|
}
|
|
1025
|
-
var
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1034
|
+
var TAG_ICONS = {
|
|
1035
|
+
\u7528\u6237\u4E0A\u4F20: {
|
|
1036
|
+
icon: /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1037
|
+
/* @__PURE__ */ jsx2("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
1038
|
+
/* @__PURE__ */ jsx2("polyline", { points: "17 8 12 3 7 8" }),
|
|
1039
|
+
/* @__PURE__ */ jsx2("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
|
|
1040
|
+
] }),
|
|
1041
|
+
className: "text-[hsl(var(--muted-foreground))]"
|
|
1042
|
+
}
|
|
1029
1043
|
};
|
|
1030
|
-
var DEFAULT_TAG_STYLE = "bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]";
|
|
1031
1044
|
function FileTagList({ tags }) {
|
|
1032
|
-
const normalizedTags = normalizeDisplayTags(tags);
|
|
1045
|
+
const normalizedTags = normalizeDisplayTags(tags).filter((tag) => tag !== "AI \u751F\u6210");
|
|
1033
1046
|
if (normalizedTags.length === 0) return null;
|
|
1034
|
-
return /* @__PURE__ */ jsx2("span", { className: "ml-1 flex
|
|
1035
|
-
|
|
1036
|
-
{
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1047
|
+
return /* @__PURE__ */ jsx2("span", { className: "ml-1 flex shrink-0 items-center gap-0.5 group-hover:hidden", children: normalizedTags.map((tag) => {
|
|
1048
|
+
const entry = TAG_ICONS[tag];
|
|
1049
|
+
if (entry) {
|
|
1050
|
+
return /* @__PURE__ */ jsx2("span", { className: `inline-flex ${entry.className}`, title: tag, children: entry.icon }, tag);
|
|
1051
|
+
}
|
|
1052
|
+
return /* @__PURE__ */ jsx2(
|
|
1053
|
+
"span",
|
|
1054
|
+
{
|
|
1055
|
+
className: "max-w-16 truncate rounded-full bg-[hsl(var(--muted))] px-1.5 py-[1px] text-[10px] leading-[14px] text-[hsl(var(--muted-foreground))]",
|
|
1056
|
+
title: tag,
|
|
1057
|
+
children: tag
|
|
1058
|
+
},
|
|
1059
|
+
tag
|
|
1060
|
+
);
|
|
1061
|
+
}) });
|
|
1043
1062
|
}
|
|
1044
1063
|
function normalizeDisplayTags(tags) {
|
|
1045
1064
|
if (!tags) return [];
|
|
@@ -1113,68 +1132,68 @@ function EmptyState({ title, description }) {
|
|
|
1113
1132
|
] })
|
|
1114
1133
|
] });
|
|
1115
1134
|
}
|
|
1116
|
-
var ICO_DOC = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1135
|
+
var ICO_DOC = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1117
1136
|
/* @__PURE__ */ jsx2("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
|
|
1118
1137
|
/* @__PURE__ */ jsx2("polyline", { points: "14 2 14 8 20 8" })
|
|
1119
1138
|
] });
|
|
1120
|
-
var ICO_CODE = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1139
|
+
var ICO_CODE = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1121
1140
|
/* @__PURE__ */ jsx2("polyline", { points: "16 18 22 12 16 6" }),
|
|
1122
1141
|
/* @__PURE__ */ jsx2("polyline", { points: "8 6 2 12 8 18" })
|
|
1123
1142
|
] });
|
|
1124
|
-
var ICO_TABLE = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1125
|
-
/* @__PURE__ */ jsx2("rect", { x: "3", y: "3", width: "
|
|
1143
|
+
var ICO_TABLE = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1144
|
+
/* @__PURE__ */ jsx2("rect", { x: "3", y: "3", width: "14", height: "14", rx: "2" }),
|
|
1126
1145
|
/* @__PURE__ */ jsx2("path", { d: "M3 9h18" }),
|
|
1127
1146
|
/* @__PURE__ */ jsx2("path", { d: "M3 15h18" }),
|
|
1128
1147
|
/* @__PURE__ */ jsx2("path", { d: "M9 3v18" })
|
|
1129
1148
|
] });
|
|
1130
|
-
var ICO_SLIDES = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1149
|
+
var ICO_SLIDES = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1131
1150
|
/* @__PURE__ */ jsx2("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
1132
1151
|
/* @__PURE__ */ jsx2("path", { d: "M8 21h8" }),
|
|
1133
1152
|
/* @__PURE__ */ jsx2("path", { d: "M12 17v4" })
|
|
1134
1153
|
] });
|
|
1135
|
-
var ICO_PDF = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1154
|
+
var ICO_PDF = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1136
1155
|
/* @__PURE__ */ jsx2("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
|
|
1137
1156
|
/* @__PURE__ */ jsx2("path", { d: "M8 13h8" }),
|
|
1138
1157
|
/* @__PURE__ */ jsx2("path", { d: "M8 17h5" })
|
|
1139
1158
|
] });
|
|
1140
|
-
var ICO_IMAGE = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1141
|
-
/* @__PURE__ */ jsx2("rect", { x: "3", y: "3", width: "
|
|
1159
|
+
var ICO_IMAGE = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1160
|
+
/* @__PURE__ */ jsx2("rect", { x: "3", y: "3", width: "14", height: "14", rx: "2" }),
|
|
1142
1161
|
/* @__PURE__ */ jsx2("circle", { cx: "9", cy: "9", r: "2" }),
|
|
1143
1162
|
/* @__PURE__ */ jsx2("path", { d: "m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21" })
|
|
1144
1163
|
] });
|
|
1145
|
-
var ICO_AUDIO = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1164
|
+
var ICO_AUDIO = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1146
1165
|
/* @__PURE__ */ jsx2("path", { d: "M9 18V5l12-2v13" }),
|
|
1147
1166
|
/* @__PURE__ */ jsx2("circle", { cx: "6", cy: "18", r: "3" }),
|
|
1148
1167
|
/* @__PURE__ */ jsx2("circle", { cx: "18", cy: "16", r: "3" })
|
|
1149
1168
|
] });
|
|
1150
|
-
var ICO_VIDEO = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1169
|
+
var ICO_VIDEO = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1151
1170
|
/* @__PURE__ */ jsx2("rect", { x: "2", y: "2", width: "20", height: "20", rx: "2" }),
|
|
1152
1171
|
/* @__PURE__ */ jsx2("path", { d: "m10 8 6 4-6 4V8z" })
|
|
1153
1172
|
] });
|
|
1154
|
-
var ICO_ARCHIVE = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1173
|
+
var ICO_ARCHIVE = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1155
1174
|
/* @__PURE__ */ jsx2("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
|
|
1156
1175
|
/* @__PURE__ */ jsx2("path", { d: "M12 4v16" }),
|
|
1157
1176
|
/* @__PURE__ */ jsx2("path", { d: "m10 10 4 4" }),
|
|
1158
1177
|
/* @__PURE__ */ jsx2("path", { d: "m14 10-4 4" })
|
|
1159
1178
|
] });
|
|
1160
|
-
var ICO_CONFIG = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1179
|
+
var ICO_CONFIG = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1161
1180
|
/* @__PURE__ */ jsx2("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
|
|
1162
1181
|
/* @__PURE__ */ jsx2("circle", { cx: "12", cy: "15", r: "2" }),
|
|
1163
1182
|
/* @__PURE__ */ jsx2("path", { d: "M12 11v2" })
|
|
1164
1183
|
] });
|
|
1165
|
-
var ICO_TEXT = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1184
|
+
var ICO_TEXT = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1166
1185
|
/* @__PURE__ */ jsx2("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
|
|
1167
1186
|
/* @__PURE__ */ jsx2("path", { d: "M8 13h8" }),
|
|
1168
1187
|
/* @__PURE__ */ jsx2("path", { d: "M8 17h8" }),
|
|
1169
1188
|
/* @__PURE__ */ jsx2("path", { d: "M8 9h3" })
|
|
1170
1189
|
] });
|
|
1171
|
-
var ICO_DB = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1190
|
+
var ICO_DB = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1172
1191
|
/* @__PURE__ */ jsx2("ellipse", { cx: "12", cy: "5", rx: "9", ry: "3" }),
|
|
1173
1192
|
/* @__PURE__ */ jsx2("path", { d: "M3 5v14a9 3 0 0 0 18 0V5" }),
|
|
1174
1193
|
/* @__PURE__ */ jsx2("path", { d: "M3 12a9 3 0 0 0 18 0" })
|
|
1175
1194
|
] });
|
|
1176
|
-
var ICO_FOLDER = /* @__PURE__ */ jsx2("svg", { "aria-hidden": "true", width: "
|
|
1177
|
-
var ICO_DESIGN = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "
|
|
1195
|
+
var ICO_FOLDER = /* @__PURE__ */ jsx2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", opacity: "0.85", children: /* @__PURE__ */ jsx2("path", { d: "M20 6h-8l-2-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z" }) });
|
|
1196
|
+
var ICO_DESIGN = /* @__PURE__ */ jsxs2("svg", { "aria-hidden": "true", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1178
1197
|
/* @__PURE__ */ jsx2("path", { d: "m12 19 7-7 3 3-7 7-3-3z" }),
|
|
1179
1198
|
/* @__PURE__ */ jsx2("path", { d: "m18 13-1.5-7.5L2 2l3.5 14.5L13 18l5-5z" }),
|
|
1180
1199
|
/* @__PURE__ */ jsx2("path", { d: "m2 2 7.586 7.586" }),
|
|
@@ -1224,10 +1243,10 @@ var FOLDER_COLOR = "text-[hsl(38,80%,55%)]";
|
|
|
1224
1243
|
function getFileIcon(fileName) {
|
|
1225
1244
|
const ext = fileName.split(".").pop()?.toLowerCase() ?? "";
|
|
1226
1245
|
const entry = EXT_ICON[ext] ?? DEFAULT_ICON;
|
|
1227
|
-
return /* @__PURE__ */ jsx2("span", { className: `flex size-
|
|
1246
|
+
return /* @__PURE__ */ jsx2("span", { className: `flex size-4 shrink-0 items-center justify-center ${entry.color}`, children: entry.icon });
|
|
1228
1247
|
}
|
|
1229
1248
|
function getFolderIcon() {
|
|
1230
|
-
return /* @__PURE__ */ jsx2("span", { className: `flex size-
|
|
1249
|
+
return /* @__PURE__ */ jsx2("span", { className: `flex size-4 shrink-0 items-center justify-center ${FOLDER_COLOR}`, children: ICO_FOLDER });
|
|
1231
1250
|
}
|
|
1232
1251
|
function getErrorMessage(error, fallback) {
|
|
1233
1252
|
if (error instanceof Error && error.message) {
|