@blade-hq/agent-kit 1.0.31 → 1.0.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-XUWAM6MF.js → chunk-E7FQV4IX.js} +3 -3
- package/dist/{chunk-ZPZMN7KQ.js → chunk-EGGBOVVF.js} +2 -2
- package/dist/{chunk-3EVO45IN.js → chunk-F4Y7SUBC.js} +2 -2
- package/dist/{chunk-DSC6KQOI.js → chunk-FK4CV6R2.js} +5 -2
- package/dist/chunk-FK4CV6R2.js.map +1 -0
- package/dist/{chunk-3PX2W7II.js → chunk-IDVNG3YJ.js} +15 -2
- package/dist/chunk-IDVNG3YJ.js.map +1 -0
- package/dist/{chunk-RAWQ7LWR.js → chunk-IGMLETZX.js} +33 -6
- package/dist/chunk-IGMLETZX.js.map +1 -0
- package/dist/{chunk-O32JOWYM.js → chunk-OICNN4K4.js} +2 -2
- package/dist/client/index.js +1 -1
- package/dist/client/types/rest.d.ts +65 -136
- package/dist/react/api/published-apps.js +3 -3
- package/dist/react/api/sessions.js +2 -2
- package/dist/react/components/chat/MessageList.d.ts +1 -0
- package/dist/react/components/chat/ResourceIframe.d.ts +1 -1
- 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.js +3 -3
- package/dist/react/index.js +7 -7
- package/dist/react/lib/ui-meta.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunk-3PX2W7II.js.map +0 -1
- package/dist/chunk-DSC6KQOI.js.map +0 -1
- package/dist/chunk-RAWQ7LWR.js.map +0 -1
- /package/dist/{chunk-XUWAM6MF.js.map → chunk-E7FQV4IX.js.map} +0 -0
- /package/dist/{chunk-ZPZMN7KQ.js.map → chunk-EGGBOVVF.js.map} +0 -0
- /package/dist/{chunk-3EVO45IN.js.map → chunk-F4Y7SUBC.js.map} +0 -0
- /package/dist/{chunk-O32JOWYM.js.map → chunk-OICNN4K4.js.map} +0 -0
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
getCodeLanguageFromFilename,
|
|
14
14
|
parseAskUserQuestion,
|
|
15
15
|
useHighlightedCodeHtml
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-E7FQV4IX.js";
|
|
17
17
|
import {
|
|
18
18
|
getSessionFilePath,
|
|
19
19
|
resolveSessionFilePreviewTarget
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OICNN4K4.js";
|
|
21
21
|
import {
|
|
22
22
|
apiFetchResponse,
|
|
23
23
|
buildMessageContent,
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
listSessionSkills,
|
|
48
48
|
listSessions,
|
|
49
49
|
normalizeMessageContent,
|
|
50
|
+
resolveBrowserResourceUri,
|
|
50
51
|
resolveEffectiveTheme,
|
|
51
52
|
resourceBridgeDispatch,
|
|
52
53
|
searchSkills,
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
62
63
|
useUiBridgeStore,
|
|
63
64
|
useUiStore,
|
|
64
65
|
writeFile
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-IDVNG3YJ.js";
|
|
66
67
|
import {
|
|
67
68
|
registerBridgeIframe,
|
|
68
69
|
tapBridgeEvent
|
|
@@ -71,7 +72,7 @@ import {
|
|
|
71
72
|
ModelOption,
|
|
72
73
|
ModelsConfig,
|
|
73
74
|
ModelsResource
|
|
74
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-FK4CV6R2.js";
|
|
75
76
|
import {
|
|
76
77
|
cn,
|
|
77
78
|
copyToClipboard
|
|
@@ -4854,7 +4855,8 @@ function ResourceIframe({ ui, sessionId }) {
|
|
|
4854
4855
|
const activeSessionId = useSessionStore((state) => state.activeSessionId);
|
|
4855
4856
|
const isStreaming = useChatStore((state) => state.isStreaming[sessionId] ?? false);
|
|
4856
4857
|
const theme = useUiStore((state) => state.theme);
|
|
4857
|
-
const
|
|
4858
|
+
const rawResourceUri = ui.resourceUri ?? ui.resourceURI;
|
|
4859
|
+
const resourceUri = rawResourceUri ? resolveBrowserResourceUri(rawResourceUri) : void 0;
|
|
4858
4860
|
const iframeLabel = ui.title ?? resourceUri ?? "\u5DE5\u5177\u754C\u9762";
|
|
4859
4861
|
const [autoHeight, setAutoHeight] = useState11(null);
|
|
4860
4862
|
useEffect10(() => {
|
|
@@ -8531,6 +8533,9 @@ function calculateAnchoredScrollTop({
|
|
|
8531
8533
|
|
|
8532
8534
|
// src/react/components/chat/MessageList.tsx
|
|
8533
8535
|
import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
8536
|
+
function shouldAppendPendingAssistantTurn(sessionIsStreaming, lastMessage) {
|
|
8537
|
+
return sessionIsStreaming && lastMessage !== void 0 && isUserMessage(lastMessage);
|
|
8538
|
+
}
|
|
8534
8539
|
function parseModeChange(message) {
|
|
8535
8540
|
if (message.kind !== "mode_change" || typeof message.content !== "string") {
|
|
8536
8541
|
return null;
|
|
@@ -8709,6 +8714,28 @@ function MessageList({
|
|
|
8709
8714
|
if (last?.type === "assistant_turn") {
|
|
8710
8715
|
;
|
|
8711
8716
|
last.isStreaming = true;
|
|
8717
|
+
} else if (shouldAppendPendingAssistantTurn(
|
|
8718
|
+
sessionIsStreaming,
|
|
8719
|
+
last?.type === "message" ? last.message : void 0
|
|
8720
|
+
)) {
|
|
8721
|
+
assistantTurnCount += 1;
|
|
8722
|
+
const pendingKey = `pending-assistant-${last.key}`;
|
|
8723
|
+
blocks.push({
|
|
8724
|
+
type: "assistant_turn",
|
|
8725
|
+
messages: [
|
|
8726
|
+
{
|
|
8727
|
+
role: "assistant",
|
|
8728
|
+
content: "",
|
|
8729
|
+
entry_id: pendingKey,
|
|
8730
|
+
status: "streaming",
|
|
8731
|
+
loop_name: "root"
|
|
8732
|
+
}
|
|
8733
|
+
],
|
|
8734
|
+
key: pendingKey,
|
|
8735
|
+
anchorId: `chat-turn-${assistantTurnCount}`,
|
|
8736
|
+
isStreaming: true,
|
|
8737
|
+
railTitle: lastUserPreview || "\u672C\u8F6E\u56DE\u590D"
|
|
8738
|
+
});
|
|
8712
8739
|
}
|
|
8713
8740
|
}
|
|
8714
8741
|
const activeAssistantKeys = new Set(
|
|
@@ -9340,4 +9367,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
|
|
|
9340
9367
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
9341
9368
|
*--------------------------------------------------------------------------------------------*)
|
|
9342
9369
|
*/
|
|
9343
|
-
//# sourceMappingURL=chunk-
|
|
9370
|
+
//# sourceMappingURL=chunk-IGMLETZX.js.map
|