sliccy 4.0.0 → 4.0.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 (98) hide show
  1. package/dist/ui/assets/{adobe-Cemo5C0u.js → adobe-B4ZijlN3.js} +1 -1
  2. package/dist/ui/assets/{adobe-BbrAWL2k.js → adobe-CXtz_LR-.js} +2 -2
  3. package/dist/ui/assets/{agent-message-to-chat-CcbdvCBX.js → agent-message-to-chat-2oatz-4r.js} +1 -1
  4. package/dist/ui/assets/{anthropic-F94JdHkD.js → anthropic-DdhoKMtR.js} +1 -1
  5. package/dist/ui/assets/{apps-DW9Ugrtq.js → apps-BkzP1PLW.js} +1 -1
  6. package/dist/ui/assets/{azure-openai-DeK0lFgF.js → azure-openai-C-3E46Ld.js} +1 -1
  7. package/dist/ui/assets/{azure-openai-BIN3lyjx.js → azure-openai-DTW6COMC.js} +1 -1
  8. package/dist/ui/assets/{azure-openai-responses-9zsK4075.js → azure-openai-responses-CdvI3ZMk.js} +1 -1
  9. package/dist/ui/assets/{bsh-watchdog-CFGe8ITX.js → bsh-watchdog-BFmmHSkm.js} +1 -1
  10. package/dist/ui/assets/{cdp-n4Jl6aC4.js → cdp-Bx-nkPzL.js} +3 -3
  11. package/dist/ui/assets/{connect-surface-C8QsyQkF.js → connect-surface-Dwz7gSuy.js} +1 -1
  12. package/dist/ui/assets/dip-_QvZN8wj.js +1 -0
  13. package/dist/ui/assets/{dist-tjBW4Ynj.js → dist-DBjE4kB5.js} +1 -1
  14. package/dist/ui/assets/{dist-Dgyr_bjn.js → dist-DU9Hdb6p.js} +1 -1
  15. package/dist/ui/assets/{es-CIP8vLYQ.js → es-CxV76drH.js} +1 -1
  16. package/dist/ui/assets/esp8266-91jA_HHD.js +1 -0
  17. package/dist/ui/assets/{esptool-operations-3OtqiSvP.js → esptool-operations-CXqSawtf.js} +2 -2
  18. package/dist/ui/assets/{fs-sLaOZiPe.js → fs-C3bDUkXJ.js} +2 -2
  19. package/dist/ui/assets/{fs-D9uHDiI8.js → fs-Dg90t6PY.js} +1 -1
  20. package/dist/ui/assets/{github-um5_lXvs.js → github-CPCc-EUr.js} +1 -1
  21. package/dist/ui/assets/{github-iKf-uv0l.js → github-DxSzH6PI.js} +2 -2
  22. package/dist/ui/assets/{github-copilot-Bn6df3EN.js → github-copilot-BSdH-X0I.js} +1 -1
  23. package/dist/ui/assets/{github-copilot-BWwpRuxR.js → github-copilot-C0PA1-T1.js} +2 -2
  24. package/dist/ui/assets/{google-BFjmrVhw.js → google-Cp_gRCg5.js} +1 -1
  25. package/dist/ui/assets/{google-shared-DA7BsMNj.js → google-shared-BoLRjUxb.js} +1 -1
  26. package/dist/ui/assets/{google-vertex-fXPbdwC1.js → google-vertex-IdSaJxmx.js} +1 -1
  27. package/dist/ui/assets/{hosted-config-apply-CTLeJas_.js → hosted-config-apply-CizDb9Vw.js} +1 -1
  28. package/dist/ui/assets/{kernel-worker-OJsR9uqi.js → kernel-worker-DpRMAeb1.js} +673 -673
  29. package/dist/ui/assets/{legacy-styles-CJFCJMPl.js → legacy-styles-Bt2Mk3g2.js} +1 -1
  30. package/dist/ui/assets/{lick-ws-bridge-BvcLlt-k.js → lick-ws-bridge-CIdCZl2q.js} +1 -1
  31. package/dist/ui/assets/{local-llm-4QlmT-tX.js → local-llm-DgWHei2e.js} +1 -1
  32. package/dist/ui/assets/{magick-wasm-CzacIjJk.js → magick-wasm-BCSDiya9.js} +1 -1
  33. package/dist/ui/assets/{main-CAjMV3Ro.js → main-D7K1MTaQ.js} +4 -4
  34. package/dist/ui/assets/{main-cherry-Cs47oYGZ.js → main-cherry-CXrrVAC-.js} +1 -1
  35. package/dist/ui/assets/{mistral-2x1R-8qy.js → mistral-C8Uiexjg.js} +1 -1
  36. package/dist/ui/assets/mount-BYWcec4u.js +2 -0
  37. package/dist/ui/assets/mount-CYuBE82h.js +1 -0
  38. package/dist/ui/assets/{mount-id-BuG8r64x.js → mount-id-Cy4nG68v.js} +1 -1
  39. package/dist/ui/assets/{mount-picker-popup-DuIeknAs.js → mount-picker-popup-B4U0fkZK.js} +1 -1
  40. package/dist/ui/assets/{new-session-FKHfcyjF.js → new-session-C8X_CG95.js} +1 -1
  41. package/dist/ui/assets/{oauth-bootstrap-GcJnv7ZS.js → oauth-bootstrap-DIqfOl-7.js} +2 -2
  42. package/dist/ui/assets/{oauth-service-C4iJUflq.js → oauth-service-CmHwn7zK.js} +1 -1
  43. package/dist/ui/assets/{onboarding-orchestrator-CMwxiNyG.js → onboarding-orchestrator-DSR8Msku.js} +1 -1
  44. package/dist/ui/assets/{openai-codex-Cd_FQwBX.js → openai-codex-Bnd4L2L7.js} +1 -1
  45. package/dist/ui/assets/{openai-codex-stad_9EL.js → openai-codex-DkqkFtKq.js} +1 -1
  46. package/dist/ui/assets/{openai-codex-responses-D6G4oCNQ.js → openai-codex-responses-iASEGX_4.js} +1 -1
  47. package/dist/ui/assets/{openai-completions-B-04OvVB.js → openai-completions-CnLJNyQk.js} +1 -1
  48. package/dist/ui/assets/{openai-responses-7lIT3cT2.js → openai-responses-TN943MT8.js} +1 -1
  49. package/dist/ui/assets/{openai-responses-shared-CWQY06he.js → openai-responses-shared-B1lth5mr.js} +1 -1
  50. package/dist/ui/assets/{panel-rpc-handlers-Cv_5zztD.js → panel-rpc-handlers-BgzkmaOE.js} +2 -2
  51. package/dist/ui/assets/{picker-approval-DeEn9TVD.js → picker-approval-EweLNWgE.js} +1 -1
  52. package/dist/ui/assets/{provider-98CPXvln.js → provider-DQ7BvBZw.js} +2 -2
  53. package/dist/ui/assets/{provider-settings-BHTU6Oq1.js → provider-settings-VV6aNiP5.js} +2 -2
  54. package/dist/ui/assets/provider-store-access-BGKXkdbd.js +1 -0
  55. package/dist/ui/assets/provider-store-access-Vtg1yxDc.js +1 -0
  56. package/dist/ui/assets/{provider-uxfYSUeg.js → provider-tWBv0sFX.js} +1 -1
  57. package/dist/ui/assets/{providers-ClvthlnA.js → providers-BmSZZhhm.js} +1 -1
  58. package/dist/ui/assets/{quick-llm-Dt3qzpkf.js → quick-llm-DdZDN1QH.js} +1 -1
  59. package/dist/ui/assets/{remote-cdp-transport-DGfqLmXT.js → remote-cdp-transport-B3-CFmk-.js} +1 -1
  60. package/dist/ui/assets/{remote-terminal-view-D1kkPl1J.js → remote-terminal-view-Hlq3HwiU.js} +1 -1
  61. package/dist/ui/assets/{secret-env-CmNKUmzu.js → secret-env-CkbRu-AG.js} +1 -1
  62. package/dist/ui/assets/session-freezer-JMR8P1Lt.js +1 -0
  63. package/dist/ui/assets/{setup-sprinkle-exec-CKhXbNXd.js → setup-sprinkle-exec-ByJwHfyz.js} +1 -1
  64. package/dist/ui/assets/setup-sudo-DPXnK0Zw.js +1 -0
  65. package/dist/ui/assets/{slicc-editor-BmqZL3Y5.js → slicc-editor-BxRqmU98.js} +1 -1
  66. package/dist/ui/assets/{sprinkle-manager-d2jZNgyG.js → sprinkle-manager-CqLTFoc9.js} +1 -1
  67. package/dist/ui/assets/{sprinkle-renderer-CYvBEU3p.js → sprinkle-renderer-5HX0pMZZ.js} +3 -3
  68. package/dist/ui/assets/{store-BzwlOEnO.js → store-CQo5JYZe.js} +1 -1
  69. package/dist/ui/assets/{sudo-bOqvYoca.js → sudo-fe6QprlZ.js} +1 -1
  70. package/dist/ui/assets/{sync-dialog-DcLi4B3X.js → sync-dialog-C1-e9vyv.js} +1 -1
  71. package/dist/ui/assets/{tray-leave-runtime-CNDoDnAL.js → tray-leave-runtime--Ue08Cke.js} +1 -1
  72. package/dist/ui/assets/{upgrade-detection-C6lp-50u.js → upgrade-detection-CHRBJqBB.js} +1 -1
  73. package/dist/ui/assets/{wc-attach-BGY9fjZ2.js → wc-attach-xs9Fh-R8.js} +3 -3
  74. package/dist/ui/assets/{wc-detached-BRgr8s0-.js → wc-detached-ux_E6SNJ.js} +1 -1
  75. package/dist/ui/assets/{wc-extension-aIAysc0n.js → wc-extension-BLxY1h5k.js} +2 -2
  76. package/dist/ui/assets/{wc-live-C6fyMRSK.js → wc-live-DHS3FYU1.js} +6 -6
  77. package/dist/ui/assets/{wc-nav-BXic2-dY.js → wc-nav-BZZe3rw8.js} +2 -2
  78. package/dist/ui/assets/{wc-onboarding-3iBOy9Nz.js → wc-onboarding-Cz9h4OE8.js} +2 -2
  79. package/dist/ui/assets/{wc-placeholder-B8YCKa-r.js → wc-placeholder-CO111fjo.js} +3 -3
  80. package/dist/ui/assets/{wc-settings-NLWwHmCR.js → wc-settings-DiYFz75I.js} +3 -3
  81. package/dist/ui/assets/{wc-shell-BlYl5z4M.js → wc-shell-9F74yNEh.js} +3 -3
  82. package/dist/ui/assets/{wc-sprinkles-B9Uz_XZG.js → wc-sprinkles-CUllz5Rn.js} +2 -2
  83. package/dist/ui/assets/{wc-tray-ChJE1e4m.js → wc-tray-DnIxlO0o.js} +3 -3
  84. package/dist/ui/assets/{wc-voice-BBKCesX0.js → wc-voice-DyAmRENA.js} +1 -1
  85. package/dist/ui/assets/{welcome-detection-CMcvBaT6.js → welcome-detection-D-eB9s6-.js} +1 -1
  86. package/dist/ui/assets/{xai-grok-BJlD5UbE.js → xai-grok-BNfjuAeJ.js} +1 -1
  87. package/dist/ui/assets/{xai-grok-CflYL-Ds.js → xai-grok-D8Dda6Qy.js} +1 -1
  88. package/dist/ui/index.html +1 -1
  89. package/dist/ui/packages/webapp/index.html +1 -1
  90. package/package.json +1 -1
  91. package/dist/ui/assets/dip-BjtVzOV1.js +0 -1
  92. package/dist/ui/assets/esp8266-k79PMUzO.js +0 -1
  93. package/dist/ui/assets/mount-CCWGGelc.js +0 -2
  94. package/dist/ui/assets/mount-ihMevaxm.js +0 -1
  95. package/dist/ui/assets/provider-store-access-DQA9SE91.js +0 -1
  96. package/dist/ui/assets/provider-store-access-DRY_bX7j.js +0 -1
  97. package/dist/ui/assets/session-freezer-tB8QnZcp.js +0 -1
  98. package/dist/ui/assets/setup-sudo-Bbfk21e1.js +0 -1
