@blade-hq/agent-kit 0.5.13 → 0.5.16
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-6M5XXG3W.js → chunk-BTESGLQL.js} +21 -26
- package/dist/chunk-BTESGLQL.js.map +1 -0
- package/dist/{chunk-HBC6FK3D.js → chunk-BWNGNVXP.js} +2 -2
- package/dist/{chunk-SZSTLXEP.js → chunk-CZYQQABG.js} +12 -128
- package/dist/chunk-CZYQQABG.js.map +1 -0
- package/dist/{chunk-RA4Q3QSE.js → chunk-KVV7NGX2.js} +15 -91
- package/dist/chunk-KVV7NGX2.js.map +1 -0
- package/dist/{chunk-7I7AMUCI.js → chunk-SZKVEYL6.js} +2 -2
- package/dist/chunk-SZKVEYL6.js.map +1 -0
- package/dist/{chunk-E2N6KY4N.js → chunk-WMKGDYJY.js} +2 -2
- package/dist/client/index.d.ts +332 -0
- package/dist/client/index.js +1 -1
- package/dist/react/api/vibe-coding.js +2 -2
- package/dist/react/components/chat/index.js +5 -5
- package/dist/react/components/plan/index.d.ts +2 -3
- package/dist/react/components/plan/index.js +3 -3
- package/dist/react/components/session/index.js +3 -3
- package/dist/react/components/workspace/index.js +3 -3
- package/dist/react/index.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-6M5XXG3W.js.map +0 -1
- package/dist/chunk-7I7AMUCI.js.map +0 -1
- package/dist/chunk-RA4Q3QSE.js.map +0 -1
- package/dist/chunk-SZSTLXEP.js.map +0 -1
- /package/dist/{chunk-HBC6FK3D.js.map → chunk-BWNGNVXP.js.map} +0 -0
- /package/dist/{chunk-E2N6KY4N.js.map → chunk-WMKGDYJY.js.map} +0 -0
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
getCodeLanguageFromFilename,
|
|
9
9
|
parseAskUserQuestion,
|
|
10
10
|
useHighlightedCodeHtml
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BTESGLQL.js";
|
|
12
12
|
import {
|
|
13
13
|
Collapsible,
|
|
14
14
|
CollapsibleContent,
|
|
15
15
|
CollapsibleTrigger,
|
|
16
16
|
resolveSessionFilePreviewTarget
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BWNGNVXP.js";
|
|
18
18
|
import {
|
|
19
19
|
apiFetchResponse,
|
|
20
20
|
buildMessageContent,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
useUiBridgeStore,
|
|
59
59
|
useUiStore,
|
|
60
60
|
writeFile
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-CZYQQABG.js";
|
|
62
62
|
import {
|
|
63
63
|
registerBridgeIframe,
|
|
64
64
|
tapBridgeEvent
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
ModelOption,
|
|
68
68
|
ModelsConfig,
|
|
69
69
|
ModelsResource
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-SZKVEYL6.js";
|
|
71
71
|
import {
|
|
72
72
|
cn,
|
|
73
73
|
copyToClipboard
|
|
@@ -5624,7 +5624,6 @@ function ToolCallBlock({
|
|
|
5624
5624
|
}
|
|
5625
5625
|
}
|
|
5626
5626
|
const filePath = extractToolFilePath(toolCall);
|
|
5627
|
-
const loadedSkillName = normalizedName === "LoadSkillTools" ? extractLoadedSkillName(toolCall) : null;
|
|
5628
5627
|
const tone = getToolTone(toolCall.status);
|
|
5629
5628
|
const displayName = getToolDisplayLabel(toolCall);
|
|
5630
5629
|
const Renderer = customization?.renderers?.tool?.[normalizedName] ?? getRenderer(normalizedName);
|
|
@@ -5665,14 +5664,6 @@ function ToolCallBlock({
|
|
|
5665
5664
|
}
|
|
5666
5665
|
),
|
|
5667
5666
|
filePath && /* @__PURE__ */ jsx20("span", { className: "flex min-w-0 max-w-[50%] text-[hsl(var(--muted-foreground))]", children: /* @__PURE__ */ jsx20(FilePathLink, { filePath, sessionId: resolvedSessionId }) }),
|
|
5668
|
-
loadedSkillName ? /* @__PURE__ */ jsx20(
|
|
5669
|
-
"span",
|
|
5670
|
-
{
|
|
5671
|
-
className: "min-w-0 max-w-[50%] shrink truncate text-[hsl(var(--foreground))]",
|
|
5672
|
-
title: loadedSkillName,
|
|
5673
|
-
children: loadedSkillName
|
|
5674
|
-
}
|
|
5675
|
-
) : null,
|
|
5676
5667
|
reasoning ? /* @__PURE__ */ jsx20(ThinkingBadge, { reasoning, variant: "block" }) : null,
|
|
5677
5668
|
typeof toolCall.duration_ms === "number" && toolCall.duration_ms > 0 && /* @__PURE__ */ jsx20("span", { className: "shrink-0 font-mono text-[10px] text-[hsl(var(--muted-foreground))]", children: formatToolDuration(toolCall.duration_ms) }),
|
|
5678
5669
|
uiMeta?.target === "preview" && resolvedSessionId && !isInternalStatusPreview(uiMeta) ? /* @__PURE__ */ jsxs16(
|
|
@@ -5720,37 +5711,6 @@ function ToolCallBlock({
|
|
|
5720
5711
|
] }) })
|
|
5721
5712
|
] });
|
|
5722
5713
|
}
|
|
5723
|
-
function extractLoadedSkillName(toolCall) {
|
|
5724
|
-
const args = parseToolArguments(toolCall.arguments);
|
|
5725
|
-
const skillId = typeof args?.skill_id === "string" ? args.skill_id.trim() : "";
|
|
5726
|
-
if (skillId) return skillId;
|
|
5727
|
-
const result = parseToolResult(toolCall.result);
|
|
5728
|
-
if (isRecord(result) && typeof result.skill_id === "string") {
|
|
5729
|
-
const resultSkillId = result.skill_id.trim();
|
|
5730
|
-
if (resultSkillId) return resultSkillId;
|
|
5731
|
-
}
|
|
5732
|
-
return null;
|
|
5733
|
-
}
|
|
5734
|
-
function parseToolArguments(value) {
|
|
5735
|
-
if (!value) return null;
|
|
5736
|
-
try {
|
|
5737
|
-
const parsed = JSON.parse(value);
|
|
5738
|
-
return isRecord(parsed) ? parsed : null;
|
|
5739
|
-
} catch {
|
|
5740
|
-
return null;
|
|
5741
|
-
}
|
|
5742
|
-
}
|
|
5743
|
-
function parseToolResult(value) {
|
|
5744
|
-
if (typeof value !== "string") return value;
|
|
5745
|
-
try {
|
|
5746
|
-
return JSON.parse(value);
|
|
5747
|
-
} catch {
|
|
5748
|
-
return value;
|
|
5749
|
-
}
|
|
5750
|
-
}
|
|
5751
|
-
function isRecord(value) {
|
|
5752
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5753
|
-
}
|
|
5754
5714
|
function isInternalStatusPreview(uiMeta) {
|
|
5755
5715
|
return uiMeta?.title?.trim() === "\u9636\u6BB5\u8FDB\u5EA6";
|
|
5756
5716
|
}
|
|
@@ -6461,13 +6421,7 @@ function ErrorMessageBlock({
|
|
|
6461
6421
|
import { Fragment as Fragment8, jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6462
6422
|
var EMPTY_MESSAGES2 = [];
|
|
6463
6423
|
var EMPTY_AGENT_LOOPS = {};
|
|
6464
|
-
var COLLAPSED_SUMMARY_HIDDEN_TOOLS = /* @__PURE__ */ new Set([
|
|
6465
|
-
"SearchSkills",
|
|
6466
|
-
"GetSkillContent",
|
|
6467
|
-
"ListSkillTools",
|
|
6468
|
-
"LoadSkillTools",
|
|
6469
|
-
"Read"
|
|
6470
|
-
]);
|
|
6424
|
+
var COLLAPSED_SUMMARY_HIDDEN_TOOLS = /* @__PURE__ */ new Set(["ReadSkill", "Read"]);
|
|
6471
6425
|
function safeParseDescription(argsStr) {
|
|
6472
6426
|
try {
|
|
6473
6427
|
return JSON.parse(argsStr)?.description ?? "\u5B50\u667A\u80FD\u4F53";
|
|
@@ -6922,22 +6876,21 @@ function groupDetailedToolCalls(toolCalls) {
|
|
|
6922
6876
|
while (index < toolCalls.length) {
|
|
6923
6877
|
const toolCall = toolCalls[index];
|
|
6924
6878
|
const normalizedName = formatToolName(toolCall.name);
|
|
6925
|
-
if (normalizedName !== "Read"
|
|
6879
|
+
if (normalizedName !== "Read") {
|
|
6926
6880
|
items.push({ key: toolCall.id, kind: "single", toolCall });
|
|
6927
6881
|
index += 1;
|
|
6928
6882
|
continue;
|
|
6929
6883
|
}
|
|
6930
6884
|
const group = [toolCall];
|
|
6931
6885
|
index += 1;
|
|
6932
|
-
while (index < toolCalls.length && formatToolName(toolCalls[index].name) ===
|
|
6886
|
+
while (index < toolCalls.length && formatToolName(toolCalls[index].name) === "Read") {
|
|
6933
6887
|
group.push(toolCalls[index]);
|
|
6934
6888
|
index += 1;
|
|
6935
6889
|
}
|
|
6936
|
-
const kind = normalizedName === "Read" ? "read_group" : "load_skill_group";
|
|
6937
6890
|
items.push(
|
|
6938
|
-
group.length === 1
|
|
6939
|
-
key:
|
|
6940
|
-
kind,
|
|
6891
|
+
group.length === 1 ? { key: group[0].id, kind: "single", toolCall: group[0] } : {
|
|
6892
|
+
key: `read_group-${group.map((item) => item.id).join("-")}`,
|
|
6893
|
+
kind: "read_group",
|
|
6941
6894
|
toolCalls: group
|
|
6942
6895
|
}
|
|
6943
6896
|
);
|
|
@@ -6955,22 +6908,6 @@ function formatToolDuration2(durationMs) {
|
|
|
6955
6908
|
function formatFileName(filePath) {
|
|
6956
6909
|
return filePath.split("/").pop() ?? filePath;
|
|
6957
6910
|
}
|
|
6958
|
-
function parseToolArguments2(value) {
|
|
6959
|
-
if (!value) return null;
|
|
6960
|
-
try {
|
|
6961
|
-
const parsed = JSON.parse(value);
|
|
6962
|
-
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : null;
|
|
6963
|
-
} catch {
|
|
6964
|
-
return null;
|
|
6965
|
-
}
|
|
6966
|
-
}
|
|
6967
|
-
function getLoadedSkillName(toolCall) {
|
|
6968
|
-
const args = parseToolArguments2(toolCall.arguments);
|
|
6969
|
-
const skillId = typeof args?.skill_id === "string" ? args.skill_id.trim() : "";
|
|
6970
|
-
if (skillId) return skillId;
|
|
6971
|
-
const skillName = typeof args?.skill_name === "string" ? args.skill_name.trim() : "";
|
|
6972
|
-
return skillName || "\u672A\u77E5\u6280\u80FD";
|
|
6973
|
-
}
|
|
6974
6911
|
function getAgentToolCallIds(messages) {
|
|
6975
6912
|
return new Set(
|
|
6976
6913
|
messages.flatMap((message) => message.tool_calls ?? []).filter((toolCall) => formatToolName(toolCall.name) === "Agent").map((toolCall) => toolCall.id)
|
|
@@ -7173,12 +7110,11 @@ function AssistantMessages({
|
|
|
7173
7110
|
}
|
|
7174
7111
|
),
|
|
7175
7112
|
hasToolCalls && showToolDetails && /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-2", children: toolRenderItems.map((item) => {
|
|
7176
|
-
if (item.kind === "read_group"
|
|
7113
|
+
if (item.kind === "read_group") {
|
|
7177
7114
|
return /* @__PURE__ */ jsx30(
|
|
7178
7115
|
CompactToolGroupBlock,
|
|
7179
7116
|
{
|
|
7180
7117
|
toolCalls: item.toolCalls,
|
|
7181
|
-
kind: item.kind,
|
|
7182
7118
|
reasoning: void 0,
|
|
7183
7119
|
sessionId,
|
|
7184
7120
|
sessionStatus,
|
|
@@ -7258,7 +7194,6 @@ function isRenderableAssistantMessage(message, isStreaming) {
|
|
|
7258
7194
|
}
|
|
7259
7195
|
function CompactToolGroupBlock({
|
|
7260
7196
|
toolCalls,
|
|
7261
|
-
kind,
|
|
7262
7197
|
reasoning,
|
|
7263
7198
|
sessionId,
|
|
7264
7199
|
sessionStatus,
|
|
@@ -7277,12 +7212,11 @@ function CompactToolGroupBlock({
|
|
|
7277
7212
|
(total, toolCall) => total + (typeof toolCall.duration_ms === "number" && toolCall.duration_ms > 0 ? toolCall.duration_ms : 0),
|
|
7278
7213
|
0
|
|
7279
7214
|
);
|
|
7280
|
-
const
|
|
7215
|
+
const tags = toolCalls.map((toolCall) => {
|
|
7281
7216
|
const filePath = extractToolFilePath(toolCall);
|
|
7282
7217
|
return filePath ? formatFileName(filePath) : "\u672A\u77E5\u6587\u4EF6";
|
|
7283
7218
|
});
|
|
7284
|
-
const
|
|
7285
|
-
const title = kind === "read_group" ? `\u8BFB\u53D6 ${toolCalls.length} \u4E2A\u6587\u4EF6` : toolCalls.length > 1 ? `\u52A0\u8F7D ${toolCalls.length} \u4E2A\u6280\u80FD` : "\u52A0\u8F7D\u6280\u80FD";
|
|
7219
|
+
const title = `\u8BFB\u53D6 ${toolCalls.length} \u4E2A\u6587\u4EF6`;
|
|
7286
7220
|
return /* @__PURE__ */ jsxs25("div", { className: cn(indentClass, "text-xs"), children: [
|
|
7287
7221
|
/* @__PURE__ */ jsxs25("div", { className: cn(
|
|
7288
7222
|
"flex items-center gap-2 border-l-[3px] px-3 py-2",
|
|
@@ -7510,18 +7444,8 @@ function shortId(compactionId) {
|
|
|
7510
7444
|
}
|
|
7511
7445
|
return compactionId.slice(0, 6);
|
|
7512
7446
|
}
|
|
7513
|
-
var ARCHIVED_TOOL_LABELS = {
|
|
7514
|
-
GetSkillContent: "\u8BFB\u53D6\u6280\u80FD\u5185\u5BB9",
|
|
7515
|
-
SearchSkills: "\u641C\u7D22\u6280\u80FD",
|
|
7516
|
-
ListSkillTools: "\u5217\u51FA\u6280\u80FD\u5DE5\u5177",
|
|
7517
|
-
LoadSkillTools: "\u52A0\u8F7D\u6280\u80FD\u5DE5\u5177"
|
|
7518
|
-
};
|
|
7519
7447
|
function getArchivedToolLabel(item) {
|
|
7520
|
-
|
|
7521
|
-
if (!name) {
|
|
7522
|
-
return "\u5DE5\u5177\u8C03\u7528";
|
|
7523
|
-
}
|
|
7524
|
-
return ARCHIVED_TOOL_LABELS[name] ?? name;
|
|
7448
|
+
return item.tool_name?.trim() || "\u5DE5\u5177\u8C03\u7528";
|
|
7525
7449
|
}
|
|
7526
7450
|
function getArchivePath(item, files) {
|
|
7527
7451
|
if (item.archive_path) {
|
|
@@ -8505,4 +8429,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
|
|
|
8505
8429
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8506
8430
|
*--------------------------------------------------------------------------------------------*)
|
|
8507
8431
|
*/
|
|
8508
|
-
//# sourceMappingURL=chunk-
|
|
8432
|
+
//# sourceMappingURL=chunk-KVV7NGX2.js.map
|