@blade-hq/agent-kit 0.5.25 → 0.5.27
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/{SkillStatusBar-BUisTEAL.d.ts → SkillStatusBar-CvgcEiSi.d.ts} +6 -3
- package/dist/{blade-client-KmBClau6.d.ts → blade-client-DoodJJDz.d.ts} +42 -1
- package/dist/{chunk-PKQKLRFQ.js → chunk-3HFYDOHY.js} +20 -4
- package/dist/chunk-3HFYDOHY.js.map +1 -0
- package/dist/{chunk-HAFDWDFG.js → chunk-CDL6Y4W7.js} +2 -2
- package/dist/{chunk-SENUKC7C.js → chunk-CTNH3GZY.js} +44 -13
- package/dist/chunk-CTNH3GZY.js.map +1 -0
- package/dist/{chunk-UQWHEHG3.js → chunk-JIPDSO26.js} +11 -5
- package/dist/chunk-JIPDSO26.js.map +1 -0
- package/dist/{chunk-FZXLII7S.js → chunk-OF7ZBBTH.js} +20 -2
- package/dist/chunk-OF7ZBBTH.js.map +1 -0
- package/dist/{chunk-7EVVRQ7G.js → chunk-ZWO6YBLA.js} +4 -3
- package/dist/chunk-ZWO6YBLA.js.map +1 -0
- package/dist/client/index.d.ts +426 -6
- package/dist/client/index.js +1 -1
- package/dist/react/api/vibe-coding.d.ts +2 -2
- package/dist/react/api/vibe-coding.js +2 -2
- package/dist/react/components/chat/index.d.ts +3 -3
- package/dist/react/components/chat/index.js +5 -5
- package/dist/react/components/plan/index.js +4 -4
- package/dist/react/components/session/index.js +3 -3
- package/dist/react/components/workspace/index.d.ts +2 -2
- package/dist/react/components/workspace/index.js +3 -3
- package/dist/react/index.d.ts +27 -6
- package/dist/react/index.js +9 -7
- package/dist/react/index.js.map +1 -1
- package/dist/{sessions-DfRYZZnH.d.ts → sessions-DFGsAOPa.d.ts} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-7EVVRQ7G.js.map +0 -1
- package/dist/chunk-FZXLII7S.js.map +0 -1
- package/dist/chunk-PKQKLRFQ.js.map +0 -1
- package/dist/chunk-SENUKC7C.js.map +0 -1
- package/dist/chunk-UQWHEHG3.js.map +0 -1
- /package/dist/{chunk-HAFDWDFG.js.map → chunk-CDL6Y4W7.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getCodeLanguageFromFilename,
|
|
9
9
|
parseAskUserQuestion,
|
|
10
10
|
useHighlightedCodeHtml
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3HFYDOHY.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-JIPDSO26.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-OF7ZBBTH.js";
|
|
64
64
|
import {
|
|
65
65
|
registerBridgeIframe,
|
|
66
66
|
tapBridgeEvent
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
ModelOption,
|
|
70
70
|
ModelsConfig,
|
|
71
71
|
ModelsResource
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-ZWO6YBLA.js";
|
|
73
73
|
import {
|
|
74
74
|
cn,
|
|
75
75
|
copyToClipboard
|
|
@@ -100,6 +100,12 @@ function useChat(sessionId) {
|
|
|
100
100
|
},
|
|
101
101
|
[sessionId]
|
|
102
102
|
);
|
|
103
|
+
const append = useCallback(
|
|
104
|
+
(msg) => {
|
|
105
|
+
getSocket().append(sessionId, msg);
|
|
106
|
+
},
|
|
107
|
+
[sessionId]
|
|
108
|
+
);
|
|
103
109
|
const stop = useCallback(async () => {
|
|
104
110
|
if (isStopping) return;
|
|
105
111
|
setIsStopping(true);
|
|
@@ -131,7 +137,7 @@ function useChat(sessionId) {
|
|
|
131
137
|
setAnswerCallback(sessionId, answer);
|
|
132
138
|
return () => setAnswerCallback(sessionId, void 0);
|
|
133
139
|
}, [answer, sessionId, setAnswerCallback]);
|
|
134
|
-
return { messages, isStreaming, isStopping, send, stop };
|
|
140
|
+
return { messages, isStreaming, isStopping, send, append, stop };
|
|
135
141
|
}
|
|
136
142
|
function buildPendingAskUserAnswer(sessionId, message) {
|
|
137
143
|
const session = useSessionStore.getState().sessions.find((item) => item.id === sessionId);
|
|
@@ -2657,6 +2663,7 @@ function showVoiceInputErrorToast(error) {
|
|
|
2657
2663
|
}
|
|
2658
2664
|
function ChatInput({
|
|
2659
2665
|
onSend,
|
|
2666
|
+
onAppend,
|
|
2660
2667
|
onStop,
|
|
2661
2668
|
isStreaming,
|
|
2662
2669
|
isStopping = false,
|
|
@@ -2677,8 +2684,10 @@ function ChatInput({
|
|
|
2677
2684
|
skillStatusBarClassName,
|
|
2678
2685
|
skillStatusBarInnerClassName,
|
|
2679
2686
|
onResyncSkills,
|
|
2680
|
-
isResyncingSkills = false
|
|
2687
|
+
isResyncingSkills = false,
|
|
2688
|
+
inputLabel = "\u8F93\u5165\u6D88\u606F"
|
|
2681
2689
|
}) {
|
|
2690
|
+
const resolvedInputLabel = inputLabel?.trim() || "\u8F93\u5165\u6D88\u606F";
|
|
2682
2691
|
const [input, setInputInternal] = useState8(externalDraft?.value ?? "");
|
|
2683
2692
|
const setInput = useEffectEvent2((value) => {
|
|
2684
2693
|
setInputInternal(value);
|
|
@@ -3015,7 +3024,9 @@ function ChatInput({
|
|
|
3015
3024
|
},
|
|
3016
3025
|
editorProps: {
|
|
3017
3026
|
attributes: {
|
|
3018
|
-
"aria-label":
|
|
3027
|
+
"aria-label": resolvedInputLabel,
|
|
3028
|
+
"data-testid": "chat-message-input",
|
|
3029
|
+
"data-blade-input-label": resolvedInputLabel,
|
|
3019
3030
|
class: "min-h-[40px] max-h-[240px] overflow-y-auto px-4 py-3 text-sm leading-relaxed text-[hsl(var(--foreground))] focus:outline-none [&_.file-mention-pill]:inline-flex [&_.file-mention-pill]:items-center [&_.file-mention-pill]:rounded-full [&_.file-mention-pill]:bg-[hsl(var(--accent))] [&_.file-mention-pill]:px-2 [&_.file-mention-pill]:py-0.5 [&_.file-mention-pill]:font-medium [&_.file-mention-pill]:text-[hsl(var(--primary))] [&_.file-mention-pill]:select-none [&_.file-mention-pill]:whitespace-nowrap [&_.skill-mention-pill]:inline-flex [&_.skill-mention-pill]:items-center [&_.skill-mention-pill]:rounded-full [&_.skill-mention-pill]:bg-[hsl(var(--primary)/0.15)] [&_.skill-mention-pill]:px-2 [&_.skill-mention-pill]:py-0.5 [&_.skill-mention-pill]:font-medium [&_.skill-mention-pill]:text-[hsl(var(--primary))] [&_.skill-mention-pill]:select-none [&_.skill-mention-pill]:whitespace-nowrap [&_p:first-child]:mt-0 [&_p:last-child]:mb-0"
|
|
3020
3031
|
},
|
|
3021
3032
|
handleDOMEvents: {
|
|
@@ -3076,6 +3087,12 @@ function ChatInput({
|
|
|
3076
3087
|
}
|
|
3077
3088
|
}
|
|
3078
3089
|
});
|
|
3090
|
+
useEffect7(() => {
|
|
3091
|
+
const dom = editor?.view.dom;
|
|
3092
|
+
if (!dom) return;
|
|
3093
|
+
dom.setAttribute("aria-label", resolvedInputLabel);
|
|
3094
|
+
dom.setAttribute("data-blade-input-label", resolvedInputLabel);
|
|
3095
|
+
}, [editor, resolvedInputLabel]);
|
|
3079
3096
|
useEffect7(() => {
|
|
3080
3097
|
if (!editor || !activeSessionId || rewindDraft == null) {
|
|
3081
3098
|
return;
|
|
@@ -3135,12 +3152,13 @@ function ChatInput({
|
|
|
3135
3152
|
}
|
|
3136
3153
|
editor.chain().focus("end").insertContent(text).run();
|
|
3137
3154
|
});
|
|
3155
|
+
const editorReady = editor != null;
|
|
3138
3156
|
useEffect7(() => {
|
|
3139
|
-
if (!draftAppends?.length) {
|
|
3157
|
+
if (!editorReady || !draftAppends?.length) {
|
|
3140
3158
|
return;
|
|
3141
3159
|
}
|
|
3142
3160
|
applyDraftAppends();
|
|
3143
|
-
}, [applyDraftAppends, draftAppends]);
|
|
3161
|
+
}, [applyDraftAppends, draftAppends, editorReady]);
|
|
3144
3162
|
const applySendRequests = useEffectEvent2(() => {
|
|
3145
3163
|
if (!activeSessionId) {
|
|
3146
3164
|
return;
|
|
@@ -3183,7 +3201,16 @@ function ChatInput({
|
|
|
3183
3201
|
}
|
|
3184
3202
|
}, [activeSessionId, isRecording]);
|
|
3185
3203
|
const handleSubmit = async () => {
|
|
3186
|
-
if (
|
|
3204
|
+
if (connectionStatus !== "connected") {
|
|
3205
|
+
return;
|
|
3206
|
+
}
|
|
3207
|
+
if (isStreaming) {
|
|
3208
|
+
if (!onAppend) return;
|
|
3209
|
+
const json = editor?.getJSON();
|
|
3210
|
+
const text = serializeEditorContent(json);
|
|
3211
|
+
if (!text.trim()) return;
|
|
3212
|
+
onAppend(text);
|
|
3213
|
+
editor?.commands.clearContent();
|
|
3187
3214
|
return;
|
|
3188
3215
|
}
|
|
3189
3216
|
if (isModelLoading) {
|
|
@@ -6439,7 +6466,7 @@ function UserMessageBubble({ message, className }) {
|
|
|
6439
6466
|
}
|
|
6440
6467
|
),
|
|
6441
6468
|
/* @__PURE__ */ jsx29(MessageContextPills, { contexts: textContexts }),
|
|
6442
|
-
trimmedClean && /* @__PURE__ */ jsx29("div", { className: "rounded-2xl border border-[hsl(var(--user-msg-border))] bg-[hsl(var(--user-msg-bg))] px-4 py-2.5 text-sm leading-relaxed text-[hsl(var(--user-msg-fg))] shadow-[inset_0_1px_0_rgba(255,255,255,0.04)]", children: /* @__PURE__ */ jsx29(
|
|
6469
|
+
trimmedClean && /* @__PURE__ */ jsx29("div", { className: "max-w-full rounded-2xl border border-[hsl(var(--user-msg-border))] bg-[hsl(var(--user-msg-bg))] px-4 py-2.5 text-sm leading-relaxed text-[hsl(var(--user-msg-fg))] shadow-[inset_0_1px_0_rgba(255,255,255,0.04)]", children: /* @__PURE__ */ jsx29(
|
|
6443
6470
|
MarkdownContent,
|
|
6444
6471
|
{
|
|
6445
6472
|
className: USER_MESSAGE_MARKDOWN_CLASS,
|
|
@@ -8370,6 +8397,7 @@ function ChatView({
|
|
|
8370
8397
|
canShareSession = false,
|
|
8371
8398
|
onResyncSkills,
|
|
8372
8399
|
isResyncingSkills = false,
|
|
8400
|
+
inputLabel,
|
|
8373
8401
|
classNames,
|
|
8374
8402
|
components,
|
|
8375
8403
|
renderers
|
|
@@ -8379,6 +8407,7 @@ function ChatView({
|
|
|
8379
8407
|
isStreaming,
|
|
8380
8408
|
isStopping,
|
|
8381
8409
|
send,
|
|
8410
|
+
append,
|
|
8382
8411
|
stop
|
|
8383
8412
|
} = useChat(sessionId);
|
|
8384
8413
|
const session = useSessionStore((s) => s.sessions.find((ss) => ss.id === sessionId));
|
|
@@ -8431,6 +8460,7 @@ function ChatView({
|
|
|
8431
8460
|
ChatInput,
|
|
8432
8461
|
{
|
|
8433
8462
|
onSend: (msg, _targetSessionId, model) => send(msg, mode, void 0, { model: model || void 0 }),
|
|
8463
|
+
onAppend: append,
|
|
8434
8464
|
onStop: stop,
|
|
8435
8465
|
isStreaming,
|
|
8436
8466
|
isStopping,
|
|
@@ -8446,7 +8476,8 @@ function ChatView({
|
|
|
8446
8476
|
skillStatusBarClassName: classNames?.skillStatusBarRoot,
|
|
8447
8477
|
skillStatusBarInnerClassName: classNames?.skillStatusBarInner,
|
|
8448
8478
|
onResyncSkills,
|
|
8449
|
-
isResyncingSkills
|
|
8479
|
+
isResyncingSkills,
|
|
8480
|
+
inputLabel
|
|
8450
8481
|
}
|
|
8451
8482
|
)
|
|
8452
8483
|
] });
|
|
@@ -8503,4 +8534,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
|
|
|
8503
8534
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8504
8535
|
*--------------------------------------------------------------------------------------------*)
|
|
8505
8536
|
*/
|
|
8506
|
-
//# sourceMappingURL=chunk-
|
|
8537
|
+
//# sourceMappingURL=chunk-CTNH3GZY.js.map
|