sliccy 2.9.0 → 2.9.2

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 (25) hide show
  1. package/dist/ui/assets/anthropic-B_G_XaII.js +39 -0
  2. package/dist/ui/assets/{azure-openai-responses-BcVCOWjr.js → azure-openai-responses-DGP9FznR.js} +1 -1
  3. package/dist/ui/assets/{es-Dh2rgMJQ.js → es-CshwIVxl.js} +1 -1
  4. package/dist/ui/assets/{google-CJIGxdKe.js → google-CVHipi9O.js} +1 -1
  5. package/dist/ui/assets/{google-gemini-cli-CBH9v3m0.js → google-gemini-cli-sGthcgbS.js} +1 -1
  6. package/dist/ui/assets/{google-shared-jyMmIrwc.js → google-shared-CDmR0GpA.js} +2 -2
  7. package/dist/ui/assets/google-vertex-DN1wAqZn.js +1 -0
  8. package/dist/ui/assets/{index-CwOoNoZz.js → index-DVkx0FQ1.js} +899 -883
  9. package/dist/ui/assets/{mistral-BO8fQ2lz.js → mistral-Cmjy2s71.js} +1 -1
  10. package/dist/ui/assets/{openai-codex-responses-DglthLmz.js → openai-codex-responses-DtaPhqWg.js} +2 -2
  11. package/dist/ui/assets/openai-completions-DOc86qsw.js +5 -0
  12. package/dist/ui/assets/openai-responses-BaHrtSzd.js +1 -0
  13. package/dist/ui/assets/{openai-responses-shared-BU6CEk9U.js → openai-responses-shared-1GRuwtt-.js} +1 -1
  14. package/dist/ui/assets/provider-settings-CRjs-euU.js +90 -0
  15. package/dist/ui/assets/simple-options-CP_5aL7H.js +1 -0
  16. package/dist/ui/assets/{skills-O_vTBFE5.js → skills-CKFAFOPy.js} +1 -1
  17. package/dist/ui/index.html +5 -5
  18. package/dist/ui/packages/webapp/index.html +5 -5
  19. package/package.json +1 -1
  20. package/dist/ui/assets/anthropic-CMVA8z4u.js +0 -36
  21. package/dist/ui/assets/google-vertex-BrN3Tz3e.js +0 -1
  22. package/dist/ui/assets/openai-completions-B9-2Retb.js +0 -5
  23. package/dist/ui/assets/openai-responses-Bay2AY5u.js +0 -1
  24. package/dist/ui/assets/provider-settings-lbdVYpIy.js +0 -94
  25. package/dist/ui/assets/simple-options-DEbfD_Ko.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,n as t,r as n,s as r}from"./simple-options-CP_5aL7H.js";import{t as i}from"./sanitize-unicode-ncMKN_SD.js";import{c as a,i as o,l as s,n as c,o as l,r as u,s as d,t as f,u as p}from"./google-shared-CDmR0GpA.js";var m=`v1`,h=`gcp-vertex-credentials`,g={THINKING_LEVEL_UNSPECIFIED:p.THINKING_LEVEL_UNSPECIFIED,MINIMAL:p.MINIMAL,LOW:p.LOW,MEDIUM:p.MEDIUM,HIGH:p.HIGH},_=0,v=(t,n,i)=>{let a=new e;return(async()=>{let e={role:`assistant`,content:[],api:`google-vertex`,provider:t.provider,model:t.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 s=T(i),c=s?x(t,s,i?.headers):b(t,D(i),O(i),i?.headers),l=k(t,n,i),f=await i?.onPayload?.(l,t);f!==void 0&&(l=f);let p=await c.models.generateContentStream(l);a.push({type:`start`,partial:e});let m=null,h=e.content,g=()=>h.length-1;for await(let n of p){e.responseId||=n.responseId;let i=n.candidates?.[0];if(i?.content?.parts)for(let t of i.content.parts){if(t.text!==void 0){let n=u(t);(!m||n&&m.type!==`thinking`||!n&&m.type!==`text`)&&(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:h.length-1,content:m.text,partial:e}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:e})),n?(m={type:`thinking`,thinking:``,thinkingSignature:void 0},e.content.push(m),a.push({type:`thinking_start`,contentIndex:g(),partial:e})):(m={type:`text`,text:``},e.content.push(m),a.push({type:`text_start`,contentIndex:g(),partial:e}))),m.type===`thinking`?(m.thinking+=t.text,m.thinkingSignature=d(m.thinkingSignature,t.thoughtSignature),a.push({type:`thinking_delta`,contentIndex:g(),delta:t.text,partial:e})):(m.text+=t.text,m.textSignature=d(m.textSignature,t.thoughtSignature),a.push({type:`text_delta`,contentIndex:g(),delta:t.text,partial:e}))}if(t.functionCall){m&&=(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:e}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:e}),null);let n=t.functionCall.id,r={type:`toolCall`,id:!n||e.content.some(e=>e.type===`toolCall`&&e.id===n)?`${t.functionCall.name}_${Date.now()}_${++_}`:n,name:t.functionCall.name||``,arguments:t.functionCall.args??{},...t.thoughtSignature&&{thoughtSignature:t.thoughtSignature}};e.content.push(r),a.push({type:`toolcall_start`,contentIndex:g(),partial:e}),a.push({type:`toolcall_delta`,contentIndex:g(),delta:JSON.stringify(r.arguments),partial:e}),a.push({type:`toolcall_end`,contentIndex:g(),toolCall:r,partial:e})}}i?.finishReason&&(e.stopReason=o(i.finishReason),e.content.some(e=>e.type===`toolCall`)&&(e.stopReason=`toolUse`)),n.usageMetadata&&(e.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}},r(t,e.usage))}if(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:e}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:e})),i?.signal?.aborted)throw Error(`Request was aborted`);if(e.stopReason===`aborted`||e.stopReason===`error`)throw Error(`An unknown error occurred`);a.push({type:`done`,reason:e.stopReason,message:e}),a.end()}catch(t){for(let t of e.content)`index`in t&&delete t.index;e.stopReason=i?.signal?.aborted?`aborted`:`error`,e.errorMessage=t instanceof Error?t.message:JSON.stringify(t),a.push({type:`error`,reason:e.stopReason,error:e}),a.end()}})(),a},y=(e,r,i)=>{let a=t(e,i,void 0);if(!i?.reasoning)return v(e,r,{...a,thinking:{enabled:!1}});let o=n(i.reasoning),s=e;return A(s)||j(s)?v(e,r,{...a,thinking:{enabled:!0,level:N(o,s)}}):v(e,r,{...a,thinking:{enabled:!0,budgetTokens:P(s,o,i.thinkingBudgets)}})};function b(e,t,n,r){return new a({vertexai:!0,project:t,location:n,apiVersion:m,httpOptions:S(e,r)})}function x(e,t,n){return new a({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=s.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(e,t,n={}){let r=f(e,t),a={};n.temperature!==void 0&&(a.temperature=n.temperature),n.maxTokens!==void 0&&(a.maxOutputTokens=n.maxTokens);let o={...Object.keys(a).length>0&&a,...t.systemPrompt&&{systemInstruction:i(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:c(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?o.toolConfig={functionCallingConfig:{mode:l(n.toolChoice)}}:o.toolConfig=void 0,n.thinking?.enabled&&e.reasoning){let e={includeThoughts:!0};n.thinking.level===void 0?n.thinking.budgetTokens!==void 0&&(e.thinkingBudget=n.thinking.budgetTokens):e.thinkingLevel=g[n.thinking.level],o.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(o.thinkingConfig=M(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);o.abortSignal=n.signal}return{model:e.id,contents:r,config:o}}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:p.LOW}:j(t)?{thinkingLevel:p.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};