@shumai-one/shumai 0.4.3 → 0.4.5
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/bin/{chunk-xp59apdb.js → chunk-0z8tgn67.js} +1 -1
- package/bin/{chunk-87zxtf66.js → chunk-18qzk2mm.js} +2 -2
- package/bin/{chunk-rbj4fad9.js → chunk-1b7gg0nx.js} +13 -13
- package/bin/{chunk-rpywcvg1.js → chunk-1hnpvtvf.js} +2 -2
- package/bin/chunk-1n1h09e9.js +2 -0
- package/bin/{chunk-q2bvyv39.js → chunk-1yv06e0q.js} +2 -2
- package/bin/chunk-20ee2pqp.js +4 -0
- package/bin/chunk-20yset6k.js +1 -0
- package/bin/{chunk-zqv0zhfb.js → chunk-21e4gjvw.js} +2 -2
- package/bin/{chunk-v9b3w8q5.js → chunk-23bg4h8n.js} +2 -2
- package/bin/chunk-2swjkvxv.js +211 -0
- package/bin/chunk-2y6teq4s.js +11 -0
- package/bin/chunk-3115qtvj.js +2 -0
- package/bin/{chunk-f15qyp41.js → chunk-3c0tcbga.js} +1 -1
- package/bin/{chunk-v9w25rp2.js → chunk-3mfdp2nh.js} +2 -2
- package/bin/chunk-3rwx54z7.js +2 -0
- package/bin/chunk-3x3sf7rp.js +3 -0
- package/bin/{chunk-4v5n0ayb.js → chunk-3x80f4jk.js} +1 -1
- package/bin/chunk-42ygnm34.js +2 -0
- package/bin/{chunk-wfzqnpc1.js → chunk-46wfxyd7.js} +2 -2
- package/bin/{chunk-b235azv4.js → chunk-48rbc18e.js} +13 -13
- package/bin/{chunk-4r81ghg8.js → chunk-4k2bej3c.js} +2 -2
- package/bin/{chunk-0e4wawpq.js → chunk-5trfc3xh.js} +1 -1
- package/bin/chunk-5xcjnbm9.js +1 -0
- package/bin/chunk-685gzbdg.js +14 -0
- package/bin/chunk-6kzm51c7.js +2 -0
- package/bin/{chunk-cak32x57.js → chunk-73evafrq.js} +1 -1
- package/bin/{chunk-fxswt9hc.js → chunk-7jtmwt5a.js} +2 -2
- package/bin/{chunk-av1a8fqp.js → chunk-7sc73pfr.js} +2 -2
- package/bin/{chunk-qwqvt9v6.js → chunk-7t1r3sj3.js} +2 -2
- package/bin/{chunk-vgn5zcpv.js → chunk-7v7mypc6.js} +2 -2
- package/bin/chunk-813885jm.js +1 -0
- package/bin/{chunk-bay038pj.js → chunk-8yg9zy53.js} +2 -2
- package/bin/chunk-923agf2d.js +1 -0
- package/bin/chunk-942ksfnj.js +2 -0
- package/bin/chunk-99yzvkq5.js +2 -0
- package/bin/chunk-9by727gr.js +2 -0
- package/bin/chunk-9sr1z8kv.js +42 -0
- package/bin/chunk-a0fggks8.js +2 -0
- package/bin/{chunk-cqb415s6.js → chunk-a3j3hyx2.js} +2 -2
- package/bin/chunk-a8x0dmec.js +2 -0
- package/bin/{chunk-tf28796q.js → chunk-af1mcn9p.js} +1 -1
- package/bin/{chunk-ea79xnn3.js → chunk-azafjrm4.js} +2 -2
- package/bin/{chunk-qf24e71w.js → chunk-b5a77dzv.js} +1 -1
- package/bin/chunk-b80fgsdf.js +1 -0
- package/bin/{chunk-n1jwdb0a.js → chunk-bg6kp843.js} +1 -1
- package/bin/chunk-brxwrh0b.js +11 -0
- package/bin/{chunk-zmv8cg4s.js → chunk-c51tvhra.js} +3 -3
- package/bin/chunk-c5dr9m1d.js +2 -0
- package/bin/{chunk-8fmy5jtp.js → chunk-cbpgrg5j.js} +1 -1
- package/bin/{chunk-m7m9d4fb.js → chunk-cwfjvynz.js} +2 -2
- package/bin/{chunk-66hsjnw6.js → chunk-da2w7c80.js} +2 -2
- package/bin/{chunk-1yacmegc.js → chunk-dchtr0ap.js} +2 -2
- package/bin/chunk-dqxh6dwz.js +16 -0
- package/bin/chunk-e1s1zgv0.js +2 -0
- package/bin/chunk-erharpzt.js +2 -0
- package/bin/{chunk-f3ehv01n.js → chunk-f3pb9mh9.js} +26 -26
- package/bin/chunk-fp8x63vs.js +2 -0
- package/bin/chunk-ft11rrhz.js +1 -0
- package/bin/chunk-fyszcddw.js +2 -0
- package/bin/chunk-g6hq18q1.js +1 -0
- package/bin/{chunk-wry2hvrq.js → chunk-g6xgghnq.js} +4 -4
- package/bin/{chunk-hfh0c082.js → chunk-gdg0tkbk.js} +1 -1
- package/bin/{chunk-3cyrcgm5.js → chunk-gjp851vj.js} +9 -9
- package/bin/{chunk-ehc9adfz.js → chunk-gy68h3x5.js} +2 -2
- package/bin/chunk-h4s1fgf1.js +2 -0
- package/bin/chunk-hsv4v7na.js +1 -0
- package/bin/chunk-j3kjscfj.js +2 -0
- package/bin/chunk-jbt3e1ac.js +7 -0
- package/bin/chunk-jrf90z42.js +3 -0
- package/bin/chunk-k2aqztk1.js +2 -0
- package/bin/{chunk-3a13dcs1.js → chunk-kfpfqxb3.js} +1 -1
- package/bin/chunk-kyxramkk.js +1 -0
- package/bin/chunk-m5z5mzan.js +2 -0
- package/bin/chunk-n48548fs.js +4 -0
- package/bin/chunk-ncnr223m.js +2 -0
- package/bin/chunk-ncp007yb.js +12 -0
- package/bin/{chunk-2291ehh5.js → chunk-ncqhp76x.js} +2 -2
- package/bin/chunk-njswnpaq.js +3 -0
- package/bin/{chunk-pb1zf0vb.js → chunk-nkmr6gqc.js} +2 -2
- package/bin/chunk-nngp6fhe.js +1 -0
- package/bin/chunk-nzggcbgk.js +20 -0
- package/bin/chunk-p1nb8wk8.js +3 -0
- package/bin/{chunk-6gg1ymer.js → chunk-p4yrnr37.js} +2 -2
- package/bin/chunk-pc2dnpkh.js +2 -0
- package/bin/{chunk-sfx2588q.js → chunk-pdrmbxrt.js} +2 -2
- package/bin/chunk-pmj9b8qt.js +3 -0
- package/bin/{chunk-h3tbf521.js → chunk-psk38vp4.js} +1 -1
- package/bin/{chunk-abt0azmv.js → chunk-pve3zpta.js} +2 -2
- package/bin/chunk-q3q0brsn.js +2 -0
- package/bin/{chunk-jy006gcv.js → chunk-qg1f1z3t.js} +4 -4
- package/bin/chunk-qk7me5ra.js +2 -0
- package/bin/{chunk-zehyn6vd.js → chunk-qqqarj5v.js} +2 -2
- package/bin/chunk-qysf4mpk.js +299 -0
- package/bin/chunk-r0j962y1.js +1 -0
- package/bin/chunk-r5dxd4sx.js +1 -0
- package/bin/{chunk-a32vreya.js → chunk-rq0n0vcc.js} +2 -2
- package/bin/chunk-s0caa0zm.js +5 -0
- package/bin/chunk-sa6k5ye7.js +1 -0
- package/bin/{chunk-83e12sjg.js → chunk-ss0mcgbd.js} +2 -2
- package/bin/chunk-sz6cnm4q.css +1 -0
- package/bin/{chunk-ck8azecb.js → chunk-tgee88jq.js} +5 -5
- package/bin/{chunk-ag6p3mbf.js → chunk-ty71fdw9.js} +2 -2
- package/bin/chunk-v0201sn5.js +3 -0
- package/bin/chunk-v2xt5p3x.js +10 -0
- package/bin/{chunk-2yxj593j.js → chunk-w3jmahea.js} +2 -2
- package/bin/chunk-w88h5wtf.js +1 -0
- package/bin/chunk-w9160hxz.js +5 -0
- package/bin/{chunk-k7hss0bd.js → chunk-wmkbkad1.js} +3 -3
- package/bin/{chunk-9t1ne8xr.js → chunk-wnpjz2kw.js} +2 -2
- package/bin/{chunk-8zqgaxvv.js → chunk-wrbas9cg.js} +1 -1
- package/bin/{chunk-j8fxp8ej.js → chunk-xcwjsav0.js} +1 -1
- package/bin/{chunk-jje8nj8h.js → chunk-xgy6ppww.js} +2 -2
- package/bin/{chunk-cnxwmycy.js → chunk-y13s3641.js} +3 -3
- package/bin/chunk-y78v01te.js +2 -0
- package/bin/{chunk-twdxayky.js → chunk-y8a3hans.js} +2 -2
- package/bin/chunk-z422yh6b.js +3 -0
- package/bin/chunk-z5t4yxzb.js +2 -0
- package/bin/chunk-zcfehv0w.js +18 -0
- package/bin/chunk-zg7a107s.js +3 -0
- package/bin/{chunk-e99dv20z.js → chunk-zp1sv030.js} +2 -2
- package/bin/{chunk-32pcmaqm.js → chunk-zrxe6p0q.js} +2 -2
- package/bin/chunk-zwenq5zy.js +2 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +987 -776
- package/package.json +7 -7
- package/prisma/migrations/20260907021754_add_asset_upload_id/migration.sql +2 -0
- package/prisma/migrations/20260913130237_add_asset_comment_asset_id_idx/migration.sql +2 -0
- package/prisma/schema.prisma +2 -0
- package/bin/chunk-185qefn1.js +0 -2
- package/bin/chunk-1kw2mbqb.js +0 -1
- package/bin/chunk-1wm6ptdx.js +0 -1
- package/bin/chunk-2520aq8j.js +0 -2
- package/bin/chunk-29zdp63z.js +0 -3
- package/bin/chunk-3swpwb9v.js +0 -1
- package/bin/chunk-3wmcx2bv.js +0 -2
- package/bin/chunk-5a8nt4me.js +0 -1
- package/bin/chunk-6bhn1p8v.js +0 -211
- package/bin/chunk-70c3xrgd.js +0 -2
- package/bin/chunk-7esm0hqb.js +0 -2
- package/bin/chunk-7fst8kdw.js +0 -12
- package/bin/chunk-a3dmtt2j.js +0 -1
- package/bin/chunk-aqbrzx9z.js +0 -1
- package/bin/chunk-awfwk64v.js +0 -2
- package/bin/chunk-b9yrw9et.js +0 -10
- package/bin/chunk-c007p0t8.js +0 -299
- package/bin/chunk-ce8m4zeg.js +0 -3
- package/bin/chunk-e2mvmq2m.js +0 -1
- package/bin/chunk-e7mqtkzn.js +0 -2
- package/bin/chunk-ejbvfj4r.js +0 -1
- package/bin/chunk-ekfem7kf.js +0 -1
- package/bin/chunk-etwkk0xh.js +0 -1
- package/bin/chunk-evrdd32b.js +0 -2
- package/bin/chunk-fm6p03ad.js +0 -2
- package/bin/chunk-fyha3r13.js +0 -2
- package/bin/chunk-g0vs7k2x.js +0 -1
- package/bin/chunk-g84z2w7v.js +0 -16
- package/bin/chunk-gk3eqd50.js +0 -2
- package/bin/chunk-h837fyed.js +0 -2
- package/bin/chunk-j20e0qsw.js +0 -7
- package/bin/chunk-p5gf1zdm.js +0 -4
- package/bin/chunk-pfgxggaj.js +0 -11
- package/bin/chunk-q16490pv.js +0 -2
- package/bin/chunk-qh81zhg1.js +0 -1
- package/bin/chunk-qwp3kwbz.js +0 -2
- package/bin/chunk-qydeqgyj.js +0 -5
- package/bin/chunk-r7dty1tg.js +0 -2
- package/bin/chunk-rhdxwebf.js +0 -2
- package/bin/chunk-rhh716z0.js +0 -42
- package/bin/chunk-rza4ae5z.js +0 -3
- package/bin/chunk-sk4e6rb1.js +0 -1
- package/bin/chunk-t2n1dbgx.js +0 -4
- package/bin/chunk-x8f4defx.js +0 -3
- package/bin/chunk-xtf3c29c.css +0 -1
- package/bin/chunk-z3gkt8w1.js +0 -3
- package/bin/chunk-zh6fqq44.js +0 -1
package/bin/chunk-rza4ae5z.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var k=Object.create;var{getPrototypeOf:l,defineProperty:f,getOwnPropertyNames:m}=Object;var j=Object.prototype.hasOwnProperty;function n(a){return this[a]}var o,p,Ke=(a,b,c)=>{var d=a!=null&&typeof a==="object";if(d){var h=b?o??=new WeakMap:p??=new WeakMap,i=h.get(a);if(i)return i}c=a!=null?k(l(a)):{};let e=b||!a||!a.__esModule||!j.call(a,"default")?f(c,"default",{value:a,enumerable:!0}):c;if(a&&typeof a==="object"||typeof a==="function"){for(let g of m(a))if(!j.call(e,g))f(e,g,{get:n.bind(a,g),enumerable:!0})}if(d)h.set(a,e);return e};var w=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var q=(a)=>a;function r(a,b){this[a]=q.bind(null,b)}var Ne=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0,configurable:!0,set:r.bind(b,c)})};var zp=(a,b,c)=>()=>{if(a)try{b=a(a=0)}catch(d){c=[d]}if(c)throw c[0];return b};var Fp=(a)=>JSON.parse(a);var jp=(a,b,c)=>{for(var d in b)f(a,d,{get:b[d],set:c[d],enumerable:!0,configurable:!0})},W=import.meta.require;
|
|
3
|
-
export{Ke,w,Ne,zp,Fp,jp,W};
|
package/bin/chunk-sk4e6rb1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,C,t,L,Ue,A,st,yt,Ap}from"./chunk-6bhn1p8v.js";import"./chunk-3wmcx2bv.js";import"./chunk-j20e0qsw.js";import"./chunk-ehc9adfz.js";import"./chunk-b9yrw9et.js";import"./chunk-6gg1ymer.js";import"./chunk-bay038pj.js";import"./chunk-7esm0hqb.js";import"./chunk-q16490pv.js";import"./chunk-k7hss0bd.js";import"./chunk-c007p0t8.js";import"./chunk-cqb415s6.js";import{Zn}from"./chunk-185qefn1.js";import{Wt}from"./chunk-rhdxwebf.js";import"./chunk-4r81ghg8.js";import"./chunk-gk3eqd50.js";import"./chunk-ag6p3mbf.js";import"./chunk-9t1ne8xr.js";import"./chunk-m7m9d4fb.js";import"./chunk-1yacmegc.js";import"./chunk-r7dty1tg.js";import"./chunk-2yxj593j.js";import"./chunk-ea79xnn3.js";C();function l(){let{projectId:o}=c.useParams(),{teamId:r,ensureTeamIdForProject:a}=st();h(()=>{a(o)},[o,a]);let{data:s}=Wt(Ap(o)),e=s?.rootFolder,{data:i}=L({queryKey:["folders",e],queryFn:async()=>{let n=await A.api.folders[":folderId"].$get({param:{folderId:e}});if(!n.ok)throw Error("failed to fetch folder");return await n.json()},enabled:!!e});if(!r||!e||!i)return t(yt,{});return t(Zn,{teamId:r,projectId:o,projectName:s.name??"",assetId:e,rootFolderId:e})}var c=Ue("/projects/$projectId/")({component:l});export{c as Route};
|
package/bin/chunk-t2n1dbgx.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Nr,Da,Zd,e,m,d,x,z,s,r,I,y,l,a}from"./chunk-f3ehv01n.js";function c(t,n){let o={};if(!Object.keys(n).length)return o=t,o;for(let[u,i]of Object.entries(t)){let p=n[u];if(p===null)continue;o[p??u]=i}return o}function _(t){let n={};for(let[o,u]of Object.entries(t))if(typeof u<"u")n[o]=u;return n}class j extends Error{rawValue;rawMessage;static[Symbol.hasInstance](t){if(!(t instanceof Error))return!1;if(!("rawValue"in t))return!1;if(!("rawMessage"in t))return!1;if(!("pretty"in t))return!1;if(typeof t.pretty!=="function")return!1;return!0}constructor(t,n,o){super(`${t}: ${n}`);this.name="SDKValidationError",this.cause=n,this.rawValue=o,this.rawMessage=t}pretty(){if(this.cause instanceof Da)return`${this.rawMessage}
|
|
3
|
-
${Id(this.cause)}`;else return this.toString()}}function Id(t){return Zd(t)}function Ys(t){return{ok:!0,value:t}}function Bo(t){return{ok:!1,error:t}}async function k(t){let n=await t;if(!n.ok)throw n.error;return n.value}function b(t,n,o){try{return Ys(n(t))}catch(u){return Bo(new j(o,u,t))}}var Ro=r({prompt_tokens:m().default(0),completion_tokens:m().default(0),total_tokens:m().default(0),prompt_audio_seconds:a(m()).optional()}).catchall(x()).transform((t)=>c(t,{prompt_tokens:"promptTokens",completion_tokens:"completionTokens",total_tokens:"totalTokens",prompt_audio_seconds:"promptAudioSeconds"})),kl=r({promptTokens:m().default(0),completionTokens:m().default(0),totalTokens:m().default(0),promptAudioSeconds:a(m()).optional()}).catchall(x()).transform((t)=>({...c(t,{promptTokens:"prompt_tokens",completionTokens:"completion_tokens",totalTokens:"total_tokens",promptAudioSeconds:"prompt_audio_seconds"})}));function w(t){return N++,t}var N=0,A=0;function J(){A++;let t=N;return{end:(n)=>{let o=N-t;if(N=t+(n??o),--A===0)N=0;return o}}}function Y(t){let n=Object.values(t);return I([...n.map((o)=>l(o)),e().transform((o)=>w(o))])}function Ei(t){let n=Object.values(t).filter((o)=>typeof o==="number");return I([...n.map((o)=>l(o)),m().transform((o)=>w(o))])}function lt(t){return e()}function Tp(t){return m()}var v=Symbol("UNKNOWN");function P(t){return typeof t==="object"&&t!==null&&v in t}function $e(t,n,o={}){let{unknownValue:u="UNKNOWN",outputPropertyName:i}=o;return z().transform((p)=>{let h=Object.defineProperties({raw:p,[i??t]:u,isUnknown:!0},{[v]:{value:!0,enumerable:!1,configurable:!1}});if(!(typeof p==="object"&&p!==null))return h;let g=p[t];if(typeof g!=="string")return h;if(!(g in n))return h;let U=n[g];if(!U)return h;let C=J(),O=U.safeParse(p);if(!O.success)return C.end(0),h;if(C.end(),i)O.data[i]=g;return O.data})}var K=/^\d{4}-\d{2}-\d{2}$/;class T{serialized;static today(){return new T(new Date)}constructor(t){if(typeof t==="string"&&!K.test(t))throw RangeError("RFCDate: date strings must be in the format YYYY-MM-DD: "+t);let n=new Date(t);if(isNaN(+n))throw RangeError("RFCDate: invalid date provided: "+t);if(this.serialized=n.toISOString().slice(0,10),!K.test(this.serialized))throw TypeError(`RFCDate: failed to build valid date with given value: ${t} serialized to ${this.serialized}`)}toJSON(){return this.toString()}toString(){return this.serialized}}function M(t){return z().transform((n,o)=>{let u=[],i=t.map(()=>[]),p=J();for(let[S,g]of t.entries()){let U=J(),C=g.safeParse(n),O=U.end(),ie=0;if(C.success){u.push({data:C.data,inexactCount:O,zeroDefaultCount:0,fieldCount:-1});continue}i[S].push(...C.error.issues)}if(u.length===0)return p.end(0),o.addIssue({input:n,code:"invalid_union",errors:i}),Nr;let h=u[0];for(let S of u){if(u.length>1)S.fieldCount=ne(S.data);h=te(S,h)}return p.end(h.inexactCount),h.data})}function te(t,n){let o=t.inexactCount===0,u=n.inexactCount===0;if(o!==u)return o?t:n;let i=t.fieldCount-t.zeroDefaultCount,p=n.fieldCount-n.zeroDefaultCount;if(i!==p)return i>p?t:n;return t.inexactCount<n.inexactCount?t:n}function ne(t){let n=0,o=[t],u=0;while(u<o.length){let i=o[u++];if(i===void 0||P(i))continue;let p=typeof i;if(i===null||p==="number"||p==="string"||p==="boolean"||p==="bigint"||i instanceof Date||i instanceof T){n++;continue}if(Array.isArray(i)){o.push(...i);continue}if(p==="object")o.push(...Object.values(i))}return n}var B=r({type:l("input_audio"),input_audio:e()}).transform((t)=>c(t,{input_audio:"inputAudio"})),V=r({type:l("input_audio"),inputAudio:e()}).transform((t)=>c(t,{inputAudio:"input_audio"}));var fs=r({type:l("document_url").default("document_url"),document_url:e(),document_name:a(e()).optional()}).transform((t)=>c(t,{document_url:"documentUrl",document_name:"documentName"})),Ia=r({type:l("document_url").default("document_url"),documentUrl:e(),documentName:a(e()).optional()}).transform((t)=>c(t,{documentUrl:"document_url",documentName:"document_name"}));var W=r({type:l("file").default("file"),file_id:e()}).transform((t)=>c(t,{file_id:"fileId"})),Ml=r({type:l("file").default("file"),fileId:e()}).transform((t)=>c(t,{fileId:"file_id"}));var Z={Low:"low",Auto:"auto",High:"high"},q=Y(Z),G=lt(Z);var E=r({url:e(),detail:a(q).optional()}),L=r({url:e(),detail:a(G).optional()});var Ee=M([E,e()]),Le=M([L,e()]);var ps=r({type:l("image_url").default("image_url"),image_url:M([E,e()])}).transform((t)=>c(t,{image_url:"imageUrl"})),Ta=r({type:l("image_url").default("image_url"),imageUrl:M([L,e()])}).transform((t)=>c(t,{imageUrl:"image_url"}));var Me=M([m(),e()]),Ke=M([m(),e()]);var R=r({type:l("reference").default("reference"),reference_ids:s(M([m(),e()]))}).transform((t)=>c(t,{reference_ids:"referenceIds"})),F=r({type:l("reference").default("reference"),referenceIds:s(M([m(),e()]))}).transform((t)=>c(t,{referenceIds:"reference_ids"}));var Uo=r({type:l("text").default("text"),text:e()}),zo=r({type:l("text").default("text"),text:e()});var H={WebSearch:"web_search",WebSearchPremium:"web_search_premium",CodeInterpreter:"code_interpreter",ImageGeneration:"image_generation",DocumentLibrary:"document_library"},Jr=Y(H),Ma=lt(H);var qe=M([Jr,e()]),Ge=M([Ma,e()]);var Js=r({type:l("tool_reference").default("tool_reference"),tool:M([Jr,e()]),title:e(),url:a(e()).optional(),favicon:a(e()).optional(),description:a(e()).optional()}),Rl=r({type:l("tool_reference").default("tool_reference"),tool:M([Ma,e()]),title:e(),url:a(e()).optional(),favicon:a(e()).optional(),description:a(e()).optional()});var nt=M([Js,Uo,R]),ot=M([Rl,zo,F]);var ms=r({type:l("thinking").default("thinking"),thinking:s(M([Js,Uo,R])),signature:a(e()).optional(),closed:d().optional()}),hs=r({type:l("thinking").default("thinking"),thinking:s(M([Rl,zo,F])),signature:a(e()).optional(),closed:d().optional()});var Ii=$e("type",{image_url:ps.and(r({type:l("image_url")})),document_url:fs.and(r({type:l("document_url")})),text:Uo.and(r({type:l("text")})),reference:R.and(r({type:l("reference")})),file:W.and(r({type:l("file")})),thinking:ms.and(r({type:l("thinking")})),input_audio:B}),Ra=I([Ta.and(r({type:l("image_url")})),Ia.and(r({type:l("document_url")})),zo.and(r({type:l("text")})),F.and(r({type:l("reference")})),Ml.and(r({type:l("file")})),hs.and(r({type:l("thinking")})),V]);var zt=M([y(e(),x()),e()]),St=M([y(e(),x()),e()]);var Q=r({name:e(),arguments:M([y(e(),x()),e()])}),X=r({name:e(),arguments:M([y(e(),x()),e()])});var Gc=r({id:e().default("null"),type:e().optional(),function:Q,index:m().default(0)}),Mp=r({id:e().default("null"),type:e().optional(),function:X,index:m().default(0)});var Jt=M([e(),s(Ii)]);var $c=r({role:a(e()).optional(),content:a(M([e(),s(Ii)])).optional(),tool_calls:a(s(Gc)).optional(),tool_call_id:a(e()).optional(),index:a(m()).optional(),metadata:a(y(e(),x())).optional()}).transform((t)=>c(t,{tool_calls:"toolCalls",tool_call_id:"toolCallId"}));var oe={Stop:"stop",Length:"length",Error:"error",ToolCalls:"tool_calls"},re=Y(oe),ee=r({index:m(),delta:$c,finish_reason:a(re)}).transform((t)=>c(t,{finish_reason:"finishReason"}));var Td=r({id:e(),object:e().optional(),created:m().optional(),model:e(),usage:Ro.optional(),choices:s(ee)});function Rp(t){return b(t,(n)=>Td.parse(JSON.parse(n)),"Failed to parse 'CompletionChunk' from JSON")}
|
|
4
|
-
export{Id,Ys,Bo,k,b,c,_,Y,Ei,lt,Tp,$e,M,fs,Ia,Ml,ps,Ta,Uo,zo,Jr,Ma,Js,Rl,ms,hs,Ii,Ra,Gc,Mp,$c,Ro,kl,Td,Rp};
|
package/bin/chunk-x8f4defx.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
class i{queue=[];waiting=[];done=!1;finalResultPromise;resolveFinalResult;isComplete;extractResult;constructor(e,t){this.isComplete=e,this.extractResult=t,this.finalResultPromise=new Promise((s)=>{this.resolveFinalResult=s})}push(e){if(this.done)return;if(this.isComplete(e))this.done=!0,this.resolveFinalResult(this.extractResult(e));let t=this.waiting.shift();if(t)t({value:e,done:!1});else this.queue.push(e)}end(e){if(this.done=!0,e!==void 0)this.resolveFinalResult(e);while(this.waiting.length>0)this.waiting.shift()({value:void 0,done:!0})}async*[Symbol.asyncIterator](){while(!0)if(this.queue.length>0)yield this.queue.shift();else if(this.done)return;else{let e=await new Promise((t)=>this.waiting.push(t));if(e.done)return;yield e.value}}result(){return this.finalResultPromise}}class Vt extends i{constructor(){super((e)=>e.type==="done"||e.type==="error",(e)=>{if(e.type==="done")return e.message;else if(e.type==="error")return e.error;throw Error("Unexpected event type for final result")})}}function Cs(e){if(e instanceof Error)return e.message||e.name;if(typeof e==="string")return e;return String(e)}function n(e){if(!(e instanceof Error))return{name:"ThrownValue",message:Cs(e)};let t=e.code;return{name:e.name||void 0,message:e.message||e.name,stack:e.stack,code:typeof t==="string"||typeof t==="number"?t:void 0}}function tc(e,t,s){return{type:e,timestamp:Date.now(),error:n(t),details:s}}function zi(e,t){e.diagnostics=[...e.diagnostics??[],t]}
|
|
3
|
-
export{Vt,Cs,tc,zi};
|