gemi 0.185.0 → 0.186.1
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/ai/client/index.d.ts +1 -1
- package/dist/ai/client/index.d.ts.map +1 -1
- package/dist/ai/client/index.js +20 -4
- package/dist/ai/client/index.js.map +1 -1
- package/dist/ai/useChat.d.ts +29 -3
- package/dist/ai/useChat.d.ts.map +1 -1
- package/dist/bin/gemi.js +2 -2
- package/dist/bin/gemi.js.map +2 -2
- package/dist/{chunk-e38xa29v.js → chunk-2c2n3v4k.js} +1 -1
- package/dist/{chunk-0rkastve.js → chunk-5y6e8kpe.js} +2 -2
- package/dist/{chunk-0rkastve.js.map → chunk-5y6e8kpe.js.map} +3 -3
- package/dist/{chunk-tbss13e8.js → chunk-p4bbsa4x.js} +2 -2
- package/dist/{chunk-tbss13e8.js.map → chunk-p4bbsa4x.js.map} +1 -1
- package/dist/{chunk-ykpc18d1.js → chunk-tckf3g8x.js} +1 -1
- package/dist/{chunk-4q505by7.js → chunk-vvwhk2sb.js} +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/index.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/internal/staticNavigationRuntime.d.ts +2 -2
- package/dist/internal/staticNavigationRuntime.d.ts.map +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.js.map +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-e38xa29v.js.map → chunk-2c2n3v4k.js.map} +0 -0
- /package/dist/{chunk-ykpc18d1.js.map → chunk-tckf3g8x.js.map} +0 -0
- /package/dist/{chunk-4q505by7.js.map → chunk-vvwhk2sb.js.map} +0 -0
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
export { AttachError, useChat } from "../useChat";
|
|
22
22
|
export { openPending } from "./reducer";
|
|
23
|
-
export type { AgentAttachBody, AttachOptions, AgentRequestBody, AgentStopBody, ChatPendingToolCall, ChatStatus, SendMessageOptions, UseChatParams, UseChatResult, } from "../useChat";
|
|
23
|
+
export type { AgentAttachBody, AttachOptions, AgentRequestBody, AgentStopBody, ChatError, ChatPendingToolCall, ChatStatus, SendMessageOptions, UseChatParams, UseChatResult, } from "../useChat";
|
|
24
24
|
export type { AgentContentPart, AgentError, AgentJobRef, AgentErrorCode, AgentMessage, AgentStreamEvent, AgentStreamFrame, ClientToolResult, ClientTurn, FilePart, FinishReason, NestedRun, OutputPart, PendingToolCall, ReasoningPart, TextPart, ToolCallPart, ToolProgress, ToolApprovalRecord, ToolResultPart, JsonToolShapes, ToolShape, ToolShapes, Usage, } from "../types";
|
|
25
25
|
export type { Jsonify } from "../../utils/jsonify";
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ai/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIlD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,YAAY,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAC;AAMpB,YAAY,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,YAAY,EAGZ,SAAS,EACT,UAAU,EACV,eAAe,EACf,aAAa,EACb,QAAQ,EACR,YAAY,EAKZ,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,SAAS,EACT,UAAU,EACV,KAAK,GACN,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ai/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIlD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,YAAY,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAC;AAMpB,YAAY,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,YAAY,EAGZ,SAAS,EACT,UAAU,EACV,eAAe,EACf,aAAa,EACb,QAAQ,EACR,YAAY,EAKZ,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,SAAS,EACT,UAAU,EACV,KAAK,GACN,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/ai/client/index.js
CHANGED
|
@@ -699,15 +699,31 @@ function isAbort(error) {
|
|
|
699
699
|
async function httpError(response) {
|
|
700
700
|
let message = response.statusText || `Request failed with status ${response.status}`;
|
|
701
701
|
let code = response.status === 429 ? "rate_limited" : "unknown";
|
|
702
|
+
let serverCode;
|
|
703
|
+
let body;
|
|
702
704
|
try {
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
705
|
+
const text = await response.text();
|
|
706
|
+
if (text) try {
|
|
707
|
+
body = JSON.parse(text);
|
|
708
|
+
} catch {
|
|
709
|
+
body = text;
|
|
710
|
+
}
|
|
706
711
|
} catch {}
|
|
712
|
+
if (body && typeof body === "object") {
|
|
713
|
+
const data = body;
|
|
714
|
+
const errorMessage = typeof data.error?.message === "string" ? data.error.message : void 0;
|
|
715
|
+
const topMessage = typeof data.message === "string" ? data.message : void 0;
|
|
716
|
+
message = errorMessage ?? topMessage ?? message;
|
|
717
|
+
if (typeof data.error?.code === "string") serverCode = data.error.code;
|
|
718
|
+
if (serverCode === "thread_not_found") code = "thread_not_found";
|
|
719
|
+
}
|
|
707
720
|
return {
|
|
708
721
|
code,
|
|
709
722
|
message,
|
|
710
|
-
retryable: response.status === 429 || response.status >= 500
|
|
723
|
+
retryable: response.status === 429 || response.status >= 500,
|
|
724
|
+
status: response.status,
|
|
725
|
+
...serverCode !== void 0 ? { serverCode } : {},
|
|
726
|
+
...body !== void 0 ? { body } : {}
|
|
711
727
|
};
|
|
712
728
|
}
|
|
713
729
|
function abortError() {
|