sliccy 2.22.2 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node-server/index.js +136 -18
- package/dist/node-server/release-package.d.ts +0 -1
- package/dist/node-server/release-package.js +1 -8
- package/dist/ui/assets/{anthropic-CePl-niV.js → anthropic-DzA7ID1f.js} +4 -4
- package/dist/ui/assets/azure-openai-responses-L-g8xGN9.js +1 -0
- package/dist/ui/assets/{dist-DEU7LMsW.js → dist-BETSJsV5.js} +1 -1
- package/dist/ui/assets/{dist-DY89ppnG.js → dist-BVxswsnA.js} +2 -2
- package/dist/ui/assets/{dist-Bsu1jCSL.js → dist-C_pwrhfY.js} +1 -1
- package/dist/ui/assets/{dist-UfV1NDbo.js → dist-Ck3Vla0r.js} +1 -1
- package/dist/ui/assets/{dist-DfXP7YfQ.js → dist-DB19jrs9.js} +1 -1
- package/dist/ui/assets/{es-Ctukg7Pf.js → es-ANbLTHCW.js} +1 -1
- package/dist/ui/assets/{fs-C0vsW7YS.js → fs-B0gD1h31.js} +1 -1
- package/dist/ui/assets/google-BFrczX47.js +1 -0
- package/dist/ui/assets/google-shared-tCK79d6s.js +11 -0
- package/dist/ui/assets/google-vertex-DVupsUV0.js +1 -0
- package/dist/ui/assets/{index-n7dM8Ny6.js → index-BVA4YIGJ.js} +1020 -940
- package/dist/ui/assets/{magick-wasm-CNSmo9gu.js → magick-wasm-DpuDwl7G.js} +1 -1
- package/dist/ui/assets/{mistral-DPFFr-1D.js → mistral-BytTBgnp.js} +4 -4
- package/dist/ui/assets/{onboarding-orchestrator-DX-WA9oh.js → onboarding-orchestrator-De86ExKz.js} +1 -1
- package/dist/ui/assets/openai-codex-responses-DpZthon5.js +7 -0
- package/dist/ui/assets/openai-completions-C9gJOWvK.js +5 -0
- package/dist/ui/assets/openai-responses-De-ZNw7W.js +1 -0
- package/dist/ui/assets/provider-settings-ciu6URbL.js +95 -0
- package/dist/ui/assets/simple-options-CDIijiMb.js +1 -0
- package/dist/ui/assets/{skills-Cp2_zExC.js → skills-DShRVTVQ.js} +1 -1
- package/dist/ui/assets/{slicc-editor-Bv8eZLtW.js → slicc-editor-C9a_yd9R.js} +2 -2
- package/dist/ui/index.html +16 -13
- package/dist/ui/llm-proxy-sw.js +1 -0
- package/dist/ui/packages/webapp/index.html +16 -13
- package/package.json +4 -3
- package/dist/node-server/sync-release-version.d.ts +0 -4
- package/dist/node-server/sync-release-version.js +0 -44
- package/dist/ui/assets/azure-openai-responses-B0ars-Hm.js +0 -1
- package/dist/ui/assets/google-CgTHsA2_.js +0 -1
- package/dist/ui/assets/google-shared-nj0IYXjb.js +0 -11
- package/dist/ui/assets/google-vertex-cqyT1zM2.js +0 -1
- package/dist/ui/assets/openai-codex-responses-DjTLNv18.js +0 -7
- package/dist/ui/assets/openai-completions-BnCyVXK7.js +0 -5
- package/dist/ui/assets/openai-responses-9MflKa27.js +0 -1
- package/dist/ui/assets/openai-responses-shared-D8Vix6-m.js +0 -10
- package/dist/ui/assets/provider-settings-DY_N8CBx.js +0 -95
- package/dist/ui/assets/sanitize-unicode-BD2XKRoV.js +0 -1
- package/dist/ui/assets/simple-options-CRMUB9za.js +0 -1
- /package/dist/ui/assets/{addon-fit-_YHcqy0h.js → addon-fit-CniRnSyE.js} +0 -0
- /package/dist/ui/assets/{browser-Cl7Q1LkV.js → browser-CFDl2kC3.js} +0 -0
- /package/dist/ui/assets/{bsh-watchdog-5FY6DxLX.js → bsh-watchdog-DWN1spIr.js} +0 -0
- /package/dist/ui/assets/{chat-fixture-Dp2mIM1B.js → chat-fixture-BGLmPevX.js} +0 -0
- /package/dist/ui/assets/{db-CDfQGWkv.js → db-QbwB670D.js} +0 -0
- /package/dist/ui/assets/{dist-BByiYVMV.js → dist-CkF25Z3T.js} +0 -0
- /package/dist/ui/assets/{dist-D6ztLqPA.js → dist-uJp2dR6X.js} +0 -0
- /package/dist/ui/assets/{fetch-body-DJGM6_Jl.js → fetch-body-DPMYsjzA.js} +0 -0
- /package/dist/ui/assets/{github-copilot-headers-B6Fvsk-Y.js → github-copilot-headers-DGaOrqaW.js} +0 -0
- /package/dist/ui/assets/{global-db-D767Oa4m.js → global-db-Cui6Md0w.js} +0 -0
- /package/dist/ui/assets/{hash-Dit8ENAX.js → hash-BN8UQrrC.js} +0 -0
- /package/dist/ui/assets/{headers-DkHU-pcw.js → headers-qDMOQQGF.js} +0 -0
- /package/dist/ui/assets/{lick-manager-proxy-DYlDsj9K.js → lick-manager-proxy-Dw3D3AzG.js} +0 -0
- /package/dist/ui/assets/{oauth-service-CKR4S63v.js → oauth-service-DUXASG7L.js} +0 -0
- /package/dist/ui/assets/{offscreen-client-BM0UHxmA.js → offscreen-client-DRN1fwvT.js} +0 -0
- /package/dist/ui/assets/{openai-CQsomflW.js → openai-D4NSaQIs.js} +0 -0
- /package/dist/ui/assets/{path-utils-CNNVZ3-O.js → path-utils-DAY6ORUp.js} +0 -0
- /package/dist/ui/assets/{pdfjs-BGlny-4w.js → pdfjs-C0bwNEC1.js} +0 -0
- /package/dist/ui/assets/{pyodide-B0OcGzKl.js → pyodide-DCMrvZhT.js} +0 -0
- /package/dist/ui/assets/{rum-C22a_afY.js → rum-sVedwbc1.js} +0 -0
- /package/dist/ui/assets/{secret-masking-D8cHWx2y.js → secret-masking-ZNVanUmG.js} +0 -0
- /package/dist/ui/assets/{sql-wasm-BaMgQAJZ.js → sql-wasm-GAMLdFdJ.js} +0 -0
- /package/dist/ui/assets/{src-Bd0ucr8W.js → src-DSYf97Eh.js} +0 -0
- /package/dist/ui/assets/{xterm-GX0WTpdZ.js → xterm-BaLOnk9X.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,c as t,l as n,n as r,o as i}from"./simple-options-CDIijiMb.js";import{a,c as o,i as s,l as c,n as l,o as u,r as d,s as f,t as p}from"./google-shared-tCK79d6s.js";var m=`v1`,h=`gcp-vertex-credentials`,g={THINKING_LEVEL_UNSPECIFIED:c.THINKING_LEVEL_UNSPECIFIED,MINIMAL:c.MINIMAL,LOW:c.LOW,MEDIUM:c.MEDIUM,HIGH:c.HIGH},_=0,v=(e,n,r)=>{let a=new i;return(async()=>{let i={role:`assistant`,content:[],api:`google-vertex`,provider:e.provider,model:e.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 o=T(r),c=o?x(e,o,r?.headers):b(e,D(r),O(r),r?.headers),l=k(e,n,r),f=await r?.onPayload?.(l,e);f!==void 0&&(l=f);let p=await c.models.generateContentStream(l);a.push({type:`start`,partial:i});let m=null,h=i.content,g=()=>h.length-1;for await(let n of p){i.responseId||=n.responseId;let r=n.candidates?.[0];if(r?.content?.parts)for(let e of r.content.parts){if(e.text!==void 0){let t=d(e);(!m||t&&m.type!==`thinking`||!t&&m.type!==`text`)&&(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:h.length-1,content:m.text,partial:i}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:i})),t?(m={type:`thinking`,thinking:``,thinkingSignature:void 0},i.content.push(m),a.push({type:`thinking_start`,contentIndex:g(),partial:i})):(m={type:`text`,text:``},i.content.push(m),a.push({type:`text_start`,contentIndex:g(),partial:i}))),m.type===`thinking`?(m.thinking+=e.text,m.thinkingSignature=u(m.thinkingSignature,e.thoughtSignature),a.push({type:`thinking_delta`,contentIndex:g(),delta:e.text,partial:i})):(m.text+=e.text,m.textSignature=u(m.textSignature,e.thoughtSignature),a.push({type:`text_delta`,contentIndex:g(),delta:e.text,partial:i}))}if(e.functionCall){m&&=(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:i}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:i}),null);let t=e.functionCall.id,n={type:`toolCall`,id:!t||i.content.some(e=>e.type===`toolCall`&&e.id===t)?`${e.functionCall.name}_${Date.now()}_${++_}`:t,name:e.functionCall.name||``,arguments:e.functionCall.args??{},...e.thoughtSignature&&{thoughtSignature:e.thoughtSignature}};i.content.push(n),a.push({type:`toolcall_start`,contentIndex:g(),partial:i}),a.push({type:`toolcall_delta`,contentIndex:g(),delta:JSON.stringify(n.arguments),partial:i}),a.push({type:`toolcall_end`,contentIndex:g(),toolCall:n,partial:i})}}r?.finishReason&&(i.stopReason=s(r.finishReason),i.content.some(e=>e.type===`toolCall`)&&(i.stopReason=`toolUse`)),n.usageMetadata&&(i.usage={input:(n.usageMetadata.promptTokenCount||0)-(n.usageMetadata.cachedContentTokenCount||0),output:(n.usageMetadata.candidatesTokenCount||0)+(n.usageMetadata.thoughtsTokenCount||0),cacheRead:n.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,totalTokens:n.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},t(e,i.usage))}if(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:i}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:i})),r?.signal?.aborted)throw Error(`Request was aborted`);if(i.stopReason===`aborted`||i.stopReason===`error`)throw Error(`An unknown error occurred`);a.push({type:`done`,reason:i.stopReason,message:i}),a.end()}catch(e){for(let e of i.content)`index`in e&&delete e.index;i.stopReason=r?.signal?.aborted?`aborted`:`error`,i.errorMessage=e instanceof Error?e.message:JSON.stringify(e),a.push({type:`error`,reason:i.stopReason,error:i}),a.end()}})(),a},y=(e,t,i)=>{let a=r(e,i,void 0);if(!i?.reasoning)return v(e,t,{...a,thinking:{enabled:!1}});let o=n(e,i.reasoning),s=o===`off`?`high`:o,c=e;return A(c)||j(c)?v(e,t,{...a,thinking:{enabled:!0,level:N(s,c)}}):v(e,t,{...a,thinking:{enabled:!0,budgetTokens:P(c,s,i.thinkingBudgets)}})};function b(e,t,n,r){return new f({vertexai:!0,project:t,location:n,apiVersion:m,httpOptions:S(e,r)})}function x(e,t,n){return new f({vertexai:!0,apiKey:t,apiVersion:m,httpOptions:S(e,n)})}function S(e,t){let n={},r=C(e.baseUrl);return r&&(n.baseUrl=r,n.baseUrlResourceScope=o.COLLECTION,w(r)&&(n.apiVersion=``)),(e.headers||t)&&(n.headers={...e.headers,...t}),Object.keys(n).length>0?n:void 0}function C(e){let t=e.trim();if(!(!t||t.includes(`{location}`)))return t}function w(e){try{return new URL(e).pathname.split(`/`).some(e=>/^v\d+(?:beta\d*)?$/.test(e))}catch{return/(?:^|\/)v\d+(?:beta\d*)?(?:\/|$)/.test(e)}}function T(e){let t=e?.apiKey?.trim()||{}.GOOGLE_CLOUD_API_KEY?.trim();if(!(!t||t===h||E(t)))return t}function E(e){return/^<[^>]+>$/.test(e)}function D(e){let t=e?.project||{}.GOOGLE_CLOUD_PROJECT||{}.GCLOUD_PROJECT;if(!t)throw Error(`Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.`);return t}function O(e){let t=e?.location||{}.GOOGLE_CLOUD_LOCATION;if(!t)throw Error(`Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.`);return t}function k(t,n,r={}){let i=p(t,n),o={};r.temperature!==void 0&&(o.temperature=r.temperature),r.maxTokens!==void 0&&(o.maxOutputTokens=r.maxTokens);let s={...Object.keys(o).length>0&&o,...n.systemPrompt&&{systemInstruction:e(n.systemPrompt)},...n.tools&&n.tools.length>0&&{tools:l(n.tools)}};if(n.tools&&n.tools.length>0&&r.toolChoice?s.toolConfig={functionCallingConfig:{mode:a(r.toolChoice)}}:s.toolConfig=void 0,r.thinking?.enabled&&t.reasoning){let e={includeThoughts:!0};r.thinking.level===void 0?r.thinking.budgetTokens!==void 0&&(e.thinkingBudget=r.thinking.budgetTokens):e.thinkingLevel=g[r.thinking.level],s.thinkingConfig=e}else t.reasoning&&r.thinking&&!r.thinking.enabled&&(s.thinkingConfig=M(t));if(r.signal){if(r.signal.aborted)throw Error(`Request aborted`);s.abortSignal=r.signal}return{model:t.id,contents:i,config:s}}function A(e){return/gemini-3(?:\.\d+)?-pro/.test(e.id.toLowerCase())}function j(e){return/gemini-3(?:\.\d+)?-flash/.test(e.id.toLowerCase())}function M(e){let t=e;return A(t)?{thinkingLevel:c.LOW}:j(t)?{thinkingLevel:c.MINIMAL}:{thinkingBudget:0}}function N(e,t){if(A(t))switch(e){case`minimal`:case`low`:return`LOW`;case`medium`:case`high`:return`HIGH`}switch(e){case`minimal`:return`MINIMAL`;case`low`:return`LOW`;case`medium`:return`MEDIUM`;case`high`:return`HIGH`}}function P(e,t,n){return n?.[t]===void 0?e.id.includes(`2.5-pro`)?{minimal:128,low:2048,medium:8192,high:32768}[t]:e.id.includes(`2.5-flash`)?{minimal:128,low:2048,medium:8192,high:24576}[t]:-1:n[t]}export{v as streamGoogleVertex,y as streamSimpleGoogleVertex};
|