@blade-hq/agent-kit 0.5.3 → 0.5.4
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-IRCXJHXT.js → chunk-3ZEWA2YM.js} +2 -2
- package/dist/{chunk-ZQQNSKQS.js → chunk-557R7QZV.js} +2 -2
- package/dist/{chunk-UQEXX57F.js → chunk-HWOVPFWG.js} +15 -13
- package/dist/chunk-HWOVPFWG.js.map +1 -0
- package/dist/{chunk-BFF6D2XV.js → chunk-NEI66DW6.js} +2 -2
- package/dist/{chunk-RTBAPZIO.js → chunk-S6EPGDAL.js} +15 -6
- package/dist/chunk-S6EPGDAL.js.map +1 -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 +2 -2
- package/dist/react/components/session/index.js +2 -2
- package/dist/react/components/workspace/index.js +2 -2
- package/dist/react/index.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-RTBAPZIO.js.map +0 -1
- package/dist/chunk-UQEXX57F.js.map +0 -1
- /package/dist/{chunk-IRCXJHXT.js.map → chunk-3ZEWA2YM.js.map} +0 -0
- /package/dist/{chunk-ZQQNSKQS.js.map → chunk-557R7QZV.js.map} +0 -0
- /package/dist/{chunk-BFF6D2XV.js.map → chunk-NEI66DW6.js.map} +0 -0
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
getCodeLanguageFromFilename,
|
|
9
9
|
parseAskUserQuestion,
|
|
10
10
|
useHighlightedCodeHtml
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-557R7QZV.js";
|
|
12
12
|
import {
|
|
13
13
|
Collapsible,
|
|
14
14
|
CollapsibleContent,
|
|
15
15
|
CollapsibleTrigger,
|
|
16
16
|
resolveSessionFilePreviewTarget
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3ZEWA2YM.js";
|
|
18
18
|
import {
|
|
19
19
|
buildMessageContent,
|
|
20
20
|
buildToolPreviewKey,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
useUiBridgeStore,
|
|
58
58
|
useUiStore,
|
|
59
59
|
writeFile
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-HWOVPFWG.js";
|
|
61
61
|
import {
|
|
62
62
|
registerBridgeIframe,
|
|
63
63
|
tapBridgeEvent
|
|
@@ -2711,7 +2711,7 @@ function ChatInput({
|
|
|
2711
2711
|
const draftAppends = useUiBridgeStore(
|
|
2712
2712
|
(state) => activeSessionId ? state.draftAppends[activeSessionId] : void 0
|
|
2713
2713
|
);
|
|
2714
|
-
const { resolvedModel } = useResolvedModel(activeSessionModel);
|
|
2714
|
+
const { resolvedModel, hasAvailableModel, isLoading: isModelLoading } = useResolvedModel(activeSessionModel);
|
|
2715
2715
|
useEffect7(() => {
|
|
2716
2716
|
setSelectedModel(resolvedModel);
|
|
2717
2717
|
}, [resolvedModel]);
|
|
@@ -3154,6 +3154,13 @@ function ChatInput({
|
|
|
3154
3154
|
if (isStreaming || connectionStatus !== "connected") {
|
|
3155
3155
|
return;
|
|
3156
3156
|
}
|
|
3157
|
+
if (isModelLoading) {
|
|
3158
|
+
return;
|
|
3159
|
+
}
|
|
3160
|
+
if (!hasAvailableModel) {
|
|
3161
|
+
toast.error("\u6CA1\u6709\u53EF\u7528\u6A21\u578B\uFF0C\u8BF7\u68C0\u67E5\u6A21\u578B\u670D\u52A1\u914D\u7F6E");
|
|
3162
|
+
return;
|
|
3163
|
+
}
|
|
3157
3164
|
if (submittingRef.current) {
|
|
3158
3165
|
return;
|
|
3159
3166
|
}
|
|
@@ -3293,10 +3300,11 @@ function ChatInput({
|
|
|
3293
3300
|
(attachment) => attachment.status === "uploading"
|
|
3294
3301
|
);
|
|
3295
3302
|
const hasValidAttachments = composerAttachments.some((attachment) => attachment.status !== "failed");
|
|
3296
|
-
const isSendDisabled = connectionStatus !== "connected" || hasUploadingFiles || !input.trim() && !hasValidAttachments && !hasRenderedAttachments && !hasPendingContexts;
|
|
3303
|
+
const isSendDisabled = connectionStatus !== "connected" || isModelLoading || !hasAvailableModel || hasUploadingFiles || !input.trim() && !hasValidAttachments && !hasRenderedAttachments && !hasPendingContexts;
|
|
3297
3304
|
return /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
3298
3305
|
/* @__PURE__ */ jsx9("div", { className: `bg-[hsl(var(--background))] px-5 py-3 ${className ?? ""}`, children: /* @__PURE__ */ jsxs8("div", { className: `mx-auto ${maxWidthClassName} ${innerClassName ?? ""}`, children: [
|
|
3299
3306
|
activeSessionId ? /* @__PURE__ */ jsx9(BackgroundTasksPill, { sessionId: activeSessionId }) : null,
|
|
3307
|
+
!isModelLoading && !hasAvailableModel ? /* @__PURE__ */ jsx9("div", { className: "mb-2 rounded-lg border border-[hsl(var(--destructive))]/30 bg-[hsl(var(--destructive))]/8 px-3 py-2 text-xs text-[hsl(var(--destructive))]", children: "\u6CA1\u6709\u53EF\u7528\u6A21\u578B\uFF0C\u8BF7\u68C0\u67E5\u6A21\u578B\u670D\u52A1\u914D\u7F6E" }) : null,
|
|
3300
3308
|
/* @__PURE__ */ jsx9(
|
|
3301
3309
|
"div",
|
|
3302
3310
|
{
|
|
@@ -3664,6 +3672,7 @@ function ChatInput({
|
|
|
3664
3672
|
onClick: handleSubmit,
|
|
3665
3673
|
disabled: isSendDisabled || isRecording,
|
|
3666
3674
|
"aria-label": "\u53D1\u9001\u6D88\u606F",
|
|
3675
|
+
title: isModelLoading ? "\u6B63\u5728\u52A0\u8F7D\u6A21\u578B\u914D\u7F6E" : !hasAvailableModel ? "\u6CA1\u6709\u53EF\u7528\u6A21\u578B\uFF0C\u8BF7\u68C0\u67E5\u6A21\u578B\u670D\u52A1\u914D\u7F6E" : "\u53D1\u9001\u6D88\u606F",
|
|
3667
3676
|
className: "flex h-7 w-7 items-center justify-center rounded-lg bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] transition-opacity hover:opacity-80 disabled:opacity-25",
|
|
3668
3677
|
children: /* @__PURE__ */ jsx9(Send, { size: 13 })
|
|
3669
3678
|
}
|
|
@@ -8387,4 +8396,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
|
|
|
8387
8396
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8388
8397
|
*--------------------------------------------------------------------------------------------*)
|
|
8389
8398
|
*/
|
|
8390
|
-
//# sourceMappingURL=chunk-
|
|
8399
|
+
//# sourceMappingURL=chunk-S6EPGDAL.js.map
|