@blade-hq/agent-react 2610.0.7 → 2610.0.8-beta.0
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/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2989,7 +2989,7 @@ function TurnNavRail({
|
|
|
2989
2989
|
|
|
2990
2990
|
// src/components/AgentChat.tsx
|
|
2991
2991
|
import {
|
|
2992
|
-
BladeApiError as
|
|
2992
|
+
BladeApiError as BladeApiError3,
|
|
2993
2993
|
canEditQueuedMessage as canEditQueuedMessage2,
|
|
2994
2994
|
EMPTY_SESSION_QUEUE,
|
|
2995
2995
|
latestPostChatFollowup
|
|
@@ -21019,7 +21019,7 @@ function CurrentPlanPanel({
|
|
|
21019
21019
|
}
|
|
21020
21020
|
|
|
21021
21021
|
// src/components/ChatSurface.tsx
|
|
21022
|
-
import { buildMessageContent, chatErrorForDisplay as chatErrorForDisplay2, getTextContent as getTextContent4 } from "@blade-hq/agent-client";
|
|
21022
|
+
import { BladeApiError as BladeApiError2, buildMessageContent, chatErrorForDisplay as chatErrorForDisplay2, getTextContent as getTextContent4 } from "@blade-hq/agent-client";
|
|
21023
21023
|
import { useMemo as useMemo17, useRef as useRef30, useState as useState36 } from "react";
|
|
21024
21024
|
|
|
21025
21025
|
// src/lib/random-id.ts
|
|
@@ -58651,10 +58651,11 @@ function ChatSurface({
|
|
|
58651
58651
|
const index3 = indices.get(item.id);
|
|
58652
58652
|
if (index3 === void 0) return item;
|
|
58653
58653
|
const outcome = outcomes.get(index3);
|
|
58654
|
-
return outcome?.path ? { ...item, path: outcome.path } : { ...item, error: outcome?.error
|
|
58654
|
+
return outcome?.path ? { ...item, path: outcome.path } : { ...item, error: outcome?.error === "too_large" ? "\u6587\u4EF6\u8D85\u8FC7\u5927\u5C0F\u9650\u5236" : outcome?.error || "\u4E0A\u4F20\u6587\u4EF6\u5931\u8D25" };
|
|
58655
58655
|
}));
|
|
58656
|
-
} catch {
|
|
58657
|
-
|
|
58656
|
+
} catch (error61) {
|
|
58657
|
+
const message = error61 instanceof BladeApiError2 ? error61.message : "\u4E0A\u4F20\u6587\u4EF6\u5931\u8D25";
|
|
58658
|
+
setPendingFiles((items) => items.map((item) => indices.has(item.id) ? { ...item, error: message } : item));
|
|
58658
58659
|
}
|
|
58659
58660
|
}
|
|
58660
58661
|
const sendWithApps = async (text4) => {
|
|
@@ -58825,7 +58826,7 @@ ${item.content}`), text4].filter(Boolean).join("\n\n");
|
|
|
58825
58826
|
// src/components/AgentChat.tsx
|
|
58826
58827
|
import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
58827
58828
|
function isUnauthorizedError(error61) {
|
|
58828
|
-
return error61 instanceof
|
|
58829
|
+
return error61 instanceof BladeApiError3 && error61.status === 401;
|
|
58829
58830
|
}
|
|
58830
58831
|
function LoginCard({ client, onLoggedIn }) {
|
|
58831
58832
|
const [loggingIn, setLoggingIn] = useState37(false);
|