@shumai-one/shumai 0.3.5 → 0.3.7
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-0jkqmbcx.js +2 -0
- package/bin/{chunk-vzb2b89p.js → chunk-0t8q76ac.js} +1 -1
- package/bin/chunk-0xern7e4.js +1 -0
- package/bin/{chunk-d4zx3r12.js → chunk-0ycwr0kb.js} +1 -1
- package/bin/{chunk-8vc1m0kw.js → chunk-0yngn45x.js} +2 -2
- package/bin/{chunk-8fsrs7mh.js → chunk-1khzycf9.js} +1 -1
- package/bin/{chunk-c5esphve.js → chunk-1sqz0va1.js} +2 -2
- package/bin/{chunk-x2z5zz01.js → chunk-1xzc6z02.js} +1 -1
- package/bin/{chunk-3ydjrkbd.js → chunk-2086rsb2.js} +1 -1
- package/bin/{chunk-8vvr1ez5.js → chunk-260wywfb.js} +1 -1
- package/bin/{chunk-n67rfv86.js → chunk-2mqqghrz.js} +2 -2
- package/bin/{chunk-qm9w9fcv.js → chunk-2xmsrq7f.js} +2 -2
- package/bin/{chunk-t58kqafx.js → chunk-38g3s1f3.js} +2 -2
- package/bin/{chunk-th07gms7.js → chunk-3dx0p1ge.js} +1 -1
- package/bin/{chunk-f7fevgv2.js → chunk-3kqdgddm.js} +2 -2
- package/bin/{chunk-arxd4qb9.js → chunk-3xzgddev.js} +1 -1
- package/bin/{chunk-xt9n0y9a.js → chunk-48nzw50r.js} +1 -1
- package/bin/{chunk-8skgcmxm.js → chunk-4bn9eb9h.js} +1 -1
- package/bin/chunk-4egayx81.js +2 -0
- package/bin/{chunk-fw5k0xrc.js → chunk-4rbzswqs.js} +2 -2
- package/bin/{chunk-3mprq5kb.js → chunk-503qq6sa.js} +2 -2
- package/bin/{chunk-xnzyt0kq.js → chunk-50keqtz9.js} +1 -1
- package/bin/{chunk-4rz2105a.js → chunk-5gtew41y.js} +1 -1
- package/bin/chunk-60hpa5kf.js +3 -0
- package/bin/{chunk-6vn44e4d.js → chunk-69tt1pvr.js} +2 -2
- package/bin/{chunk-0bbhm7dp.js → chunk-6fv38qdc.js} +2 -2
- package/bin/{chunk-54hmgj96.js → chunk-6v39c8eg.js} +2 -2
- package/bin/{chunk-q0znwxfe.js → chunk-6zs49mef.js} +1 -1
- package/bin/{chunk-c2a5x1pk.js → chunk-7872prvg.js} +1 -1
- package/bin/{chunk-p3k6nzhe.js → chunk-7hnw6y6d.js} +2 -2
- package/bin/{chunk-g5mpp3nc.js → chunk-7k3ccca6.js} +1 -1
- package/bin/chunk-815ezj20.js +1 -0
- package/bin/{chunk-bg10gwm1.js → chunk-81tb4v5v.js} +2 -2
- package/bin/{chunk-s0g0bc6t.js → chunk-83k0wa5k.js} +2 -2
- package/bin/chunk-85eg9xqx.js +1 -0
- package/bin/{chunk-gwxzjc0m.js → chunk-86aagej8.js} +1 -1
- package/bin/{chunk-r9s1zs4g.js → chunk-87wqbn4g.js} +2 -2
- package/bin/chunk-8y1v9dm9.js +2 -0
- package/bin/{chunk-97y52q3a.js → chunk-98j2z6he.js} +3 -3
- package/bin/chunk-9gq9782d.js +1 -0
- package/bin/{chunk-wg5tjyj9.js → chunk-9gzy30zm.js} +2 -2
- package/bin/{chunk-nh4tzzn8.js → chunk-9nyhmtp9.js} +2 -2
- package/bin/{chunk-7jkvjm4x.js → chunk-9s02m95j.js} +2 -2
- package/bin/{chunk-7w2tx08e.js → chunk-9xhnmnnb.js} +2 -2
- package/bin/{chunk-vvr179pz.js → chunk-a0k1b4sq.js} +1 -1
- package/bin/chunk-adekdctx.css +1 -0
- package/bin/{chunk-3w9vybrh.js → chunk-af6wbhkv.js} +2 -2
- package/bin/{chunk-p33nq4pp.js → chunk-b3jh3hf1.js} +2 -2
- package/bin/chunk-b8v7jvkb.js +6 -0
- package/bin/{chunk-7mkk8ahk.js → chunk-bancgvrc.js} +2 -2
- package/bin/{chunk-fq6emqwq.js → chunk-br5xkaf7.js} +3 -3
- package/bin/chunk-bv88se28.css +1 -0
- package/bin/{chunk-17bewdr0.js → chunk-cqq8e3hc.js} +2 -2
- package/bin/{chunk-gd1x3rgn.js → chunk-dej1gq35.js} +1 -1
- package/bin/{chunk-sx1neqgr.js → chunk-dv1zpd2p.js} +2 -2
- package/bin/{chunk-fnkrzqrn.js → chunk-eetrc0j1.js} +2 -2
- package/bin/{chunk-afzc5eae.js → chunk-esrtafz0.js} +1 -1
- package/bin/{chunk-8ttfy5yy.js → chunk-eztggp8r.js} +1 -1
- package/bin/{chunk-f70xdh07.js → chunk-f2j2cqd1.js} +2 -2
- package/bin/{chunk-bv642x5z.js → chunk-fcs4v6jq.js} +2 -2
- package/bin/{chunk-wknqst3v.js → chunk-ftc48rbb.js} +3 -3
- package/bin/{chunk-7zdmpbt6.js → chunk-g60v3jc1.js} +1 -1
- package/bin/chunk-gf5ds9r9.js +2 -0
- package/bin/{chunk-5r55htaw.js → chunk-gjdmnfms.js} +1 -1
- package/bin/{chunk-kn4tnhbw.js → chunk-gjn3w26y.js} +2 -2
- package/bin/{chunk-fgda7ncw.js → chunk-h9emz0zb.js} +2 -2
- package/bin/chunk-h9k2atte.js +1 -0
- package/bin/{chunk-w8vk30ze.js → chunk-hqkmdp31.js} +2 -2
- package/bin/{chunk-4b8ms2ct.js → chunk-jszpvg8e.js} +2 -2
- package/bin/{chunk-b93djch5.js → chunk-k48y9e5s.js} +1 -1
- package/bin/{chunk-rek85wwv.js → chunk-karn564z.js} +2 -2
- package/bin/chunk-kkq4wvnc.js +1 -0
- package/bin/{chunk-ks8deg42.js → chunk-kpn9d97x.js} +1 -1
- package/bin/chunk-ksx113sp.js +1 -0
- package/bin/chunk-m6a4rzdt.js +62 -0
- package/bin/chunk-mw8f8ngt.js +7 -0
- package/bin/{chunk-8mzg29m4.js → chunk-n4gghgrj.js} +2 -2
- package/bin/chunk-n76r6s9k.js +2 -0
- package/bin/{chunk-xqkwpr7s.js → chunk-nvjp2rnh.js} +2 -2
- package/bin/{chunk-fcvtv783.js → chunk-p4c4z0f2.js} +1 -1
- package/bin/{chunk-v4re49f5.js → chunk-ptw49k86.js} +1 -1
- package/bin/{chunk-8na8a41a.js → chunk-qcqw7wnv.js} +2 -2
- package/bin/{chunk-vpq224tm.js → chunk-qdycy714.js} +1 -1
- package/bin/{chunk-2jfbxefd.js → chunk-qh9rz2ee.js} +6 -6
- package/bin/{chunk-8hq6sn31.js → chunk-qmpph1gt.js} +2 -2
- package/bin/{chunk-hk7a2mgn.js → chunk-qy93r7tm.js} +2 -2
- package/bin/{chunk-d1zpcags.js → chunk-r5dv0rfv.js} +2 -2
- package/bin/{chunk-avvzqqk2.js → chunk-rfyaphas.js} +2 -2
- package/bin/chunk-rvspnthy.js +1 -0
- package/bin/{chunk-g0jy85re.js → chunk-s0hgykza.js} +2 -2
- package/bin/chunk-sjjndwt4.js +2 -0
- package/bin/chunk-t3tp9trj.js +2 -0
- package/bin/{chunk-hbrndqpj.js → chunk-t9t9evan.js} +2 -2
- package/bin/{chunk-s0k2r6ym.js → chunk-tpp9qf5m.js} +2 -2
- package/bin/chunk-tvg9gvqs.js +1 -0
- package/bin/{chunk-43mhpb0k.js → chunk-tzt4c1dm.js} +2 -2
- package/bin/{chunk-52qe6z8w.js → chunk-v8w2nxew.js} +1 -1
- package/bin/{chunk-5yxngq5n.js → chunk-v98e3gex.js} +1 -1
- package/bin/{chunk-4sdrjye2.js → chunk-vxpnp4xg.js} +2 -2
- package/bin/chunk-x3ynjbt5.js +307 -0
- package/bin/{chunk-jkapr5we.js → chunk-x6532q76.js} +1 -1
- package/bin/chunk-xp4dcyk3.js +1 -0
- package/bin/chunk-y8aehqr8.js +2 -0
- package/bin/{chunk-6j6dejtd.js → chunk-ytzk81tr.js} +1 -1
- package/bin/chunk-yvxt48r4.js +1 -0
- package/bin/{chunk-jf5ytqxd.js → chunk-zg60j9x2.js} +1 -1
- package/bin/{chunk-zj1rz1s9.js → chunk-zjj9qj6y.js} +2 -2
- package/bin/{chunk-weean2ja.js → chunk-zqg4f56h.js} +1 -1
- package/bin/chunk-zwgf211t.js +2 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +500 -364
- package/package.json +7 -7
- package/prisma/migrations/20260810025327_add_mcp_servers/migration.sql +71 -0
- package/prisma/migrations/20260810074554_mcp_server_cleanup/migration.sql +12 -0
- package/prisma/migrations/20260810124707_add_mcp_server_instructions/migration.sql +2 -0
- package/prisma/migrations/20260813022501_backfill_autofill_source_in_config/migration.sql +8 -0
- package/prisma/migrations/20260813022502_drop_legacy_autofill_columns/migration.sql +12 -0
- package/prisma/migrations/20260813122613_add_network_sandbox_enabled_column/migration.sql +2 -0
- package/prisma/migrations/20260813122618_migrate_legacy_sandboxes_enabled/migration.sql +2 -0
- package/prisma/schema.prisma +77 -9
- package/bin/chunk-1fqpgz02.js +0 -2
- package/bin/chunk-21hvrvzj.js +0 -2
- package/bin/chunk-23mj9p82.js +0 -1
- package/bin/chunk-24mag65w.js +0 -1
- package/bin/chunk-29203j0e.js +0 -7
- package/bin/chunk-2jv9re91.js +0 -2
- package/bin/chunk-2rmceamt.js +0 -1
- package/bin/chunk-6kv3jyfc.js +0 -2
- package/bin/chunk-95qc4bkh.js +0 -2
- package/bin/chunk-9nd5m7hy.js +0 -1
- package/bin/chunk-ampyjbj4.js +0 -1
- package/bin/chunk-bkcf4hw5.js +0 -1
- package/bin/chunk-cbjfw47x.js +0 -62
- package/bin/chunk-h2tztyxs.js +0 -1
- package/bin/chunk-htrzgs2a.css +0 -1
- package/bin/chunk-jqyprvqd.js +0 -1
- package/bin/chunk-jyeyp8p3.js +0 -1
- package/bin/chunk-kwr4m6vh.js +0 -1
- package/bin/chunk-n62kyrh1.js +0 -1
- package/bin/chunk-ntxwp6aa.js +0 -3
- package/bin/chunk-qxwfhv63.js +0 -2
- package/bin/chunk-v0cdg3n6.js +0 -307
- package/bin/chunk-x217skr3.js +0 -2
- package/bin/chunk-y6aa5ee0.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$e as p,Le as a,Ne as b,Oe as c,Pe as d,Qe as e,Re as f,Se as g,Te as h,Ue as i,Ve as j,We as k,Xe as l,Ye as m,Ze as n,_e as o,af as q,bf as r,cf as s,df as t,ef as u,ff as v,gf as w,hf as x,if as y,jf as z,kf as A,lf as B,mf as C,nf as D,of as E,pf as F,qf as G,rf as H,sf as I,tf as J,uf as K,vf as L}from"./chunk-b8v7jvkb.js";import"./chunk-dej1gq35.js";export{r as jwtVerify,s as jwtDecrypt,E as jwksCache,d as importX509,c as importSPKI,e as importPKCS8,f as importJWK,K as generateSecret,J as generateKeyPair,q as generalVerify,l as generalDecrypt,o as flattenedVerify,j as flattenedDecrypt,g as exportSPKI,h as exportPKCS8,i as exportJWK,b as errors,H as decodeProtectedHeader,I as decodeJwt,D as customFetch,L as cryptoRuntime,F as createRemoteJWKSet,C as createLocalJWKSet,p as compactVerify,k as compactDecrypt,A as calculateJwkThumbprintUri,z as calculateJwkThumbprint,a as base64url,G as UnsecuredJWT,x as SignJWT,w as GeneralSign,n as GeneralEncrypt,u as FlattenedSign,m as FlattenedEncrypt,y as EncryptJWT,B as EmbeddedJWK,v as CompactSign,t as CompactEncrypt};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Rk as _1}from"./chunk-3xzgddev.js";import{Sk as P1,Tk as f1}from"./chunk-2086rsb2.js";import{$k as D1}from"./chunk-6zs49mef.js";import{al as B1}from"./chunk-hqkmdp31.js";import{bl as j1,cl as S0}from"./chunk-tzt4c1dm.js";import{tl as T1,wl as I1,xl as R1,yl as k1,zl as y1}from"./chunk-p4c4z0f2.js";import{Al as c}from"./chunk-x6532q76.js";import{Bl as S1}from"./chunk-gjdmnfms.js";import{Hl as j0}from"./chunk-81tb4v5v.js";import{Jl as A1}from"./chunk-a0k1b4sq.js";import"./chunk-dej1gq35.js";function U(X,Z,$,W,Y){if(W==="m")throw TypeError("Private method is not writable");if(W==="a"&&!Y)throw TypeError("Private accessor was defined without a setter");if(typeof Z==="function"?X!==Z||!Y:!Z.has(X))throw TypeError("Cannot write private member to an object whose class did not declare it");return W==="a"?Y.call(X,$):Y?Y.value=$:Z.set(X,$),$}function z(X,Z,$,W){if($==="a"&&!W)throw TypeError("Private accessor was defined without a getter");if(typeof Z==="function"?X!==Z||!W:!Z.has(X))throw TypeError("Cannot read private member from an object whose class did not declare it");return $==="m"?W:$==="a"?W.call(X):W?W.value:Z.get(X)}var pZ=function(){let{crypto:X}=globalThis;if(X?.randomUUID)return pZ=X.randomUUID.bind(X),X.randomUUID();let Z=new Uint8Array(1),$=X?()=>X.getRandomValues(Z)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(W)=>(+W^$()&15>>+W/4).toString(16))};function d(X){return typeof X==="object"&&X!==null&&(("name"in X)&&X.name==="AbortError"||("message"in X)&&String(X.message).includes("FetchRequestCanceledException"))}var xX=(X)=>{if(X instanceof Error)return X;if(typeof X==="object"&&X!==null){try{if(Object.prototype.toString.call(X)==="[object Error]"){let Z=Error(X.message,X.cause?{cause:X.cause}:{});if(X.stack)Z.stack=X.stack;if(X.cause&&!Z.cause)Z.cause=X.cause;if(X.name)Z.name=X.name;return Z}}catch{}try{return Error(JSON.stringify(X))}catch{}}return Error(X)};class C extends Error{}class A extends C{constructor(X,Z,$,W,Y){super(`${A.makeMessage(X,Z,$)}`);this.status=X,this.headers=W,this.requestID=W?.get("request-id"),this.error=Z,this.type=Y??null}static makeMessage(X,Z,$){let W=Z?.message?typeof Z.message==="string"?Z.message:JSON.stringify(Z.message):Z?JSON.stringify(Z):$;if(X&&W)return`${X} ${W}`;if(X)return`${X} status code (no body)`;if(W)return W;return"(no status code or body)"}static generate(X,Z,$,W){if(!X||!W)return new s({message:$,cause:xX(Z)});let Y=Z,J=Y?.error?.type;if(X===400)return new FX(X,Y,$,W,J);if(X===401)return new LX(X,Y,$,W,J);if(X===403)return new AX(X,Y,$,W,J);if(X===404)return new jX(X,Y,$,W,J);if(X===409)return new SX(X,Y,$,W,J);if(X===422)return new BX(X,Y,$,W,J);if(X===429)return new DX(X,Y,$,W,J);if(X>=500)return new TX(X,Y,$,W,J);return new A(X,Y,$,W,J)}}class D extends A{constructor({message:X}={}){super(void 0,void 0,X||"Request was aborted.",void 0)}}class s extends A{constructor({message:X,cause:Z}){super(void 0,void 0,X||"Connection error.",void 0);if(Z)this.cause=Z}}class HX extends s{constructor({message:X}={}){super({message:X??"Request timed out."})}}class FX extends A{}class LX extends A{}class AX extends A{}class jX extends A{}class SX extends A{}class BX extends A{}class DX extends A{}class TX extends A{}var c1=/^[a-z][a-z0-9+.-]*:/i,P0=(X)=>{return c1.test(X)},lZ=(X)=>(lZ=Array.isArray,lZ(X)),iZ=lZ;function qZ(X){if(typeof X!=="object")return{};return X??{}}function nZ(X){if(!X)return!0;for(let Z in X)return!1;return!0}function f0(X,Z){return Object.prototype.hasOwnProperty.call(X,Z)}var I0=(X,Z)=>{if(typeof Z!=="number"||!Number.isInteger(Z))throw new C(`${X} must be an integer`);if(Z<0)throw new C(`${X} must be a positive integer`);return Z};var CZ=(X)=>{try{return JSON.parse(X)}catch(Z){return}};var R0=(X)=>new Promise((Z)=>setTimeout(Z,X));var i="0.91.1";var h0=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"};function d1(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}var m1=()=>{let X=d1();if(X==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":i,"X-Stainless-OS":y0(Deno.build.os),"X-Stainless-Arch":k0(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":i,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(X==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":i,"X-Stainless-OS":y0(globalThis.process.platform??"unknown"),"X-Stainless-Arch":k0(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let Z=u1();if(Z)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":i,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${Z.browser}`,"X-Stainless-Runtime-Version":Z.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":i,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function u1(){if(typeof navigator>"u"||!navigator)return null;let X=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:Z,pattern:$}of X){let W=$.exec(navigator.userAgent);if(W){let Y=W[1]||0,J=W[2]||0,Q=W[3]||0;return{browser:Z,version:`${Y}.${J}.${Q}`}}}return null}var k0=(X)=>{if(X==="x32")return"x32";if(X==="x86_64"||X==="x64")return"x64";if(X==="arm")return"arm";if(X==="aarch64"||X==="arm64")return"arm64";if(X)return`other:${X}`;return"unknown"},y0=(X)=>{if(X=X.toLowerCase(),X.includes("ios"))return"iOS";if(X==="android")return"Android";if(X==="darwin")return"MacOS";if(X==="win32")return"Windows";if(X==="freebsd")return"FreeBSD";if(X==="openbsd")return"OpenBSD";if(X==="linux")return"Linux";if(X)return`Other:${X}`;return"Unknown"},_0,g0=()=>{return _0??(_0=m1())};function b0(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function rZ(...X){let Z=globalThis.ReadableStream;if(typeof Z>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new Z(...X)}function OZ(X){let Z=Symbol.asyncIterator in X?X[Symbol.asyncIterator]():X[Symbol.iterator]();return rZ({start(){},async pull($){let{done:W,value:Y}=await Z.next();if(W)$.close();else $.enqueue(Y)},async cancel(){await Z.return?.()}})}function PX(X){if(X[Symbol.asyncIterator])return X;let Z=X.getReader();return{async next(){try{let $=await Z.read();if($?.done)Z.releaseLock();return $}catch($){throw Z.releaseLock(),$}},async return(){let $=Z.cancel();return Z.releaseLock(),await $,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function v0(X){if(X===null||typeof X!=="object")return;if(X[Symbol.asyncIterator]){await X[Symbol.asyncIterator]().return?.();return}let Z=X.getReader(),$=Z.cancel();Z.releaseLock(),await $}var c0=({headers:X,body:Z})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(Z)}};function d0(X){return Object.entries(X).filter(([Z,$])=>typeof $<"u").map(([Z,$])=>{if(typeof $==="string"||typeof $==="number"||typeof $==="boolean")return`${encodeURIComponent(Z)}=${encodeURIComponent($)}`;if($===null)return`${encodeURIComponent(Z)}=`;throw new C(`Cannot stringify type ${typeof $}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}function p0(X){let Z=0;for(let Y of X)Z+=Y.length;let $=new Uint8Array(Z),W=0;for(let Y of X)$.set(Y,W),W+=Y.length;return $}var m0;function fX(X){let Z;return(m0??(Z=new globalThis.TextEncoder,m0=Z.encode.bind(Z)))(X)}var u0;function aZ(X){let Z;return(u0??(Z=new globalThis.TextDecoder,u0=Z.decode.bind(Z)))(X)}var f,I;class n{constructor(){f.set(this,void 0),I.set(this,void 0),U(this,f,new Uint8Array,"f"),U(this,I,null,"f")}decode(X){if(X==null)return[];let Z=X instanceof ArrayBuffer?new Uint8Array(X):typeof X==="string"?fX(X):X;U(this,f,p0([z(this,f,"f"),Z]),"f");let $=[],W;while((W=i1(z(this,f,"f"),z(this,I,"f")))!=null){if(W.carriage&&z(this,I,"f")==null){U(this,I,W.index,"f");continue}if(z(this,I,"f")!=null&&(W.index!==z(this,I,"f")+1||W.carriage)){$.push(aZ(z(this,f,"f").subarray(0,z(this,I,"f")-1))),U(this,f,z(this,f,"f").subarray(z(this,I,"f")),"f"),U(this,I,null,"f");continue}let Y=z(this,I,"f")!==null?W.preceding-1:W.preceding,J=aZ(z(this,f,"f").subarray(0,Y));$.push(J),U(this,f,z(this,f,"f").subarray(W.index),"f"),U(this,I,null,"f")}return $}flush(){if(!z(this,f,"f").length)return[];return this.decode(`
|
|
3
3
|
`)}}f=new WeakMap,I=new WeakMap;n.NEWLINE_CHARS=new Set([`
|
|
4
4
|
`,"\r"]);n.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function i1(X,Z){for(let Y=Z??0;Y<X.length;Y++){if(X[Y]===10)return{preceding:Y,index:Y+1,carriage:!1};if(X[Y]===13)return{preceding:Y,index:Y+1,carriage:!0}}return null}function l0(X){for(let W=0;W<X.length-1;W++){if(X[W]===10&&X[W+1]===10)return W+2;if(X[W]===13&&X[W+1]===13)return W+2;if(X[W]===13&&X[W+1]===10&&W+3<X.length&&X[W+2]===13&&X[W+3]===10)return W+4}return-1}var MZ={off:0,error:200,warn:300,info:400,debug:500},oZ=(X,Z,$)=>{if(!X)return;if(f0(MZ,X))return X;S($).warn(`${Z} was set to ${JSON.stringify(X)}, expected one of ${JSON.stringify(Object.keys(MZ))}`);return};function IX(){}function EZ(X,Z,$){if(!Z||MZ[X]>MZ[$])return IX;else return Z[X].bind(Z)}var n1={error:IX,warn:IX,info:IX,debug:IX},i0=new WeakMap;function S(X){let Z=X.logger,$=X.logLevel??"off";if(!Z)return n1;let W=i0.get(Z);if(W&&W[0]===$)return W[1];let Y={error:EZ("error",Z,$),warn:EZ("warn",Z,$),info:EZ("info",Z,$),debug:EZ("debug",Z,$)};return i0.set(Z,[$,Y]),Y}var m=(X)=>{if(X.options)X.options={...X.options},delete X.options.headers;if(X.headers)X.headers=Object.fromEntries((X.headers instanceof Headers?[...X.headers]:Object.entries(X.headers)).map(([Z,$])=>[Z,Z.toLowerCase()==="x-api-key"||Z.toLowerCase()==="authorization"||Z.toLowerCase()==="cookie"||Z.toLowerCase()==="set-cookie"?"***":$]));if("retryOfRequestLogID"in X){if(X.retryOfRequestLogID)X.retryOf=X.retryOfRequestLogID;delete X.retryOfRequestLogID}return X};var RX;class R{constructor(X,Z,$){this.iterator=X,RX.set(this,void 0),this.controller=Z,U(this,RX,$,"f")}static fromSSEResponse(X,Z,$){let W=!1,Y=$?S($):console;async function*J(){if(W)throw new C("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");W=!0;let Q=!1;try{for await(let w of r1(X,Z)){if(w.event==="completion")try{yield JSON.parse(w.data)}catch(G){throw Y.error("Could not parse message into JSON:",w.data),Y.error("From chunk:",w.raw),G}if(w.event==="message_start"||w.event==="message_delta"||w.event==="message_stop"||w.event==="content_block_start"||w.event==="content_block_delta"||w.event==="content_block_stop"||w.event==="message"||w.event==="user.message"||w.event==="user.interrupt"||w.event==="user.tool_confirmation"||w.event==="user.custom_tool_result"||w.event==="agent.message"||w.event==="agent.thinking"||w.event==="agent.tool_use"||w.event==="agent.tool_result"||w.event==="agent.mcp_tool_use"||w.event==="agent.mcp_tool_result"||w.event==="agent.custom_tool_use"||w.event==="agent.thread_context_compacted"||w.event==="session.status_running"||w.event==="session.status_idle"||w.event==="session.status_rescheduled"||w.event==="session.status_terminated"||w.event==="session.error"||w.event==="session.deleted"||w.event==="span.model_request_start"||w.event==="span.model_request_end")try{yield JSON.parse(w.data)}catch(G){throw Y.error("Could not parse message into JSON:",w.data),Y.error("From chunk:",w.raw),G}if(w.event==="ping")continue;if(w.event==="error"){let G=CZ(w.data)??w.data,M=G?.error?.type;throw new A(void 0,G,void 0,X.headers,M)}}Q=!0}catch(w){if(d(w))return;throw w}finally{if(!Q)Z.abort()}}return new R(J,Z,$)}static fromReadableStream(X,Z,$){let W=!1;async function*Y(){let Q=new n,w=PX(X);for await(let G of w)for(let M of Q.decode(G))yield M;for(let G of Q.flush())yield G}async function*J(){if(W)throw new C("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");W=!0;let Q=!1;try{for await(let w of Y()){if(Q)continue;if(w)yield JSON.parse(w)}Q=!0}catch(w){if(d(w))return;throw w}finally{if(!Q)Z.abort()}}return new R(J,Z,$)}[(RX=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let X=[],Z=[],$=this.iterator(),W=(Y)=>{return{next:()=>{if(Y.length===0){let J=$.next();X.push(J),Z.push(J)}return Y.shift()}}};return[new R(()=>W(X),this.controller,z(this,RX,"f")),new R(()=>W(Z),this.controller,z(this,RX,"f"))]}toReadableStream(){let X=this,Z;return rZ({async start(){Z=X[Symbol.asyncIterator]()},async pull($){try{let{value:W,done:Y}=await Z.next();if(Y)return $.close();let J=fX(JSON.stringify(W)+`
|
|
5
5
|
`);$.enqueue(J)}catch(W){$.error(W)}},async cancel(){await Z.return?.()}})}}async function*r1(X,Z){if(!X.body){if(Z.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new C("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new C("Attempted to iterate over a response with no body")}let $=new n0,W=new n,Y=PX(X.body);for await(let J of a1(Y))for(let Q of W.decode(J)){let w=$.decode(Q);if(w)yield w}for(let J of W.flush()){let Q=$.decode(J);if(Q)yield Q}}async function*a1(X){let Z=new Uint8Array;for await(let $ of X){if($==null)continue;let W=$ instanceof ArrayBuffer?new Uint8Array($):typeof $==="string"?fX($):$,Y=new Uint8Array(Z.length+W.length);Y.set(Z),Y.set(W,Z.length),Z=Y;let J;while((J=l0(Z))!==-1)yield Z.slice(0,J),Z=Z.slice(J)}if(Z.length>0)yield Z}class n0{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(X){if(X.endsWith("\r"))X=X.substring(0,X.length-1);if(!X){if(!this.event&&!this.data.length)return null;let Y={event:this.event,data:this.data.join(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as x}from"./chunk-zwgf211t.js";import"./chunk-sjjndwt4.js";import"./chunk-qcqw7wnv.js";import"./chunk-x3ynjbt5.js";import"./chunk-dv1zpd2p.js";import"./chunk-mw8f8ngt.js";import"./chunk-y8aehqr8.js";import"./chunk-9nyhmtp9.js";import"./chunk-r5dv0rfv.js";import"./chunk-83k0wa5k.js";import"./chunk-8y1v9dm9.js";import"./chunk-tpp9qf5m.js";import"./chunk-4rbzswqs.js";import"./chunk-rfyaphas.js";import"./chunk-0yngn45x.js";import"./chunk-5gtew41y.js";import"./chunk-3kqdgddm.js";import"./chunk-karn564z.js";import{Bf as f}from"./chunk-9gzy30zm.js";import{Sf as p}from"./chunk-s0hgykza.js";import"./chunk-38g3s1f3.js";import"./chunk-qmpph1gt.js";import"./chunk-zjj9qj6y.js";import"./chunk-eetrc0j1.js";import"./chunk-9s02m95j.js";import"./chunk-87wqbn4g.js";import"./chunk-69tt1pvr.js";import"./chunk-f2j2cqd1.js";import"./chunk-2xmsrq7f.js";import"./chunk-af6wbhkv.js";import"./chunk-2mqqghrz.js";import{th as h}from"./chunk-n4gghgrj.js";import{Eh as l,Fh as r,Rh as o,bi as c,xh as w,zh as a}from"./chunk-m6a4rzdt.js";import{Nl as m}from"./chunk-dej1gq35.js";var g=m(w(),1);function v(){let{projectId:e}=d.useParams(),{teamId:s,ensureTeamIdForProject:n}=h();g.useEffect(()=>{n(e)},[e,n]);let{data:i}=r(f(e)),t=i?.rootFolder,{data:b}=l({queryKey:["folders",t],queryFn:()=>(async()=>{return await(await c.api.folders[":folderId"].$get({param:{folderId:t}})).json()})(),enabled:!!t});if(!s||!t||!b)return a(p,{});return a(x,{teamId:s,projectId:e,projectName:i.name??"",assetId:"recently-deleted",rootFolderId:t})}var d=o("/projects/$projectId/recently-deleted")({component:v});export{d as Route};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{dl as C,el as E,fl as I,gl as b,hl as h,il as B,jl as x}from"./chunk-fcs4v6jq.js";import{ol as M}from"./chunk-98j2z6he.js";import{pl as G,ql as K}from"./chunk-qdycy714.js";import{xl as T}from"./chunk-p4c4z0f2.js";import{Al as S}from"./chunk-x6532q76.js";import{Cl as O}from"./chunk-gjdmnfms.js";import{Hl as v,Il as y}from"./chunk-81tb4v5v.js";import{Jl as P}from"./chunk-a0k1b4sq.js";import"./chunk-dej1gq35.js";var k=0,D=(q,N,w)=>{let J=new P;return(async()=>{let j={role:"assistant",content:[],api:"google-generative-ai",provider:q.provider,model:q.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let X=w?.apiKey;if(!X)throw Error(`No API key for provider: ${q.provider}`);let V=a(q,X,w?.headers),Y=m(q,N,w),$=await w?.onPayload?.(Y,q);if($!==void 0)Y=$;let g=await V.models.generateContentStream(Y);J.push({type:"start",partial:j});let Q=null,H=j.content,W=()=>H.length-1;for await(let Z of g){j.responseId||=Z.responseId;let z=Z.candidates?.[0];if(z?.content?.parts)for(let U of z.content.parts){if(U.text!==void 0){let _=C(U);if(!Q||_&&Q.type!=="thinking"||!_&&Q.type!=="text"){if(Q)if(Q.type==="text")J.push({type:"text_end",contentIndex:H.length-1,content:Q.text,partial:j});else J.push({type:"thinking_end",contentIndex:W(),content:Q.thinking,partial:j});if(_)Q={type:"thinking",thinking:"",thinkingSignature:void 0},j.content.push(Q),J.push({type:"thinking_start",contentIndex:W(),partial:j});else Q={type:"text",text:""},j.content.push(Q),J.push({type:"text_start",contentIndex:W(),partial:j})}if(Q.type==="thinking")Q.thinking+=U.text,Q.thinkingSignature=E(Q.thinkingSignature,U.thoughtSignature),J.push({type:"thinking_delta",contentIndex:W(),delta:U.text,partial:j});else Q.text+=U.text,Q.textSignature=E(Q.textSignature,U.thoughtSignature),J.push({type:"text_delta",contentIndex:W(),delta:U.text,partial:j})}if(U.functionCall){if(Q){if(Q.type==="text")J.push({type:"text_end",contentIndex:W(),content:Q.text,partial:j});else J.push({type:"thinking_end",contentIndex:W(),content:Q.thinking,partial:j});Q=null}let _=U.functionCall.id,A={type:"toolCall",id:!_||j.content.some((R)=>R.type==="toolCall"&&R.id===_)?`${U.functionCall.name}_${Date.now()}_${++k}`:_,name:U.functionCall.name||"",arguments:U.functionCall.args??{},...U.thoughtSignature&&{thoughtSignature:U.thoughtSignature}};j.content.push(A),J.push({type:"toolcall_start",contentIndex:W(),partial:j}),J.push({type:"toolcall_delta",contentIndex:W(),delta:JSON.stringify(A.arguments),partial:j}),J.push({type:"toolcall_end",contentIndex:W(),toolCall:A,partial:j})}}if(z?.finishReason){if(j.stopReason=x(z.finishReason),j.content.some((U)=>U.type==="toolCall"))j.stopReason="toolUse"}if(Z.usageMetadata)j.usage={input:(Z.usageMetadata.promptTokenCount||0)-(Z.usageMetadata.cachedContentTokenCount||0),output:(Z.usageMetadata.candidatesTokenCount||0)+(Z.usageMetadata.thoughtsTokenCount||0),cacheRead:Z.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,reasoning:Z.usageMetadata.thoughtsTokenCount||0,totalTokens:Z.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},v(q,j.usage)}if(Q)if(Q.type==="text")J.push({type:"text_end",contentIndex:W(),content:Q.text,partial:j});else J.push({type:"thinking_end",contentIndex:W(),content:Q.thinking,partial:j});if(w?.signal?.aborted)throw Error("Request was aborted");if(j.stopReason==="aborted"||j.stopReason==="error")throw Error("An unknown error occurred");J.push({type:"done",reason:j.stopReason,message:j}),J.end()}catch(X){for(let V of j.content)if("index"in V)delete V.index;j.stopReason=w?.signal?.aborted?"aborted":"error",j.errorMessage=K(G(X)),J.push({type:"error",reason:j.stopReason,error:j}),J.end()}})(),J},qj=(q,N,w)=>{let J=w?.apiKey;if(!J)throw Error(`No API key for provider: ${q.provider}`);let j=T(q,N,w,J);if(!w?.reasoning)return D(q,N,{...j,thinking:{enabled:!1}});let X=y(q,w.reasoning),V=X==="off"?"high":X,Y=q;if(F(Y)||f(Y)||L(Y))return D(q,N,{...j,thinking:{enabled:!0,level:d(V,Y)}});return D(q,N,{...j,thinking:{enabled:!0,budgetTokens:c(Y,V,w.thinkingBudgets)}})};function a(q,N,w){let J={};if(q.baseUrl)J.baseUrl=q.baseUrl,J.apiVersion="";let j=O({...q.headers,...w});if(j)J.headers=j;return new M({apiKey:N,httpOptions:Object.keys(J).length>0?J:void 0})}function m(q,N,w={}){let J=I(q,N),j={};if(w.temperature!==void 0)j.temperature=w.temperature;if(w.maxTokens!==void 0)j.maxOutputTokens=w.maxTokens;let X=N.tools?.length?B(N.tools,w.toolChoice,h(q.id)):void 0,V={...Object.keys(j).length>0&&j,...N.systemPrompt&&{systemInstruction:S(N.systemPrompt)},...N.tools&&N.tools.length>0&&{tools:b(N.tools)},...X!==void 0&&{toolConfig:{functionCallingConfig:{mode:X}}}};if(w.thinking?.enabled&&q.reasoning){let $={includeThoughts:!0};if(w.thinking.level!==void 0)$.thinkingLevel=w.thinking.level;else if(w.thinking.budgetTokens!==void 0)$.thinkingBudget=w.thinking.budgetTokens;V.thinkingConfig=$}else if(q.reasoning&&w.thinking&&!w.thinking.enabled)V.thinkingConfig=u(q);if(w.signal){if(w.signal.aborted)throw Error("Request aborted");V.abortSignal=w.signal}return{model:q.id,contents:J,config:V}}function L(q){return/gemma-?4/.test(q.id.toLowerCase())}function F(q){return/gemini-3(?:\.\d+)?-pro/.test(q.id.toLowerCase())}function f(q){let N=q.id.toLowerCase();return/gemini-3(?:\.\d+)?-flash/.test(N)||N==="gemini-flash-latest"||N==="gemini-flash-lite-latest"}function u(q){if(F(q))return{thinkingLevel:"LOW"};if(f(q))return{thinkingLevel:"MINIMAL"};if(L(q))return{thinkingLevel:"MINIMAL"};return{thinkingBudget:0}}function d(q,N){if(F(N))switch(q){case"minimal":case"low":return"LOW";case"medium":case"high":return"HIGH"}if(L(N))switch(q){case"minimal":case"low":return"MINIMAL";case"medium":case"high":return"HIGH"}switch(q){case"minimal":return"MINIMAL";case"low":return"LOW";case"medium":return"MEDIUM";case"high":return"HIGH"}}function c(q,N,w){if(w?.[N]!==void 0)return w[N];if(q.id.includes("2.5-pro"))return{minimal:128,low:2048,medium:8192,high:32768}[N];if(q.id.includes("2.5-flash-lite"))return{minimal:512,low:2048,medium:8192,high:24576}[N];if(q.id.includes("2.5-flash"))return{minimal:128,low:2048,medium:8192,high:24576}[N];return-1}export{qj as streamSimple,D as stream};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{uq as
|
|
1
|
+
import{ib as Vq}from"./chunk-5gtew41y.js";import{kb as Qq,lb as Wq,mb as Xq,nb as Yq,ob as Zq,pb as _q,qb as $q,rb as Hq}from"./chunk-karn564z.js";import{Hg as o,Ig as r,Jg as m,Kg as e}from"./chunk-2xmsrq7f.js";import{hh as P,jh as k,kh as G,mh as B,nh as Y}from"./chunk-n4gghgrj.js";import{$h as W,Ah as K,Ck as X,Dk as h,Ek as C,Fk as O,Ik as J,Jk as qq,Ki as H,Kk as Eq,Mk as Jq,Nk as Kq,Pk as Nq,Ui as n,Xj as s,ni as z,xh as Cq,yh as t,zh as E}from"./chunk-m6a4rzdt.js";import{Nl as hq}from"./chunk-dej1gq35.js";var Z=hq(Cq(),1);function uq({open:fq,onOpenChange:Fq,title:zq,members:g,isOwner:_,onInvite:c,onUpdateRole:I,onRemoveMember:v,currentUserId:Pq,availableMembersToAdd:M,onAddMember:L,type:V="team"}){let[T,u]=Z.useState("editor"),[S,p]=Z.useState(null),[l,x]=Z.useState(!1),[D,U]=Z.useState(null),[f,A]=Z.useState(null),[j,i]=Z.useState({}),[$,F]=Z.useState(null),y=(q)=>{if(!q)return"";switch(q.toLowerCase()){case"owner":return J.owner();case"editor":return J.editor();case"reviewer":return J.reviewer();default:return q}},a=(q,N)=>{i((Q)=>({...Q,[q]:N}))},kq=async(q,N)=>{if(!I)return;U(q);try{await I(q,N),W.success(J.member_role_updated())}catch(Q){console.error(Q),W.error(J.failed_to_update_member_role())}finally{U(null)}},Gq=async()=>{if(!v||!f?.id)return;U(f.id);try{await v(f.id),W.success(J.member_removed()),A(null)}catch(q){console.error(q),W.error(J.failed_to_remove_member())}finally{U(null)}},Bq=async()=>{if(!c)return;x(!0);try{let q=await c(T),N=`${window.location.origin}/signup?inviteCode=${q}`;p(N)}catch(q){console.error(q),W.error(J.failed_to_generate_invite_link())}finally{x(!1)}},Lq=async()=>{if(S){if(await Vq(S))W.success(J.invite_link_copied())}},R=(q)=>{if(!q)return"??";return q.split(" ").map((N)=>N[0]).slice(0,2).join("").toUpperCase()},Sq=(q)=>{if(!q)p(null),u("editor"),i({}),F(null);Fq(q)},w=Array.isArray(g)?g:[],Uq=Array.isArray(M)?M:[],yq=V==="project"&&_?w.filter((q)=>q.role==="owner"||q.scope==="project"||q.hasCustomRole):w,d=V==="project"&&_?w.filter((q)=>q.scope==="team"&&q.role!=="owner"&&!q.hasCustomRole):[],b=V==="project"&&_?Uq.filter((q)=>q.scope==="project"):[];return E(Eq,{open:fq,onOpenChange:Sq,children:K(Jq,{className:"sm:max-w-xl",onOpenAutoFocus:(q)=>q.preventDefault(),children:[E(Kq,{children:E(Nq,{children:zq})}),K("div",{className:"space-y-4",children:[E("div",{className:"max-h-[300px] overflow-y-auto space-y-2",children:yq.map((q)=>{let N=V==="team"&&q.scope==="project";return K("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[K("div",{className:"flex items-center gap-3",children:[K(h,{children:[q.image&&E(C,{src:q.image,alt:q.name,className:"object-cover"}),E(O,{children:R(q.name)})]}),K("div",{className:"flex flex-col",children:[E("span",{className:"text-sm font-medium",children:q.name}),K("div",{className:"flex items-center gap-2",children:[!N&&E("span",{className:"text-xs text-muted-foreground capitalize",children:y(q.role)}),q.scope&&K(t,{children:[!N&&E("span",{className:"text-[10px] text-muted-foreground/70",children:"•"}),E("span",{className:"text-xs text-muted-foreground capitalize",children:q.scope==="team"?J.team_member():J.project_member()})]})]})]})]}),_&&q.role!=="owner"&&q.id!==Pq&&K("div",{className:"flex items-center gap-2",children:[N?E(o,{children:K(r,{children:[E(m,{asChild:!0,children:E("span",{children:E(X,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26 justify-between",disabled:!0,children:E(H,{className:"ml-auto h-3 w-3 opacity-50"})})})}),E(e,{side:"top",children:E("p",{className:"text-xs",children:J.project_member_role_tooltip()})})]})}):K(P,{children:[E(k,{asChild:!0,children:K(X,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:D===q.id,children:[y(q.role),E(H,{className:"ml-1 h-3 w-3 opacity-50"})]})}),E(G,{children:K(B,{value:q.role,onValueChange:(Q)=>kq(q.id,Q),children:[E(Y,{value:"editor",className:"text-xs",children:J.editor()}),E(Y,{value:"reviewer",className:"text-xs",children:J.reviewer()})]})})]}),E(X,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>A(q),disabled:D===q.id,children:D===q.id?E(z,{className:"h-3 w-3 animate-spin"}):E(s,{className:"h-3 w-3"})})]})]},q.id)})}),E(Qq,{open:!!f,onOpenChange:(q)=>!q&&A(null),children:K(Wq,{children:[K(Xq,{children:[E(Zq,{children:J.remove_member()}),E(_q,{children:J.remove_member_confirmation({name:f?.name||"",type:V==="project"?J.project():J.team()})})]}),K(Yq,{children:[E(Hq,{children:J.cancel()}),E($q,{onClick:Gq,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:J.remove()})]})]})})," ",_&&L&&d.length>0&&K("div",{className:"border-t pt-4",children:[E("h4",{className:"text-sm font-medium mb-1",children:J.add_team_member_to_project()}),E("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:J.add_team_member_to_project_hint()}),E("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:d.map((q)=>{let N=j[q.id]||"editor";return K("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[K("div",{className:"flex items-center gap-3",children:[K(h,{children:[q.image&&E(C,{src:q.image,alt:q.name,className:"object-cover"}),E(O,{children:R(q.name)})]}),K("div",{className:"flex flex-col",children:[E("span",{className:"text-sm font-medium",children:q.name}),E("span",{className:"text-xs text-muted-foreground capitalize",children:q.scope==="team"?J.team_member():J.project_member()})]})]}),K("div",{className:"flex items-center gap-2",children:[K(P,{children:[E(k,{asChild:!0,children:K(X,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:$===q.id,children:[y(N),E(H,{className:"ml-1 h-3 w-3 opacity-50"})]})}),E(G,{children:K(B,{value:N,onValueChange:(Q)=>a(q.id,Q),children:[E(Y,{value:"editor",className:"text-xs",children:J.editor()}),E(Y,{value:"reviewer",className:"text-xs",children:J.reviewer()})]})})]}),E(X,{onClick:async()=>{F(q.id);try{await L(q.id,N),W.success(J.added_member_successfully({name:q.name||""}))}catch(Q){console.error(Q),W.error(J.failed_to_add_member({name:q.name||""}))}finally{F(null)}},disabled:$!==null,size:"sm",className:"h-8 text-xs px-3",children:$===q.id?E(z,{className:"h-3 w-3 animate-spin"}):J.set_role()})]})]},q.id)})})]}),_&&L&&b.length>0&&K("div",{className:"border-t pt-4",children:[E("h4",{className:"text-sm font-medium mb-1",children:J.add_members_from_other_projects()}),E("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:J.add_members_from_other_projects_hint()}),E("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:b.map((q)=>{let N=j[q.id]||"editor";return K("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[K("div",{className:"flex items-center gap-3",children:[K(h,{children:[q.image&&E(C,{src:q.image,alt:q.name,className:"object-cover"}),E(O,{children:R(q.name)})]}),K("div",{className:"flex flex-col",children:[E("span",{className:"text-sm font-medium",children:q.name}),E("span",{className:"text-xs text-muted-foreground capitalize",children:q.scope==="team"?J.team_member():J.project_member()})]})]}),K("div",{className:"flex items-center gap-2",children:[K(P,{children:[E(k,{asChild:!0,children:K(X,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:$===q.id,children:[y(N),E(H,{className:"ml-1 h-3 w-3 opacity-50"})]})}),E(G,{children:K(B,{value:N,onValueChange:(Q)=>a(q.id,Q),children:[E(Y,{value:"editor",className:"text-xs",children:J.editor()}),E(Y,{value:"reviewer",className:"text-xs",children:J.reviewer()})]})})]}),E(X,{onClick:async()=>{F(q.id);try{await L(q.id,N),W.success(J.added_member_successfully({name:q.name||""}))}catch(Q){console.error(Q),W.error(J.failed_to_add_member({name:q.name||""}))}finally{F(null)}},disabled:$!==null,size:"sm",className:"h-8 text-xs px-3",children:$===q.id?E(z,{className:"h-3 w-3 animate-spin"}):J.add_to_project()})]})]},q.id)})})]}),_&&c&&K("div",{className:"border-t pt-4",children:[E("h4",{className:"text-sm font-medium mb-3",children:J.invite_new_member()}),K("div",{className:"space-y-3",children:[K("div",{className:"flex gap-2",children:[K(P,{children:[E(k,{asChild:!0,children:K(X,{variant:"outline",className:"w-[120px] justify-between",children:[T==="editor"?J.editor():J.reviewer(),E(H,{className:"h-4 w-4 opacity-50"})]})}),E(G,{children:K(B,{value:T,onValueChange:(q)=>u(q),children:[E(Y,{value:"editor",children:J.editor()}),E(Y,{value:"reviewer",children:J.reviewer()})]})})]}),K(X,{onClick:Bq,disabled:l,className:"flex-1",children:[l&&E(z,{className:"mr-2 h-4 w-4 animate-spin"}),J.generate_link()]})]}),S&&K("div",{className:"flex gap-2",children:[E(qq,{value:S,readOnly:!0}),E(X,{variant:"outline",size:"icon",onClick:Lq,children:E(n,{className:"h-4 w-4"})})]})]})]})]})]})})}
|
|
2
|
+
export{uq as hb};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var E=new Set;function H(k){return E.add(k),()=>{E.delete(k)}}var w=-1/0,z=0;function G(k){if(globalThis.crypto?.getRandomValues){globalThis.crypto.getRandomValues(k);return}for(let A=0;A<k.length;A++)k[A]=Math.floor(Math.random()*256)}function K(){let k=new Uint8Array(16);G(k);let A=Date.now();if(A>w)z=k[6]*16777216+k[7]*65536+k[8]*256+k[9],w=A;else if(z=z+1>>>0,z===0)w++;let v=new Uint8Array(16);v[0]=w/1099511627776&255,v[1]=w/4294967296&255,v[2]=w/16777216&255,v[3]=w/65536&255,v[4]=w/256&255,v[5]=w&255,v[6]=112|z>>>28&15,v[7]=z>>>20&255,v[8]=128|z>>>14&63,v[9]=z>>>6&255,v[10]=(z&63)<<2|k[10]&3,v[11]=k[11],v[12]=k[12],v[13]=k[13],v[14]=k[14],v[15]=k[15];let D=Array.from(v,(F)=>F.toString(16).padStart(2,"0"));return`${D.slice(0,4).join("")}-${D.slice(4,6).join("")}-${D.slice(6,8).join("")}-${D.slice(8,10).join("")}-${D.slice(10,16).join("")}`}
|
|
3
|
-
export{H as
|
|
3
|
+
export{H as Je,K as Ke};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{i as
|
|
1
|
+
import{Ik as c,Qh as n,bi as e,zh as r}from"./chunk-m6a4rzdt.js";var i=(o)=>({queryKey:["projects",o],queryFn:async()=>{let t=await e.api.projects[":projectId"].$get({param:{projectId:o}});if(!t.ok)throw Error("Failed to fetch project");return await t.json()}}),l=(o)=>({queryKey:["collections",o],queryFn:async()=>{let t=await e.api.collections[":collectionId"].$get({param:{collectionId:o}});if(!t.ok)throw Error("Failed to fetch collection");return await t.json()}}),u=n("/projects/$projectId/collections/$collectionId")({loader:({context:{queryClient:o},params:{projectId:t}})=>o.ensureQueryData(i(t)),pendingComponent:()=>r("div",{children:c.loading_collection()})});
|
|
2
|
+
export{i as yf,l as zf,u as Af};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function w(q){let k=q[q.length-1];return k&&k.role!=="user"?"agent":"user"}function x(q){return q.some((k)=>{if(k.role==="user"&&Array.isArray(k.content))return k.content.some((v)=>v.type==="image");if(k.role==="toolResult"&&Array.isArray(k.content))return k.content.some((v)=>v.type==="image");return!1})}function y(q){let k={"X-Initiator":w(q.messages),"Openai-Intent":"conversation-edits"};if(q.hasImages)k["Copilot-Vision-Request"]="true";return k}
|
|
3
|
-
export{x as
|
|
3
|
+
export{x as Sk,y as Tk};
|