@@ -1 +1 @@
1
- import{Ct as e,L as t,St as n,bt as r}from"./main-CAjMV3Ro.js";import{t as i}from"./sanitize-unicode-DmIE6hZJ.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-DA7BsMNj.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,t,i)=>{let a=new r;return(async()=>{let r={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(i),c=o?x(e,o,i?.headers):b(e,D(i),O(i),i?.headers),l=k(e,t,i),f=await i?.onPayload?.(l,e);f!==void 0&&(l=f);let p=await c.models.generateContentStream(l);a.push({type:`start`,partial:r});let m=null,h=r.content,g=()=>h.length-1;for await(let t of p){r.responseId||=t.responseId;let i=t.candidates?.[0];if(i?.content?.parts)for(let e of i.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:r}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:r})),t?(m={type:`thinking`,thinking:``,thinkingSignature:void 0},r.content.push(m),a.push({type:`thinking_start`,contentIndex:g(),partial:r})):(m={type:`text`,text:``},r.content.push(m),a.push({type:`text_start`,contentIndex:g(),partial:r}))),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:r})):(m.text+=e.text,m.textSignature=u(m.textSignature,e.thoughtSignature),a.push({type:`text_delta`,contentIndex:g(),delta:e.text,partial:r}))}if(e.functionCall){m&&=(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:r}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:r}),null);let t=e.functionCall.id,n={type:`toolCall`,id:!t||r.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}};r.content.push(n),a.push({type:`toolcall_start`,contentIndex:g(),partial:r}),a.push({type:`toolcall_delta`,contentIndex:g(),delta:JSON.stringify(n.arguments),partial:r}),a.push({type:`toolcall_end`,contentIndex:g(),toolCall:n,partial:r})}}i?.finishReason&&(r.stopReason=s(i.finishReason),r.content.some(e=>e.type===`toolCall`)&&(r.stopReason=`toolUse`)),t.usageMetadata&&(r.usage={input:(t.usageMetadata.promptTokenCount||0)-(t.usageMetadata.cachedContentTokenCount||0),output:(t.usageMetadata.candidatesTokenCount||0)+(t.usageMetadata.thoughtsTokenCount||0),cacheRead:t.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,totalTokens:t.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},n(e,r.usage))}if(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:r}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:r})),i?.signal?.aborted)throw Error(`Request was aborted`);if(r.stopReason===`aborted`||r.stopReason===`error`)throw Error(`An unknown error occurred`);a.push({type:`done`,reason:r.stopReason,message:r}),a.end()}catch(e){for(let e of r.content)`index`in e&&delete e.index;r.stopReason=i?.signal?.aborted?`aborted`:`error`,r.errorMessage=e instanceof Error?e.message:JSON.stringify(e),a.push({type:`error`,reason:r.stopReason,error:r}),a.end()}})(),a},y=(n,r,i)=>{let a=t(n,i,void 0);if(!i?.reasoning)return v(n,r,{...a,thinking:{enabled:!1}});let o=e(n,i.reasoning),s=o===`off`?`high`:o,c=n;return A(c)||j(c)?v(n,r,{...a,thinking:{enabled:!0,level:N(s,c)}}):v(n,r,{...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();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=p(e,t),o={};n.temperature!==void 0&&(o.temperature=n.temperature),n.maxTokens!==void 0&&(o.maxOutputTokens=n.maxTokens);let s={...Object.keys(o).length>0&&o,...t.systemPrompt&&{systemInstruction:i(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:l(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?s.toolConfig={functionCallingConfig:{mode:a(n.toolChoice)}}:s.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],s.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(s.thinkingConfig=M(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);s.abortSignal=n.signal}return{model:e.id,contents:r,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};
1
+ import{Ct as e,L as t,St as n,bt as r}from"./main-D7K1MTaQ.js";import{t as i}from"./sanitize-unicode-DmIE6hZJ.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-BoLRjUxb.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,t,i)=>{let a=new r;return(async()=>{let r={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(i),c=o?x(e,o,i?.headers):b(e,D(i),O(i),i?.headers),l=k(e,t,i),f=await i?.onPayload?.(l,e);f!==void 0&&(l=f);let p=await c.models.generateContentStream(l);a.push({type:`start`,partial:r});let m=null,h=r.content,g=()=>h.length-1;for await(let t of p){r.responseId||=t.responseId;let i=t.candidates?.[0];if(i?.content?.parts)for(let e of i.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:r}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:r})),t?(m={type:`thinking`,thinking:``,thinkingSignature:void 0},r.content.push(m),a.push({type:`thinking_start`,contentIndex:g(),partial:r})):(m={type:`text`,text:``},r.content.push(m),a.push({type:`text_start`,contentIndex:g(),partial:r}))),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:r})):(m.text+=e.text,m.textSignature=u(m.textSignature,e.thoughtSignature),a.push({type:`text_delta`,contentIndex:g(),delta:e.text,partial:r}))}if(e.functionCall){m&&=(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:r}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:r}),null);let t=e.functionCall.id,n={type:`toolCall`,id:!t||r.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}};r.content.push(n),a.push({type:`toolcall_start`,contentIndex:g(),partial:r}),a.push({type:`toolcall_delta`,contentIndex:g(),delta:JSON.stringify(n.arguments),partial:r}),a.push({type:`toolcall_end`,contentIndex:g(),toolCall:n,partial:r})}}i?.finishReason&&(r.stopReason=s(i.finishReason),r.content.some(e=>e.type===`toolCall`)&&(r.stopReason=`toolUse`)),t.usageMetadata&&(r.usage={input:(t.usageMetadata.promptTokenCount||0)-(t.usageMetadata.cachedContentTokenCount||0),output:(t.usageMetadata.candidatesTokenCount||0)+(t.usageMetadata.thoughtsTokenCount||0),cacheRead:t.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,totalTokens:t.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},n(e,r.usage))}if(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:r}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:r})),i?.signal?.aborted)throw Error(`Request was aborted`);if(r.stopReason===`aborted`||r.stopReason===`error`)throw Error(`An unknown error occurred`);a.push({type:`done`,reason:r.stopReason,message:r}),a.end()}catch(e){for(let e of r.content)`index`in e&&delete e.index;r.stopReason=i?.signal?.aborted?`aborted`:`error`,r.errorMessage=e instanceof Error?e.message:JSON.stringify(e),a.push({type:`error`,reason:r.stopReason,error:r}),a.end()}})(),a},y=(n,r,i)=>{let a=t(n,i,void 0);if(!i?.reasoning)return v(n,r,{...a,thinking:{enabled:!1}});let o=e(n,i.reasoning),s=o===`off`?`high`:o,c=n;return A(c)||j(c)?v(n,r,{...a,thinking:{enabled:!0,level:N(s,c)}}):v(n,r,{...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();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=p(e,t),o={};n.temperature!==void 0&&(o.temperature=n.temperature),n.maxTokens!==void 0&&(o.maxOutputTokens=n.maxTokens);let s={...Object.keys(o).length>0&&o,...t.systemPrompt&&{systemInstruction:i(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:l(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?s.toolConfig={functionCallingConfig:{mode:a(n.toolChoice)}}:s.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],s.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(s.thinkingConfig=M(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);s.abortSignal=n.signal}return{model:e.id,contents:r,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};
@@ -1 +1 @@
1
- import{nt as e}from"./main-CAjMV3Ro.js";var t=e(`hosted-config`);async function n(e,t){let n=new Set(e.map(e=>e.providerId));for(let n of e)n.kind===`oauth`?await t.saveOAuthAccount({providerId:n.providerId,accessToken:n.accessToken,refreshToken:n.refreshToken,tokenExpiresAt:n.tokenExpiresAt,userName:n.userName,baseUrl:n.baseUrl}):t.addAccount(n.providerId,n.apiKey,n.baseUrl,n.deployment,n.apiVersion);let r=new Set(t.previouslyManaged());for(let e of t.currentProviderIds())r.has(e)&&!n.has(e)&&await t.removeAccount(e)}async function r(e,n,r=5e3){await Promise.all(e.map(async e=>{if(e.kind!==`oauth`||!e.accessToken)return;let i=n.getRefreshModels(e.providerId);if(i)try{await Promise.race([i(e.accessToken),new Promise(e=>setTimeout(e,r))])}catch(n){t.warn(`prewarm: refreshModels failed; cone boots with cold model metadata`,{providerId:e.providerId,error:n instanceof Error?n.message:String(n)})}}))}export{n as applyHostedAccounts,r as prewarmHostedModels};
1
+ import{nt as e}from"./main-D7K1MTaQ.js";var t=e(`hosted-config`);async function n(e,t){let n=new Set(e.map(e=>e.providerId));for(let n of e)n.kind===`oauth`?await t.saveOAuthAccount({providerId:n.providerId,accessToken:n.accessToken,refreshToken:n.refreshToken,tokenExpiresAt:n.tokenExpiresAt,userName:n.userName,baseUrl:n.baseUrl}):t.addAccount(n.providerId,n.apiKey,n.baseUrl,n.deployment,n.apiVersion);let r=new Set(t.previouslyManaged());for(let e of t.currentProviderIds())r.has(e)&&!n.has(e)&&await t.removeAccount(e)}async function r(e,n,r=5e3){await Promise.all(e.map(async e=>{if(e.kind!==`oauth`||!e.accessToken)return;let i=n.getRefreshModels(e.providerId);if(i)try{await Promise.race([i(e.accessToken),new Promise(e=>setTimeout(e,r))])}catch(n){t.warn(`prewarm: refreshModels failed; cone boots with cold model metadata`,{providerId:e.providerId,error:n instanceof Error?n.message:String(n)})}}))}export{n as applyHostedAccounts,r as prewarmHostedModels};