@shumai-one/shumai 0.6.2 → 0.6.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.
Files changed (192) hide show
  1. package/bin/{chunk-mcj1xpcc.js → chunk-01vx2chc.js} +2 -2
  2. package/bin/chunk-0epkrexd.js +2 -0
  3. package/bin/chunk-0h5239kt.js +2 -0
  4. package/bin/{chunk-jt0ykktx.js → chunk-0jnstdgf.js} +1 -1
  5. package/bin/{chunk-x03jwaga.js → chunk-0njsjy6x.js} +4 -4
  6. package/bin/{chunk-7naa7tpn.js → chunk-13rq2gtr.js} +2 -2
  7. package/bin/chunk-1aqs9sdh.js +3 -0
  8. package/bin/{chunk-m0q2cgfg.js → chunk-22jbsrka.js} +1 -1
  9. package/bin/chunk-2qknebmd.js +1 -0
  10. package/bin/{chunk-a411xhmm.js → chunk-2qzmh3ae.js} +4 -4
  11. package/bin/{chunk-2nhgdqdg.js → chunk-2tt0b8ym.js} +2 -2
  12. package/bin/{chunk-p3f5aevs.js → chunk-2zm7czk6.js} +1 -1
  13. package/bin/{chunk-p4s95471.js → chunk-396tfwdx.js} +1 -1
  14. package/bin/chunk-3mx4trvh.js +10 -0
  15. package/bin/{chunk-b5rhvzv9.js → chunk-45pb3kzz.js} +2 -2
  16. package/bin/{chunk-q83h0hkx.js → chunk-47fmhzwv.js} +2 -2
  17. package/bin/chunk-4awk4xhq.js +2 -0
  18. package/bin/{chunk-2cdxm1cp.js → chunk-4b2x2qba.js} +23 -23
  19. package/bin/{chunk-knj2s8mg.js → chunk-4rjy7ybr.js} +8 -8
  20. package/bin/{chunk-q8w4mbw4.js → chunk-598x693h.js} +2 -2
  21. package/bin/chunk-5c7ztqs7.js +1 -0
  22. package/bin/{chunk-2jj4j8cn.js → chunk-65dh7x4c.js} +2 -2
  23. package/bin/{chunk-hnkcgvcj.js → chunk-66e2vrky.js} +1 -1
  24. package/bin/{chunk-g22wmpk1.js → chunk-6j3beg6n.js} +2 -2
  25. package/bin/{chunk-cgmebxx6.js → chunk-6ke13k69.js} +1 -1
  26. package/bin/{chunk-7sgrtxbt.js → chunk-6rqakmg0.js} +2 -2
  27. package/bin/{chunk-4mws03es.js → chunk-6ty4tfmf.js} +3 -3
  28. package/bin/chunk-7e9ws6dh.js +129 -0
  29. package/bin/chunk-7mdddkfc.js +1 -0
  30. package/bin/{chunk-q2bew2vc.js → chunk-7q4mgd5x.js} +2 -2
  31. package/bin/chunk-7yv7shad.js +1 -0
  32. package/bin/{chunk-qwpkcp8d.js → chunk-81b8rfv7.js} +2 -2
  33. package/bin/{chunk-atfz7g7e.js → chunk-8a7ymmd4.js} +2 -2
  34. package/bin/chunk-8ac9at5y.js +2 -0
  35. package/bin/{chunk-gxepkvt2.js → chunk-8zcfgz9c.js} +1 -1
  36. package/bin/{chunk-mcw198kg.js → chunk-955kf5kc.js} +8 -8
  37. package/bin/{chunk-jzgbxqdg.js → chunk-978rm9a9.js} +2 -2
  38. package/bin/{chunk-jt02kpfc.js → chunk-9qzbrp4d.js} +2 -2
  39. package/bin/{chunk-tekwpkjf.js → chunk-a283dh05.js} +2 -2
  40. package/bin/chunk-aa2a06cc.js +1 -0
  41. package/bin/{chunk-8cjet7pp.js → chunk-ajr1w3vq.js} +6 -6
  42. package/bin/chunk-akafypge.js +218 -0
  43. package/bin/chunk-amk373q2.js +2 -0
  44. package/bin/chunk-apq2gvvp.js +4 -0
  45. package/bin/chunk-av2w1sez.js +2 -0
  46. package/bin/{chunk-5wapd171.js → chunk-b6kmj34z.js} +12 -12
  47. package/bin/chunk-bkzaw9p8.js +1 -0
  48. package/bin/{chunk-zezje74z.js → chunk-bssb9tar.js} +3 -3
  49. package/bin/chunk-bwvj1aqc.js +1 -0
  50. package/bin/chunk-by9esjn7.js +3 -0
  51. package/bin/chunk-bywk8mbc.js +2 -0
  52. package/bin/{chunk-9xhjy897.js → chunk-c61g9hfa.js} +4 -4
  53. package/bin/{chunk-zrszykjf.js → chunk-cdcgjh8k.js} +1 -1
  54. package/bin/{chunk-yk12hydf.js → chunk-d277evce.js} +4 -4
  55. package/bin/{chunk-55h9ze53.js → chunk-d3brvxh7.js} +2 -2
  56. package/bin/{chunk-9t3p4xp6.js → chunk-dcb1nzf1.js} +1 -1
  57. package/bin/{chunk-mzsw9var.js → chunk-dfbzatq9.js} +2 -2
  58. package/bin/chunk-e0bckx12.js +2 -0
  59. package/bin/{chunk-3ckkwdjx.js → chunk-e2p4s2pj.js} +3 -3
  60. package/bin/chunk-e8zzg57c.js +2 -0
  61. package/bin/{chunk-vp3czaeh.js → chunk-edfaqwaq.js} +2 -2
  62. package/bin/chunk-ehgrp0f9.js +1 -0
  63. package/bin/chunk-evs2aaav.js +12 -0
  64. package/bin/{chunk-s9ksftq2.js → chunk-f5bhcjhw.js} +1 -1
  65. package/bin/{chunk-ns33grgx.js → chunk-fb9dedm2.js} +2 -2
  66. package/bin/{chunk-srxp5jav.js → chunk-ff0mh9p3.js} +32 -32
  67. package/bin/chunk-fpfby5tz.js +1 -0
  68. package/bin/{chunk-eyjfhdp9.js → chunk-gd3b5akr.js} +2 -2
  69. package/bin/{chunk-1wfg56z3.js → chunk-gm1fy3hm.js} +5 -5
  70. package/bin/{chunk-9n1w5dw1.js → chunk-gqkjx7rz.js} +3 -3
  71. package/bin/{chunk-1nvd90g2.js → chunk-h7f5370s.js} +1 -1
  72. package/bin/chunk-hcyhsn8e.js +2 -0
  73. package/bin/{chunk-vcrmjtcz.js → chunk-jxm0gzmf.js} +2 -2
  74. package/bin/{chunk-b7bnp021.js → chunk-k3ggy3xk.js} +2 -2
  75. package/bin/{chunk-257dcd2f.js → chunk-k9vjs21p.js} +2 -2
  76. package/bin/chunk-ka40gv72.js +1 -0
  77. package/bin/chunk-km70p970.js +2 -0
  78. package/bin/{chunk-e4yscwen.js → chunk-m6v8rb39.js} +8 -8
  79. package/bin/chunk-m8spagwp.js +4 -0
  80. package/bin/{chunk-y241cxff.js → chunk-mfh7mg5b.js} +1 -1
  81. package/bin/chunk-n0cn0218.js +2 -0
  82. package/bin/chunk-n54ftsdx.js +2 -0
  83. package/bin/{chunk-02fvcrej.js → chunk-n7cvj15k.js} +7 -7
  84. package/bin/chunk-na5fh7er.js +2 -0
  85. package/bin/chunk-neazdbxy.js +1 -0
  86. package/bin/chunk-nk24qw3m.js +1 -0
  87. package/bin/{chunk-73yncv54.js → chunk-nsbbseff.js} +2 -2
  88. package/bin/chunk-nseef85h.js +1 -0
  89. package/bin/chunk-p35ztj2z.js +3 -0
  90. package/bin/chunk-pcjc9ygv.js +2 -0
  91. package/bin/{chunk-167z646e.js → chunk-pemmtd8q.js} +1 -1
  92. package/bin/{chunk-82tps5n1.js → chunk-pzrqnnpg.js} +1 -1
  93. package/bin/{chunk-a74g6h8a.js → chunk-q43m934j.js} +2 -2
  94. package/bin/{chunk-r1xer8gn.js → chunk-q57m34h0.js} +3 -3
  95. package/bin/chunk-q5k72jz9.js +3 -0
  96. package/bin/chunk-q9fsxakd.js +2 -0
  97. package/bin/chunk-qadpe0ct.js +2 -0
  98. package/bin/chunk-qeypjv4f.css +1 -0
  99. package/bin/chunk-qw92z3wf.js +2 -0
  100. package/bin/chunk-r0byfq1t.js +1 -0
  101. package/bin/chunk-r0q88qw3.js +2 -0
  102. package/bin/chunk-rjhczkh3.js +2 -0
  103. package/bin/{chunk-mwktrwtx.js → chunk-s0wxbybf.js} +1 -1
  104. package/bin/{chunk-q5vkxee3.js → chunk-s4hkcw24.js} +2 -2
  105. package/bin/chunk-szta50g1.js +1 -0
  106. package/bin/chunk-t6cb99gp.js +2 -0
  107. package/bin/chunk-tcr080b9.js +1 -0
  108. package/bin/{chunk-yq32evnn.js → chunk-v4nqx084.js} +5 -5
  109. package/bin/{chunk-ympbfzz4.js → chunk-v7jzc3ye.js} +1 -1
  110. package/bin/{chunk-9zsv6d2f.js → chunk-vbe8wred.js} +1 -1
  111. package/bin/{chunk-hpbn0k9n.js → chunk-vf9s8b5t.js} +2 -2
  112. package/bin/{chunk-m9adtgzk.js → chunk-vk3eqr65.js} +1 -1
  113. package/bin/{chunk-hpwv4am3.js → chunk-vm9bbk97.js} +4 -4
  114. package/bin/{chunk-v05rrxp5.js → chunk-w4gqg27w.js} +2 -2
  115. package/bin/{chunk-x8mjh387.js → chunk-w6ym7tsd.js} +4 -4
  116. package/bin/{chunk-hzkjgcre.js → chunk-ways29d1.js} +1 -1
  117. package/bin/chunk-wesg7tg9.js +1 -0
  118. package/bin/chunk-wmrrapwv.js +2 -0
  119. package/bin/chunk-wnwsjgj8.js +2 -0
  120. package/bin/{chunk-hw6czrya.js → chunk-wrb4xq9v.js} +1 -1
  121. package/bin/{chunk-v5cn90cf.js → chunk-wzrzc07t.js} +2 -2
  122. package/bin/chunk-xd1axsdv.js +2 -0
  123. package/bin/{chunk-cwat1jwx.js → chunk-xk0jmx4s.js} +2 -2
  124. package/bin/{chunk-g6sdezec.js → chunk-y545vfn0.js} +1 -1
  125. package/bin/{chunk-fatmqnp1.js → chunk-y6h885fs.js} +1 -1
  126. package/bin/{chunk-cz13a82m.js → chunk-yncmfr39.js} +2 -2
  127. package/bin/{chunk-01052ssf.js → chunk-yxnz4ypt.js} +11 -11
  128. package/bin/chunk-zc1asygg.js +2 -0
  129. package/bin/{chunk-m82tkhaa.js → chunk-zc7wzcvh.js} +7 -7
  130. package/bin/chunk-zdvhh8mk.js +2 -0
  131. package/bin/{chunk-kvhf12b4.js → chunk-zg0b902x.js} +2 -2
  132. package/bin/{chunk-7v7mypc6.js → chunk-zhq7a7hs.js} +2 -2
  133. package/bin/{chunk-f25fe9th.js → chunk-zmnvskn7.js} +11 -11
  134. package/bin/shumai-app.html +1 -1
  135. package/bin/shumai-app.js +470 -389
  136. package/package.json +7 -7
  137. package/prisma/migrations/20261102032402_add_archive_storage/migration.sql +25 -0
  138. package/prisma/schema.prisma +12 -6
  139. package/bin/chunk-0bj887zm.js +0 -2
  140. package/bin/chunk-1ktk6764.js +0 -10
  141. package/bin/chunk-26qn7fek.js +0 -2
  142. package/bin/chunk-2ne2b54t.js +0 -2
  143. package/bin/chunk-2vbeqczj.js +0 -1
  144. package/bin/chunk-37p6bcx2.js +0 -1
  145. package/bin/chunk-3knfx6dm.js +0 -1
  146. package/bin/chunk-3z85zxkn.js +0 -1
  147. package/bin/chunk-54tbfvya.js +0 -2
  148. package/bin/chunk-56kh5fxc.js +0 -1
  149. package/bin/chunk-576nj64j.js +0 -2
  150. package/bin/chunk-6cnqjngz.js +0 -1
  151. package/bin/chunk-7g46e1wy.js +0 -3
  152. package/bin/chunk-84x8p7v5.js +0 -1
  153. package/bin/chunk-88jg9dq5.js +0 -2
  154. package/bin/chunk-8fyg9dy4.js +0 -2
  155. package/bin/chunk-8gtfgkrn.js +0 -2
  156. package/bin/chunk-8mqbztj8.js +0 -2
  157. package/bin/chunk-8qdtvfx3.css +0 -1
  158. package/bin/chunk-8xb6yz11.js +0 -2
  159. package/bin/chunk-8yjsmr7g.js +0 -2
  160. package/bin/chunk-91rb0jpb.js +0 -2
  161. package/bin/chunk-96qpjght.js +0 -2
  162. package/bin/chunk-9f1xk1nt.js +0 -1
  163. package/bin/chunk-9mk9cvbk.js +0 -1
  164. package/bin/chunk-9nw5w8vh.js +0 -1
  165. package/bin/chunk-ah8fjb6f.js +0 -2
  166. package/bin/chunk-cf5axr8c.js +0 -1
  167. package/bin/chunk-dk42gf7v.js +0 -2
  168. package/bin/chunk-e4f56spj.js +0 -4
  169. package/bin/chunk-eb7mzbfm.js +0 -1
  170. package/bin/chunk-er14d498.js +0 -3
  171. package/bin/chunk-f6avg5qe.js +0 -129
  172. package/bin/chunk-fvx9k1dc.js +0 -2
  173. package/bin/chunk-gtf19jc1.js +0 -2
  174. package/bin/chunk-h1n7jqnw.js +0 -1
  175. package/bin/chunk-hfm82066.js +0 -2
  176. package/bin/chunk-j2s311yc.js +0 -3
  177. package/bin/chunk-kj6h5j5a.js +0 -4
  178. package/bin/chunk-km4gn6b6.js +0 -1
  179. package/bin/chunk-ny1kbmxt.js +0 -2
  180. package/bin/chunk-p3j6ydk1.js +0 -1
  181. package/bin/chunk-pk406dgy.js +0 -2
  182. package/bin/chunk-s1e4qy3q.js +0 -14
  183. package/bin/chunk-swtwaaqe.js +0 -1
  184. package/bin/chunk-tagdrg7p.js +0 -1
  185. package/bin/chunk-twtxnzbv.js +0 -2
  186. package/bin/chunk-v5mcjwxy.js +0 -2
  187. package/bin/chunk-vkzasgxw.js +0 -2
  188. package/bin/chunk-x342vzdx.js +0 -2
  189. package/bin/chunk-xc54vhfz.js +0 -2
  190. package/bin/chunk-xvkwbczx.js +0 -3
  191. package/bin/chunk-z1p13dnc.js +0 -2
  192. package/bin/chunk-zarz3sqn.js +0 -211
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Fr,ca,wd,e,I,E,F,J,A,l,D,k,v,y}from"./chunk-4b2x2qba.js";function Tl(t){return{ok:!0,value:t}}function qs(t){return{ok:!1,error:t}}async function K(t){let n=await t;if(!n.ok)throw n.error;return n.value}class C 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 ca)return`${this.rawMessage}
3
+ ${Rm(this.cause)}`;else return this.toString()}}function Rm(t){return wd(t)}function b(t,n){let o={};if(!Object.keys(n).length)return o=t,o;for(let[i,r]of Object.entries(t)){let a=n[i];if(a===null)continue;o[a??i]=r}return o}function O(t){let n={};for(let[o,i]of Object.entries(t))if(typeof i<"u")n[o]=i;return n}function P(t,n,o){try{return Tl(n(t))}catch(i){return qs(new C(o,i,t))}}function N(t){return d++,t}var d=0,T=0;function h(){T++;let t=d;return{end:(n)=>{let o=d-t;if(d=t+(n??o),--T===0)d=0;return o}}}function he(t){let n=Object.values(t);return D([...n.map((o)=>v(o)),e().transform((o)=>N(o))])}function _c(t){let n=Object.values(t).filter((o)=>typeof o==="number");return D([...n.map((o)=>v(o)),I().transform((o)=>N(o))])}function Bt(t){return e()}function iA(t){return I()}var j=Symbol("UNKNOWN");function w(t){return typeof t==="object"&&t!==null&&j in t}function It(t,n,o={}){let{unknownValue:i="UNKNOWN",outputPropertyName:r}=o;return J().transform((a)=>{let s=Object.defineProperties({raw:a,[r??t]:i,isUnknown:!0},{[j]:{value:!0,enumerable:!1,configurable:!1}});if(!(typeof a==="object"&&a!==null))return s;let m=a[t];if(typeof m!=="string")return s;if(!(m in n))return s;let g=n[m];if(!g)return s;let p=h(),f=g.safeParse(a);if(!f.success)return p.end(0),s;if(p.end(),r)f.data[r]=m;return f.data})}var L=/^\d{4}-\d{2}-\d{2}$/;class x{serialized;static today(){return new x(new Date)}constructor(t){if(typeof t==="string"&&!L.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),!L.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 H(t){return J().transform((n,o)=>{let i=[],r=t.map(()=>[]),a=h();for(let[c,m]of t.entries()){let g=h(),p=m.safeParse(n),f=g.end(),re=0;if(p.success){i.push({data:p.data,inexactCount:f,zeroDefaultCount:0,fieldCount:-1});continue}r[c].push(...p.error.issues)}if(i.length===0)return a.end(0),o.addIssue({input:n,code:"invalid_union",errors:r}),Fr;let s=i[0];for(let c of i){if(i.length>1)c.fieldCount=te(c.data);s=ee(c,s)}return a.end(s.inexactCount),s.data})}function ee(t,n){let o=t.inexactCount===0,i=n.inexactCount===0;if(o!==i)return o?t:n;let r=t.fieldCount-t.zeroDefaultCount,a=n.fieldCount-n.zeroDefaultCount;if(r!==a)return r>a?t:n;return t.inexactCount<n.inexactCount?t:n}function te(t){let n=0,o=[t],i=0;while(i<o.length){let r=o[i++];if(r===void 0||w(r))continue;let a=typeof r;if(r===null||a==="number"||a==="string"||a==="boolean"||a==="bigint"||r instanceof Date||r instanceof x){n++;continue}if(Array.isArray(r)){o.push(...r);continue}if(a==="object")o.push(...Object.values(r))}return n}var M=l({type:v("input_audio"),input_audio:e()}).transform((t)=>b(t,{input_audio:"inputAudio"})),Y=l({type:v("input_audio"),inputAudio:e()}).transform((t)=>b(t,{inputAudio:"input_audio"}));var Ua=l({type:v("document_url").default("document_url"),document_url:e(),document_name:y(e()).optional()}).transform((t)=>b(t,{document_url:"documentUrl",document_name:"documentName"})),Gi=l({type:v("document_url").default("document_url"),documentUrl:e(),documentName:y(e()).optional()}).transform((t)=>b(t,{documentUrl:"document_url",documentName:"document_name"}));var B=l({type:v("file").default("file"),file_id:e()}).transform((t)=>b(t,{file_id:"fileId"})),Hu=l({type:v("file").default("file"),fileId:e()}).transform((t)=>b(t,{fileId:"file_id"}));var V={Low:"low",Auto:"auto",High:"high"},W=he(V),Z=Bt(V);var R=l({url:e(),detail:y(W).optional()}),U=l({url:e(),detail:y(Z).optional()});var Ie=H([R,e()]),we=H([U,e()]);var za=l({type:v("image_url").default("image_url"),image_url:H([R,e()])}).transform((t)=>b(t,{image_url:"imageUrl"})),Vi=l({type:v("image_url").default("image_url"),imageUrl:H([U,e()])}).transform((t)=>b(t,{imageUrl:"image_url"}));var Ae=H([I(),e()]),ve=H([I(),e()]);var z=l({type:v("reference").default("reference"),reference_ids:A(H([I(),e()]))}).transform((t)=>b(t,{reference_ids:"referenceIds"})),S=l({type:v("reference").default("reference"),referenceIds:A(H([I(),e()]))}).transform((t)=>b(t,{referenceIds:"reference_ids"}));var $s=l({type:v("text").default("text"),text:e()}),Hs=l({type:v("text").default("text"),text:e()});var q={WebSearch:"web_search",WebSearchPremium:"web_search_premium",CodeInterpreter:"code_interpreter",ImageGeneration:"image_generation",DocumentLibrary:"document_library"},Qn=he(q),Ki=Bt(q);var Ve=H([Qn,e()]),We=H([Ki,e()]);var kl=l({type:v("tool_reference").default("tool_reference"),tool:H([Qn,e()]),title:e(),url:y(e()).optional(),favicon:y(e()).optional(),description:y(e()).optional()}),Qu=l({type:v("tool_reference").default("tool_reference"),tool:H([Ki,e()]),title:e(),url:y(e()).optional(),favicon:y(e()).optional(),description:y(e()).optional()});var Xe=H([kl,$s,z]),et=H([Qu,Hs,S]);var ja=l({type:v("thinking").default("thinking"),thinking:A(H([kl,$s,z])),signature:y(e()).optional(),closed:E().optional()}),qa=l({type:v("thinking").default("thinking"),thinking:A(H([Qu,Hs,S])),signature:y(e()).optional(),closed:E().optional()});var yc=It("type",{image_url:za.and(l({type:v("image_url")})),document_url:Ua.and(l({type:v("document_url")})),text:$s.and(l({type:v("text")})),reference:z.and(l({type:v("reference")})),file:B.and(l({type:v("file")})),thinking:ja.and(l({type:v("thinking")})),input_audio:M}),Wi=D([Vi.and(l({type:v("image_url")})),Gi.and(l({type:v("document_url")})),Hs.and(l({type:v("text")})),S.and(l({type:v("reference")})),Hu.and(l({type:v("file")})),qa.and(l({type:v("thinking")})),Y]);var pt=H([k(e(),F()),e()]),ft=H([k(e(),F()),e()]);var G=l({name:e(),arguments:H([k(e(),F()),e()])}),Q=l({name:e(),arguments:H([k(e(),F()),e()])});var _f=l({id:e().default("null"),type:e().optional(),function:G,index:I().default(0)}),aA=l({id:e().default("null"),type:e().optional(),function:Q,index:I().default(0)});var Ct=H([e(),A(yc)]);var yf=l({role:y(e()).optional(),content:y(H([e(),A(yc)])).optional(),tool_calls:y(A(_f)).optional(),tool_call_id:y(e()).optional(),index:y(I()).optional(),metadata:y(k(e(),F())).optional()}).transform((t)=>b(t,{tool_calls:"toolCalls",tool_call_id:"toolCallId"}));var Is=l({prompt_tokens:I().default(0),completion_tokens:I().default(0),total_tokens:I().default(0),prompt_audio_seconds:y(I()).optional()}).catchall(F()).transform((t)=>b(t,{prompt_tokens:"promptTokens",completion_tokens:"completionTokens",total_tokens:"totalTokens",prompt_audio_seconds:"promptAudioSeconds"})),Gu=l({promptTokens:I().default(0),completionTokens:I().default(0),totalTokens:I().default(0),promptAudioSeconds:y(I()).optional()}).catchall(F()).transform((t)=>({...b(t,{promptTokens:"prompt_tokens",completionTokens:"completion_tokens",totalTokens:"total_tokens",promptAudioSeconds:"prompt_audio_seconds"})}));var ne={Stop:"stop",Length:"length",Error:"error",ToolCalls:"tool_calls"},oe=he(ne),X=l({index:I(),delta:yf,finish_reason:y(oe)}).transform((t)=>b(t,{finish_reason:"finishReason"}));var Mm=l({id:e(),object:e().optional(),created:I().optional(),model:e(),usage:Is.optional(),choices:A(X)});function lA(t){return P(t,(n)=>Mm.parse(JSON.parse(n)),"Failed to parse 'CompletionChunk' from JSON")}
4
+ export{Rm,Tl,qs,K,P,b,O,he,_c,Bt,iA,It,H,Ua,Gi,Hu,za,Vi,$s,Hs,Qn,Ki,kl,Qu,ja,qa,yc,Wi,_f,aA,yf,Is,Gu,Mm,lA};
@@ -1 +1 @@
1
- import{S,G,w,Z,Y,a,g,Tt,We,Je,R,K,Wa,yo,No,$e,He,Qe,wb,Mw,Xm,_d,rT,Jn,Pt,Vt,qr,ar,qt,kg}from"./chunk-zarz3sqn.js";import{Jr}from"./chunk-q5vkxee3.js";import{Bn,Un,zn,Tr,ft,ct}from"./chunk-576nj64j.js";import{gr}from"./chunk-pk406dgy.js";Z();var I=(t)=>{if(!t)return"??";return t.split(" ").map((o)=>o[0]).slice(0,2).join("").toUpperCase()};function k(){let{projectId:t}=T.useParams(),{teamId:o,ensureTeamIdForProject:l}=Pt(),b=We();S(()=>{l(t)},[t,l]);let{data:s}=gr(kg(t)),n=s?.rootFolder,[x,v]=w(240),{fileListLeftSidebarCollapsed:d,setFileListLeftSidebarCollapsed:N}=ar(),{data:m,isLoading:h,fetchNextPage:c,hasNextPage:f,isFetchingNextPage:i}=Tt({queryKey:["collections",t],queryFn:async({pageParam:e})=>{let r=await R.api.projects[":projectId"].collections.$get({param:{projectId:t},query:{first:"20",after:e}});if(!r.ok)throw Error("Failed to fetch collections");return await r.json()},initialPageParam:"",getNextPageParam:(e)=>e.pageInfo?.cursor||void 0,enabled:!!t}),{ref:y,inView:p}=Vt();S(()=>{if(p&&f&&!i)c()},[p,f,i,c]);let u=G(()=>m?.pages.flatMap((e)=>e.data)||[],[m]);if(!o||!n||!s)return a(qt,{});return a("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:g("div",{className:"flex flex-1 overflow-hidden relative",children:[!d&&a("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>N(!0)}),!d&&g(Y,{children:[a("div",{className:"bg-background",style:{width:x},children:a(qr,{teamId:o,projectId:t,projectName:s.name??"",rootFolderId:n})}),a(Jr,{onResize:(e)=>{v((r)=>Math.max(180,Math.min(400,r+e)))},className:"hidden md:block"})]}),g("div",{className:"flex-1 flex flex-col min-h-0 bg-card overflow-hidden",children:[a("header",{className:"h-14 border-b flex items-center justify-between px-6 shrink-0 bg-background/50 backdrop-blur-sm sticky top-0 z-10",children:g("div",{className:"flex items-center gap-2",children:[a(Wa,{className:"h-5 w-5 text-primary"}),a("h1",{className:"font-bold text-lg text-foreground",children:wb()})]})}),a("div",{className:"flex-1 overflow-y-auto p-6",children:h?a("div",{className:"flex justify-center items-center h-64",children:a("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):u.length===0?g("div",{className:"flex flex-col items-center justify-center h-64 text-muted-foreground gap-3",children:[a(No,{className:"h-10 w-10 text-muted-foreground/50"}),a("p",{children:rT()})]}):g("div",{className:"border border-border rounded-xl bg-background overflow-hidden shadow-xs",children:[g(Bn,{children:[a(Un,{children:g(Tr,{className:"hover:bg-transparent bg-muted/20",children:[a(ft,{className:"font-semibold px-4 py-3",children:Mw()}),a(ft,{className:"font-semibold px-4 py-3",children:_d()}),a(ft,{className:"font-semibold px-4 py-3 w-[200px]",children:Xm()})]})}),a(zn,{children:u.map((e)=>g(Tr,{className:"hover:bg-muted/10 transition-colors cursor-pointer",onClick:()=>b({to:"/projects/$projectId/collections/$collectionId",params:{projectId:t,collectionId:e.id}}),children:[a(ct,{className:"font-medium px-4 py-3.5",children:g("div",{className:"flex items-center gap-2",children:[a(Wa,{className:"h-4 w-4 text-primary shrink-0"}),a("span",{className:"text-foreground font-semibold hover:underline",children:e.name})]})}),a(ct,{className:"px-4 py-3.5",children:g("div",{className:"flex items-center gap-2",children:[g($e,{className:"h-6 w-6",children:[e.creator?.image&&a(He,{src:e.creator.image,alt:e.creator.name,className:"object-cover"}),a(Qe,{className:"text-[10px]",children:I(e.creator?.name)})]}),a("span",{className:"text-sm font-medium text-foreground truncate max-w-[200px]",children:e.creator?.name||Jn()})]})}),a(ct,{className:"px-4 py-3.5 text-muted-foreground text-sm",children:g("div",{className:"flex items-center gap-2",children:[a(yo,{className:"h-3.5 w-3.5 text-muted-foreground/70"}),a("span",{children:new Date(e.createdAt).toLocaleDateString()})]})})]},e.id))})]}),a("div",{ref:y,className:"h-10 w-full flex items-center justify-center",children:i&&a(K,{className:"h-6 w-6 animate-spin text-primary"})})]})})]})]})})}var T=Je("/projects/$projectId/collections/")({component:k});export{T as Route};
1
+ import{S,Q,w,L,W,a,g,Rt,We,Je,R,V,ll,xo,Bo,$e,He,Qe,ew,OE,xh,Ld,k1,to,Ft,Vt,Qr,cr,$t,eA}from"./chunk-akafypge.js";import{en}from"./chunk-s4hkcw24.js";import{zn,jn,qn,Rr,bt,yt}from"./chunk-bywk8mbc.js";import{yr}from"./chunk-e8zzg57c.js";L();var I=(t)=>{if(!t)return"??";return t.split(" ").map((o)=>o[0]).slice(0,2).join("").toUpperCase()};function k(){let{projectId:t}=T.useParams(),{teamId:o,ensureTeamIdForProject:l}=Ft(),b=We();S(()=>{l(t)},[t,l]);let{data:s}=yr(eA(t)),n=s?.rootFolder,[x,v]=w(240),{fileListLeftSidebarCollapsed:d,setFileListLeftSidebarCollapsed:N}=cr(),{data:m,isLoading:h,fetchNextPage:c,hasNextPage:f,isFetchingNextPage:i}=Rt({queryKey:["collections",t],queryFn:async({pageParam:e})=>{let r=await R.api.projects[":projectId"].collections.$get({param:{projectId:t},query:{first:"20",after:e}});if(!r.ok)throw Error("Failed to fetch collections");return await r.json()},initialPageParam:"",getNextPageParam:(e)=>e.pageInfo?.cursor||void 0,enabled:!!t}),{ref:y,inView:p}=Vt();S(()=>{if(p&&f&&!i)c()},[p,f,i,c]);let u=Q(()=>m?.pages.flatMap((e)=>e.data)||[],[m]);if(!o||!n||!s)return a($t,{});return a("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:g("div",{className:"flex flex-1 overflow-hidden relative",children:[!d&&a("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>N(!0)}),!d&&g(W,{children:[a("div",{className:"bg-background",style:{width:x},children:a(Qr,{teamId:o,projectId:t,projectName:s.name??"",rootFolderId:n})}),a(en,{onResize:(e)=>{v((r)=>Math.max(180,Math.min(400,r+e)))},className:"hidden md:block"})]}),g("div",{className:"flex-1 flex flex-col min-h-0 bg-card overflow-hidden",children:[a("header",{className:"h-14 border-b flex items-center justify-between px-6 shrink-0 bg-background/50 backdrop-blur-sm sticky top-0 z-10",children:g("div",{className:"flex items-center gap-2",children:[a(ll,{className:"h-5 w-5 text-primary"}),a("h1",{className:"font-bold text-lg text-foreground",children:ew()})]})}),a("div",{className:"flex-1 overflow-y-auto p-6",children:h?a("div",{className:"flex justify-center items-center h-64",children:a("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):u.length===0?g("div",{className:"flex flex-col items-center justify-center h-64 text-muted-foreground gap-3",children:[a(Bo,{className:"h-10 w-10 text-muted-foreground/50"}),a("p",{children:k1()})]}):g("div",{className:"border border-border rounded-xl bg-background overflow-hidden shadow-xs",children:[g(zn,{children:[a(jn,{children:g(Rr,{className:"hover:bg-transparent bg-muted/20",children:[a(bt,{className:"font-semibold px-4 py-3",children:OE()}),a(bt,{className:"font-semibold px-4 py-3",children:Ld()}),a(bt,{className:"font-semibold px-4 py-3 w-[200px]",children:xh()})]})}),a(qn,{children:u.map((e)=>g(Rr,{className:"hover:bg-muted/10 transition-colors cursor-pointer",onClick:()=>b({to:"/projects/$projectId/collections/$collectionId",params:{projectId:t,collectionId:e.id}}),children:[a(yt,{className:"font-medium px-4 py-3.5",children:g("div",{className:"flex items-center gap-2",children:[a(ll,{className:"h-4 w-4 text-primary shrink-0"}),a("span",{className:"text-foreground font-semibold hover:underline",children:e.name})]})}),a(yt,{className:"px-4 py-3.5",children:g("div",{className:"flex items-center gap-2",children:[g($e,{className:"h-6 w-6",children:[e.creator?.image&&a(He,{src:e.creator.image,alt:e.creator.name,className:"object-cover"}),a(Qe,{className:"text-[10px]",children:I(e.creator?.name)})]}),a("span",{className:"text-sm font-medium text-foreground truncate max-w-[200px]",children:e.creator?.name||to()})]})}),a(yt,{className:"px-4 py-3.5 text-muted-foreground text-sm",children:g("div",{className:"flex items-center gap-2",children:[a(xo,{className:"h-3.5 w-3.5 text-muted-foreground/70"}),a("span",{children:new Date(e.createdAt).toLocaleDateString()})]})})]},e.id))})]}),a("div",{ref:y,className:"h-10 w-full flex items-center justify-center",children:i&&a(V,{className:"h-6 w-6 animate-spin text-primary"})})]})})]})]})})}var T=Je("/projects/$projectId/collections/")({component:k});export{T as Route};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{wc}from"./chunk-yncmfr39.js";export default wc();
@@ -0,0 +1,2 @@
1
+ import{j}from"./chunk-akafypge.js";var e=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Ba=j("code",e);
2
+ export{Ba};