sliccy 5.22.1 → 5.24.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.
Files changed (273) hide show
  1. package/dist/ui/assets/__vite-browser-external-B0uIxSgw.js +1 -0
  2. package/dist/ui/assets/__vite-browser-external-SwrSgYTf.js +1 -0
  3. package/dist/ui/assets/account-store-BZcvDLBt.js +38 -0
  4. package/dist/ui/assets/{account-store-B5AAJzBt.js → account-store-hAVOTXd4.js} +3 -3
  5. package/dist/ui/assets/addon-fit-Crogpbda.js +13 -0
  6. package/dist/ui/assets/addon-fit-DIOBYJe3.js +1 -0
  7. package/dist/ui/assets/{adobe-Y2joCBjz.js → adobe-CJkvUFhK.js} +1 -1
  8. package/dist/ui/assets/{adobe-DBwkbkPG.js → adobe-Ctkj-KqI.js} +2 -2
  9. package/dist/ui/assets/{adobe-oauth-state-JZ01HRhm.js → adobe-oauth-state-CKdBg77_.js} +1 -1
  10. package/dist/ui/assets/{agent-message-to-chat-B7DxkLtx.js → agent-message-to-chat-DbXGywHd.js} +1 -1
  11. package/dist/ui/assets/{anthropic-DwYAPtk5.js → anthropic-BOEkIcb-.js} +1 -1
  12. package/dist/ui/assets/{anthropic-UMaEJx-B.js → anthropic-LjoeX6v-.js} +1 -1
  13. package/dist/ui/assets/{apps-NPLXYm7k.js → apps-hxlQlxC-.js} +1 -1
  14. package/dist/ui/assets/{azure-openai-DQD0h1cf.js → azure-openai-3sBh6o8X.js} +1 -1
  15. package/dist/ui/assets/{azure-openai-zQvRqW3S.js → azure-openai-BHI6d7HX.js} +1 -1
  16. package/dist/ui/assets/{azure-openai-responses-Bnxym5u-.js → azure-openai-responses-CbJrQGi8.js} +1 -1
  17. package/dist/ui/assets/{azure-openai-responses-Ds4b3a5B.js → azure-openai-responses-DPSrcT4o.js} +1 -1
  18. package/dist/ui/assets/{backend-local-D7FqJaoi.js → backend-local-BgTSBOxM.js} +1 -1
  19. package/dist/ui/assets/bedrock-camp-DjKgax8m.js +1 -0
  20. package/dist/ui/assets/{bedrock-camp-C1lmRgcD.js → bedrock-camp-DlP7CPgV.js} +2 -2
  21. package/dist/ui/assets/{browser-D0vICVpZ.js → browser-2wdq8OwU.js} +5 -5
  22. package/dist/ui/assets/{cdp-5C0rLyuM.js → cdp-D7cRI5-J.js} +1 -1
  23. package/dist/ui/assets/clipboard-DuHpK59o.js +1 -0
  24. package/dist/ui/assets/{composer-speech-DXkl5-5T.js → composer-speech-CzcwBzGA.js} +1 -1
  25. package/dist/ui/assets/{connect-surface-DPgfQrfS.js → connect-surface-DaOq3m05.js} +1 -1
  26. package/dist/ui/assets/{context-compaction-CFWyOzX1.js → context-compaction-DvlXtgVG.js} +1 -1
  27. package/dist/ui/assets/dip-DHz6xEbn.js +1 -0
  28. package/dist/ui/assets/{dist-jdlcYxrm.js → dist-0c-Ms6jt.js} +1 -1
  29. package/dist/ui/assets/{dist-k2Xmqc09.js → dist-BHXb30bf.js} +2 -2
  30. package/dist/ui/assets/{dist-BBhtjNOt.js → dist-Bw2SRiP7.js} +1 -1
  31. package/dist/ui/assets/dist-C30gQBcj2.js +12 -0
  32. package/dist/ui/assets/{dist-Dnh15m1q.js → dist-CC_gNVTb.js} +1 -1
  33. package/dist/ui/assets/{dist-DQRYKv91.js → dist-D1pcMg_U.js} +1 -1
  34. package/dist/ui/assets/{dist-CrC-F8vu.js → dist-D58cmC11.js} +1 -1
  35. package/dist/ui/assets/{dist-BmWy99kl.js → dist-D69OmKNn.js} +3 -3
  36. package/dist/ui/assets/{dist-AEf8Bitj2.js → dist-DD6YY4Ks2.js} +1 -1
  37. package/dist/ui/assets/dist-DhgaKNsl.js +18 -0
  38. package/dist/ui/assets/{dist-cWUxvK-0.js → dist-nFa9uGer.js} +1 -1
  39. package/dist/ui/assets/{ensure-speech-assets-PqnGhxvS.js → ensure-speech-assets-CKDbiyeP.js} +1 -1
  40. package/dist/ui/assets/{es-C8ey2woP.js → es-kEo2Tmh4.js} +4 -4
  41. package/dist/ui/assets/esp32-D9ZurRwV.js +1 -0
  42. package/dist/ui/assets/{esp32c2-CpROmlB0.js → esp32c2-F0yCL7ES.js} +1 -1
  43. package/dist/ui/assets/esp32c3-wVAODszM.js +1 -0
  44. package/dist/ui/assets/{esp32c5-KJSqwo2Q.js → esp32c5-ChTI-uFN.js} +1 -1
  45. package/dist/ui/assets/{esp32c6-BMEnOhZ6.js → esp32c6-IwoGEmKl.js} +1 -1
  46. package/dist/ui/assets/{esp32c61-sRp43nbI.js → esp32c61-BJScMw70.js} +1 -1
  47. package/dist/ui/assets/{esp32h2-BKv-WORi.js → esp32h2-YosZEx9u.js} +1 -1
  48. package/dist/ui/assets/{esp32p4-g1tFG0sh.js → esp32p4-BSe822vW.js} +1 -1
  49. package/dist/ui/assets/{esp32s2-BE2gO68i.js → esp32s2-Dhlhu16A.js} +1 -1
  50. package/dist/ui/assets/{esp32s3-CjMu3q4c.js → esp32s3-PqxbnxPZ.js} +1 -1
  51. package/dist/ui/assets/esp8266-CWIseU-d.js +1 -0
  52. package/dist/ui/assets/esp8266-CuMaVNVI.js +1 -0
  53. package/dist/ui/assets/esptool-operations-KWVZgO7d.js +12 -0
  54. package/dist/ui/assets/{esptool-operations-CtOW5Bvs.js → esptool-operations-lgaQVKUA.js} +2 -2
  55. package/dist/ui/assets/{follower-navigate-watcher-CnHWEu_l.js → follower-navigate-watcher-quUh7-CS.js} +1 -1
  56. package/dist/ui/assets/fs-CgONsFAk.js +1 -0
  57. package/dist/ui/assets/{fs-DsYwmfat.js → fs-DIp951a_.js} +2 -2
  58. package/dist/ui/assets/{github-DC_I-4id.js → github-3qGo5ka9.js} +1 -1
  59. package/dist/ui/assets/{github-Cvm06fID.js → github-DFC3qI27.js} +2 -2
  60. package/dist/ui/assets/{github-copilot-D1jvjcWk.js → github-copilot-DArsLzGn.js} +1 -1
  61. package/dist/ui/assets/{github-copilot-CaycmR7s.js → github-copilot-DRHrAd-c.js} +2 -2
  62. package/dist/ui/assets/{google-CEOynCO5.js → google-C3U0TK_l.js} +1 -1
  63. package/dist/ui/assets/{google-CSaY-DQE.js → google-DPvIPcfE.js} +1 -1
  64. package/dist/ui/assets/google-shared-CFmFmYdk.js +11 -0
  65. package/dist/ui/assets/{google-shared-RiqqHuiz.js → google-shared-CwjAeP6N.js} +1 -1
  66. package/dist/ui/assets/{google-vertex-CBHKHWKe.js → google-vertex-BbeV3aSP.js} +1 -1
  67. package/dist/ui/assets/{google-vertex-C7BX8ATF.js → google-vertex-CEGsokz8.js} +1 -1
  68. package/dist/ui/assets/{handoff-link-ywwq4k0t.js → handoff-link-w8LYa3Ua.js} +1 -1
  69. package/dist/ui/assets/{hear-DH3US_c_.js → hear--VyWD7WJ.js} +1 -1
  70. package/dist/ui/assets/{hear-DcdV-O0r.js → hear-BQ1CoIOa.js} +1 -1
  71. package/dist/ui/assets/hid-device-registry-6w-g8ZpF.js +1 -0
  72. package/dist/ui/assets/hid-picker-CE6gGmQt.js +1 -0
  73. package/dist/ui/assets/icons-C5g936Qd.js +1 -0
  74. package/dist/ui/assets/{index-BeMnZBAU.js → index-AMF5XZgS.js} +72 -71
  75. package/dist/ui/assets/intercepted-oauth-CaCw-rJ5.js +1 -0
  76. package/dist/ui/assets/js-realm-worker-BYZQ59hJ.js +49 -0
  77. package/dist/ui/assets/json-parse-B51EftGA.js +3 -0
  78. package/dist/ui/assets/json-parse-C7d6hyOc.js +3 -0
  79. package/dist/ui/assets/{kernel-worker-BPzoZWCC.js → kernel-worker-DJQc1E5Q.js} +1236 -834
  80. package/dist/ui/assets/kokoro-BFFlHn4y.js +4 -0
  81. package/dist/ui/assets/kokoro-C-DxSDte.js +4 -0
  82. package/dist/ui/assets/{kokoro-engine-C_U1dfXB.js → kokoro-engine-DkGXbpn5.js} +2 -2
  83. package/dist/ui/assets/{legacy-styles-4PP74ISo.js → legacy-styles-CF6h7ytf.js} +1 -1
  84. package/dist/ui/assets/{lick-ws-bridge-B5dwesqM.js → lick-ws-bridge-BKbzg20A.js} +1 -1
  85. package/dist/ui/assets/{lick-ws-bridge-BEQEICiF.js → lick-ws-bridge-BnE4iJla.js} +1 -1
  86. package/dist/ui/assets/llm-session-id-bZQs6gBN.js +1 -0
  87. package/dist/ui/assets/{local-llm-BdRRF3n_.js → local-llm-DWjZmRbR.js} +1 -1
  88. package/dist/ui/assets/{main-ikPJox6X.js → main-CVbQ_qox.js} +4 -4
  89. package/dist/ui/assets/main-cherry-BHfyV0Bx.js +1 -0
  90. package/dist/ui/assets/mistral-CLF3Mo4W.js +46 -0
  91. package/dist/ui/assets/mistral-DkJAVbOW.js +46 -0
  92. package/dist/ui/assets/{mount-BzqSY0Ds.js → mount-BK8Cnz3E.js} +2 -2
  93. package/dist/ui/assets/mount-BnAiyW7e.js +1 -0
  94. package/dist/ui/assets/mount-bridge-client-DnDk55XZ.js +2 -0
  95. package/dist/ui/assets/mount-picker-popup-Cw_D7c_n.js +1 -0
  96. package/dist/ui/assets/mount-table-store-CfQUN_2R.js +1 -0
  97. package/dist/ui/assets/mount-table-store-s20mtVA3.js +1 -0
  98. package/dist/ui/assets/{navigation-watcher-BxAAD5To.js → navigation-watcher-C2s0i0h4.js} +1 -1
  99. package/dist/ui/assets/{new-session-BuL7Wbcu.js → new-session-D3QOHJpV.js} +2 -2
  100. package/dist/ui/assets/{oauth-bootstrap-CZmzBdaJ.js → oauth-bootstrap-DqTx1Kvk.js} +2 -2
  101. package/dist/ui/assets/{oauth-service-D-lmxdpH.js → oauth-service-R7EZswi4.js} +1 -1
  102. package/dist/ui/assets/{oauth-service-ahaKd8Mt.js → oauth-service-ySAsf2gs.js} +1 -1
  103. package/dist/ui/assets/{onboarding-orchestrator-CADSztcp.js → onboarding-orchestrator-cZ36aqC6.js} +1 -1
  104. package/dist/ui/assets/{openai-Cn5LRPCm.js → openai-BeH6aC_-.js} +1 -1
  105. package/dist/ui/assets/{openai-i4HWKCeW.js → openai-BvKpRLAG.js} +1 -1
  106. package/dist/ui/assets/{openai-codex-D0rJf0rr.js → openai-codex-CoMdC2SF.js} +1 -1
  107. package/dist/ui/assets/{openai-codex-hB78BX6P.js → openai-codex-L-s8izOl.js} +1 -1
  108. package/dist/ui/assets/{openai-codex-responses-Cq5XDqVc.js → openai-codex-responses-B2oZ1hgB.js} +1 -1
  109. package/dist/ui/assets/{openai-codex-responses-7JN1dUxK.js → openai-codex-responses-Dumyd9t2.js} +1 -1
  110. package/dist/ui/assets/{openai-completions-DLI0t_lj.js → openai-completions-B2n4Op2S.js} +1 -1
  111. package/dist/ui/assets/openai-completions-aHU8w14d.js +5 -0
  112. package/dist/ui/assets/{openai-responses-ANbRIlpa.js → openai-responses-4ryIAXQS.js} +1 -1
  113. package/dist/ui/assets/{openai-responses-nczmKECx.js → openai-responses-BurVahs3.js} +1 -1
  114. package/dist/ui/assets/{openai-responses-shared-CM2vkuNI.js → openai-responses-shared-BebU8o_f.js} +1 -1
  115. package/dist/ui/assets/{openai-responses-shared-9YVaeX5D.js → openai-responses-shared-D9O9OCYB.js} +1 -1
  116. package/dist/ui/assets/{openrouter-Cy2dLX1Z.js → openrouter-B1ruTb6k.js} +1 -1
  117. package/dist/ui/assets/{openrouter-QETwrep8.js → openrouter-XmffhsNH.js} +1 -1
  118. package/dist/ui/assets/page-follower-tray-B1BZ4-ZV.js +5 -0
  119. package/dist/ui/assets/panel-rpc-CjFVE0nK.js +1 -0
  120. package/dist/ui/assets/panel-rpc-DmJSNs0I.js +1 -0
  121. package/dist/ui/assets/panel-rpc-handlers-CQuNFcE9.js +2 -0
  122. package/dist/ui/assets/{pdfjs-C3ks1z_T.js → pdfjs-BdCnB7P8.js} +7 -7
  123. package/dist/ui/assets/preload-helper-CZgWQFsJ.js +1 -0
  124. package/dist/ui/assets/{provider-ByZ5S_p0.js → provider-DBnymHp6.js} +1 -1
  125. package/dist/ui/assets/{provider-Dv05sEX_.js → provider-oQxvvdwQ.js} +2 -2
  126. package/dist/ui/assets/provider-store-access-DPUCkQPc.js +1 -0
  127. package/dist/ui/assets/provider-store-access-WiHq-pYa.js +1 -0
  128. package/dist/ui/assets/providers-Bruy7_4j.js +1 -0
  129. package/dist/ui/assets/providers-D-hEMSBi.js +2 -0
  130. package/dist/ui/assets/proxied-fetch-DzLglfG5.js +2 -0
  131. package/dist/ui/assets/proxied-fetch-R_Zw2ZFI.js +1 -0
  132. package/dist/ui/assets/py-realm-worker-Cr26Gsx8.js +244 -0
  133. package/dist/ui/assets/{pyodide-CPgzyJWn.js → pyodide-CHuPF4e3.js} +2 -2
  134. package/dist/ui/assets/{pyodide-BFyW4kyI.js → pyodide-Dp0v7U2K.js} +2 -2
  135. package/dist/ui/assets/quick-llm-lSVC04LX.js +1 -0
  136. package/dist/ui/assets/remote-cache-D59F5FOx.js +1 -0
  137. package/dist/ui/assets/remote-cdp-transport-DTCu2BgA.js +1 -0
  138. package/dist/ui/assets/{remote-terminal-view-DIEOCe9M.js → remote-terminal-view-B_2LHY8s.js} +1 -1
  139. package/dist/ui/assets/{secret-env-Bs2du0RF.js → secret-env-guT2rdYI.js} +1 -1
  140. package/dist/ui/assets/{secret-topology-Bp0wH2ni.js → secret-topology-CC_yKaqL.js} +1 -1
  141. package/dist/ui/assets/secrets-bridge-client-C3K9ItX4.js +2 -0
  142. package/dist/ui/assets/serial-picker-1VVNQI8D.js +1 -0
  143. package/dist/ui/assets/serial-port-registry-DsPZvGpT.js +1 -0
  144. package/dist/ui/assets/session-freezer-B0-m5Vyt.js +1 -0
  145. package/dist/ui/assets/session-store-DAM8GRJ0.js +1 -0
  146. package/dist/ui/assets/{setup-sprinkle-exec-C7SBZY7y.js → setup-sprinkle-exec-P2hO-taT.js} +1 -1
  147. package/dist/ui/assets/shared-CrHp2zdc.js +1 -0
  148. package/dist/ui/assets/{slicc-editor-BdfBeQCF.js → slicc-editor-DKckizoI.js} +2 -2
  149. package/dist/ui/assets/{speak-7UzWyUVB.js → speak-BwWMiCus.js} +3 -3
  150. package/dist/ui/assets/{speak-MyRHeKEI.js → speak-JDb3L5Bn.js} +1 -1
  151. package/dist/ui/assets/speech-assets-bridge-CFYafE89.js +1 -0
  152. package/dist/ui/assets/{sprinkle-bridge-CwelAMwV.js → sprinkle-bridge-DL0PzEfD.js} +1 -1
  153. package/dist/ui/assets/{sprinkle-manager-BO97yMYB.js → sprinkle-manager-DCCdGEsV.js} +1 -1
  154. package/dist/ui/assets/{sprinkle-renderer-GiRRbdBx.js → sprinkle-renderer-CsUow5K7.js} +3 -3
  155. package/dist/ui/assets/{sql-wasm-BWbkWL23.js → sql-wasm-JpZkOS2Q.js} +1 -1
  156. package/dist/ui/assets/store-VJ80lsV2.js +1 -0
  157. package/dist/ui/assets/{sudo-B3pJPQs-.js → sudo-CE_RKJi-.js} +3 -3
  158. package/dist/ui/assets/{sync-dialog-BFKWO6DT.js → sync-dialog-Ie_5SqoO.js} +1 -1
  159. package/dist/ui/assets/theme-Ca4mHxHv.js +1 -0
  160. package/dist/ui/assets/theme-engine-LmGLoWYX.js +3 -0
  161. package/dist/ui/assets/theme-presets-xiOb9AFN.js +1 -0
  162. package/dist/ui/assets/transform-messages-DiIjWKhh.js +1 -0
  163. package/dist/ui/assets/{transformers-env-ChIHsg1x.js → transformers-env-Blt6HC_1.js} +1 -1
  164. package/dist/ui/assets/{transformers-env-aCI8ZBPo.js → transformers-env-_UKAjlNN.js} +1 -1
  165. package/dist/ui/assets/{transformers.web-BxHOGVSB.js → transformers.web-C6PlPLR-.js} +1 -1
  166. package/dist/ui/assets/{transformers.web-CuUo4MLm.js → transformers.web-DkJGoARp.js} +1 -1
  167. package/dist/ui/assets/tray-leader-UUNhWQLa.js +1 -0
  168. package/dist/ui/assets/{tray-leave-runtime-Cp7gif8T.js → tray-leave-runtime-B79fUqlB.js} +1 -1
  169. package/dist/ui/assets/{upgrade-detection-wH_AibnK.js → upgrade-detection-DxWZJm31.js} +1 -1
  170. package/dist/ui/assets/usb-device-registry-k6vTKonT.js +1 -0
  171. package/dist/ui/assets/{usb-operations-CkcrNzZw.js → usb-operations-D-YdmmuG.js} +1 -1
  172. package/dist/ui/assets/usb-picker-SsbXAvwt.js +1 -0
  173. package/dist/ui/assets/{voice-reply-BDk5Fpiq.js → voice-reply-DNinfooM.js} +1 -1
  174. package/dist/ui/assets/{wc-attach-DGZYM1OK.js → wc-attach-D9setfuM.js} +3 -3
  175. package/dist/ui/assets/wc-extension-oEMM0T6Y.js +2 -0
  176. package/dist/ui/assets/{wc-float-label-h04JFcqz.js → wc-float-label-COQsLLC2.js} +1 -1
  177. package/dist/ui/assets/wc-follower-vvcDv3nb.js +4 -0
  178. package/dist/ui/assets/{wc-live-DuR78HgI.js → wc-live-DAGaRCda.js} +16 -16
  179. package/dist/ui/assets/wc-nav-jA7AILGw.js +2 -0
  180. package/dist/ui/assets/{wc-onboarding-C0d6FLJ4.js → wc-onboarding-BKgZMRf_.js} +2 -2
  181. package/dist/ui/assets/{wc-permissions-DmHMvdiC.js → wc-permissions-CBFvg_0i.js} +3 -3
  182. package/dist/ui/assets/{wc-permissions-providers-BufEXbhX.js → wc-permissions-providers-Cdznv6xX.js} +2 -2
  183. package/dist/ui/assets/wc-permissions-registry-Blyunq37.js +1 -0
  184. package/dist/ui/assets/wc-permissions-registry-C7PhTX3c.js +1 -0
  185. package/dist/ui/assets/{wc-placeholder-kmCcazRQ.js → wc-placeholder-goZQ3lkX.js} +3 -3
  186. package/dist/ui/assets/wc-settings-DkGyOR-Z.js +48 -0
  187. package/dist/ui/assets/{wc-shell-K09L81_T.js → wc-shell-B_R02u2w.js} +4 -4
  188. package/dist/ui/assets/wc-sprinkles-_4eSebmC.js +2 -0
  189. package/dist/ui/assets/wc-tray-BhseZ-L2.js +2 -0
  190. package/dist/ui/assets/welcome-detection-CQY88hjL.js +1 -0
  191. package/dist/ui/assets/{whisper-engine-BQDoahWw.js → whisper-engine-S0qAToSq.js} +1 -1
  192. package/dist/ui/assets/{whisper-session-bkHemaIa.js → whisper-session-tJ8m9ShN.js} +2 -2
  193. package/dist/ui/assets/{xai-grok-DoeknEbg.js → xai-grok-Bkh8-5ap.js} +1 -1
  194. package/dist/ui/assets/{xai-grok-Cor2f5tX.js → xai-grok-CyKrwuk9.js} +1 -1
  195. package/dist/ui/assets/{xterm-DooSxjI5.js → xterm-DMlKjmUi.js} +2 -2
  196. package/dist/ui/assets/{xterm-B5O_KJMf.js → xterm-Dwh1I9AE.js} +2 -2
  197. package/dist/ui/index.html +16 -16
  198. package/dist/ui/packages/webapp/index.html +16 -16
  199. package/package.json +4 -4
  200. package/dist/ui/assets/__vite-browser-external-BdY91arR.js +0 -1
  201. package/dist/ui/assets/__vite-browser-external-C7iut881.js +0 -1
  202. package/dist/ui/assets/account-store-CWhir8ug.js +0 -38
  203. package/dist/ui/assets/addon-fit-CuuUKmBe.js +0 -13
  204. package/dist/ui/assets/addon-fit-DthTIhi3.js +0 -1
  205. package/dist/ui/assets/bedrock-camp-9-QEmC9Z.js +0 -1
  206. package/dist/ui/assets/clipboard-DgFtRQbq.js +0 -1
  207. package/dist/ui/assets/dip-DJpITso2.js +0 -1
  208. package/dist/ui/assets/dist-C9EI5Muo.js +0 -18
  209. package/dist/ui/assets/dist-eRjRxbMY2.js +0 -12
  210. package/dist/ui/assets/esp32-CatgC_Vd.js +0 -1
  211. package/dist/ui/assets/esp32c3-heViyR1Q.js +0 -1
  212. package/dist/ui/assets/esp8266-B85qh4x8.js +0 -1
  213. package/dist/ui/assets/esp8266-BPLrOmN4.js +0 -1
  214. package/dist/ui/assets/esptool-operations-CiX8mbpu.js +0 -12
  215. package/dist/ui/assets/fs-CmruV6CG.js +0 -1
  216. package/dist/ui/assets/google-shared-CVRDRmWo.js +0 -11
  217. package/dist/ui/assets/hid-device-registry-D2LsJCRr.js +0 -1
  218. package/dist/ui/assets/hid-picker-DUJBI46p.js +0 -1
  219. package/dist/ui/assets/icons-BU6llBsN.js +0 -1
  220. package/dist/ui/assets/intercepted-oauth-E9BfBX02.js +0 -1
  221. package/dist/ui/assets/js-realm-worker-CPYpgfMX.js +0 -49
  222. package/dist/ui/assets/json-parse-BUunmmNl.js +0 -3
  223. package/dist/ui/assets/json-parse-CWht3lea.js +0 -3
  224. package/dist/ui/assets/kokoro-B5jJ2WUJ.js +0 -4
  225. package/dist/ui/assets/kokoro-BdpwC7DT.js +0 -4
  226. package/dist/ui/assets/llm-session-id-DVmZ9C2t.js +0 -1
  227. package/dist/ui/assets/main-cherry-NiJ4PeFm.js +0 -1
  228. package/dist/ui/assets/mistral-BTNTllXI.js +0 -46
  229. package/dist/ui/assets/mistral-BzfpfZhh.js +0 -46
  230. package/dist/ui/assets/mount-BuISK4CQ.js +0 -1
  231. package/dist/ui/assets/mount-bridge-client-tEnjiHyh.js +0 -2
  232. package/dist/ui/assets/mount-picker-popup-Hrvzr69c.js +0 -1
  233. package/dist/ui/assets/mount-table-store-DAENz45Q.js +0 -1
  234. package/dist/ui/assets/mount-table-store-ggb440m4.js +0 -1
  235. package/dist/ui/assets/openai-completions-YNL_qr9N.js +0 -5
  236. package/dist/ui/assets/page-follower-tray-B9zUJ1fF.js +0 -4
  237. package/dist/ui/assets/panel-rpc-D0J5pskz.js +0 -1
  238. package/dist/ui/assets/panel-rpc-DqT2FG7c.js +0 -1
  239. package/dist/ui/assets/panel-rpc-handlers-BeKhgKcK.js +0 -2
  240. package/dist/ui/assets/preload-helper-zJ_50EbN.js +0 -1
  241. package/dist/ui/assets/provider-store-access-C2Qckshj.js +0 -1
  242. package/dist/ui/assets/provider-store-access-DXcnGsNd.js +0 -1
  243. package/dist/ui/assets/providers-D0vM4fsT.js +0 -2
  244. package/dist/ui/assets/providers-D9vYR704.js +0 -1
  245. package/dist/ui/assets/proxied-fetch-B5vr_AP8.js +0 -2
  246. package/dist/ui/assets/proxied-fetch-I4cndszg.js +0 -1
  247. package/dist/ui/assets/py-realm-worker-LVNFvu8J.js +0 -244
  248. package/dist/ui/assets/quick-llm-ZN9ts94Z.js +0 -1
  249. package/dist/ui/assets/remote-cache-BL6NRenp.js +0 -1
  250. package/dist/ui/assets/remote-cdp-transport-BrkfZae9.js +0 -1
  251. package/dist/ui/assets/secrets-bridge-client-DXw32cXb.js +0 -2
  252. package/dist/ui/assets/serial-picker-B6s4NeaB.js +0 -1
  253. package/dist/ui/assets/serial-port-registry-Bc4wlwED.js +0 -1
  254. package/dist/ui/assets/session-freezer-CQVd5phs.js +0 -1
  255. package/dist/ui/assets/session-store-CCH7W8KY.js +0 -1
  256. package/dist/ui/assets/shared-DAA_6m5R.js +0 -1
  257. package/dist/ui/assets/speech-assets-bridge-B8NqCAE8.js +0 -1
  258. package/dist/ui/assets/store-DexWd9-T.js +0 -1
  259. package/dist/ui/assets/theme-BBwuyzvz.js +0 -1
  260. package/dist/ui/assets/transform-messages-DzB_lMo-.js +0 -1
  261. package/dist/ui/assets/tray-leader-CwSJfo44.js +0 -1
  262. package/dist/ui/assets/usb-device-registry-BP58Vi0S.js +0 -1
  263. package/dist/ui/assets/usb-picker-D_K0weAY.js +0 -1
  264. package/dist/ui/assets/wc-extension-DHGJo5yR.js +0 -2
  265. package/dist/ui/assets/wc-follower-Dgol0MDj.js +0 -2
  266. package/dist/ui/assets/wc-nav-DTWpeCdl.js +0 -2
  267. package/dist/ui/assets/wc-permissions-registry-CR1rTd2H.js +0 -1
  268. package/dist/ui/assets/wc-permissions-registry-Dx-BRiKK.js +0 -1
  269. package/dist/ui/assets/wc-settings-BJ4KJnGi.js +0 -24
  270. package/dist/ui/assets/wc-sprinkles-DQDee7_G.js +0 -2
  271. package/dist/ui/assets/wc-tray-Dk_byhlx.js +0 -2
  272. package/dist/ui/assets/welcome-detection-Cr8mNEkt.js +0 -1
  273. /package/dist/ui/assets/{chunk-aKtaBQYM.js → rolldown-runtime-aKtaBQYM.js} +0 -0
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/clipboard-DgFtRQbq.js","assets/chunk-aKtaBQYM.js"])))=>i.map(i=>d[i]);
2
- import{a as e,c as t,i as n,l as r,n as i,o as a,u as o}from"./dist-BmWy99kl.js";import{t as s}from"./preload-helper-zJ_50EbN.js";import{a as c,n as l,o as u}from"./event-stream-BJI_nGaK.js";import{R as d,d as f}from"./account-store-CWhir8ug.js";import"./main-ikPJox6X.js";var p=`github-copilot`,m=atob(`SXYxLmI1MDdhMDhjODdlY2ZlOTg=`),h=`https://github.com/login/device/code`,g=`https://github.com/login/oauth/access_token`,_=`https://api.github.com/copilot_internal/v2/token`,v={Accept:`application/json`,"Editor-Version":`vscode/1.107.0`,"Editor-Plugin-Version":`copilot-chat/0.35.0`,"Copilot-Integration-Id":`vscode-chat`},y={Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded`},b=`https://github.com/login/device/success*`;function x(){return f().find(e=>e.providerId===p)}async function S(){let e=await fetch(h,{method:`POST`,headers:y,body:new URLSearchParams({client_id:m,scope:`read:user`})});if(!e.ok)throw Error(`GitHub device-code request failed: ${e.status} ${e.statusText} — ${await e.text().catch(()=>``)}`);let t=await e.json();if(typeof t.device_code!=`string`||typeof t.user_code!=`string`||typeof t.verification_uri!=`string`||typeof t.expires_in!=`number`||typeof t.interval!=`number`)throw Error(`GitHub device-code response had an unexpected shape`);return t}async function C(e,t){let n=Date.now()+e.expires_in*1e3,r=Math.max(1e3,Math.floor(e.interval*1e3)),i=1.2;for(;Date.now()<n;){if(t.aborted)throw Error(`Copilot login cancelled`);await w(Math.ceil(r*i),t);let n=await fetch(g,{method:`POST`,headers:y,body:new URLSearchParams({client_id:m,device_code:e.device_code,grant_type:`urn:ietf:params:oauth:grant-type:device_code`})});if(!n.ok)throw Error(`GitHub token poll failed: ${n.status} ${n.statusText} — ${await n.text().catch(()=>``)}`);let a=await n.json();if(typeof a.access_token==`string`&&a.access_token.length>0)return a.access_token;if(a.error!==`authorization_pending`){if(a.error===`slow_down`){r=typeof a.interval==`number`?a.interval*1e3:r+5e3,i=1.4;continue}if(a.error){let e=a.error_description?`: ${a.error_description}`:``;throw Error(`Device flow failed (${a.error})${e}`)}}}throw Error(`Copilot device flow timed out (device code expired)`)}function w(e,t){return new Promise((n,r)=>{if(t.aborted){r(Error(`Copilot login cancelled`));return}let i=setTimeout(n,e);t.addEventListener(`abort`,()=>{clearTimeout(i),r(Error(`Copilot login cancelled`))},{once:!0})})}function T(e){let t=e.match(/proxy-ep=([^;]+)/);return t?`https://${t[1].replace(/^proxy\./,`api.`)}`:null}async function E(e){let t=await fetch(_,{headers:{...v,Authorization:`Bearer ${e}`}});if(!t.ok){let e=await t.text().catch(()=>``);throw Error(`Copilot token exchange failed: ${t.status} ${t.statusText} — ${e.slice(0,300)}`)}let n=await t.json();if(typeof n.token!=`string`||typeof n.expires_at!=`number`)throw Error(`Copilot token exchange returned an unexpected payload`);if(n.chat_enabled===!1)throw Error(`GitHub Copilot Chat is disabled for this account (no chat features granted)`);return{copilotToken:n.token,expiresAtMs:n.expires_at*1e3-300*1e3,apiBaseUrl:T(n.token)??`https://api.individual.githubcopilot.com`,githubAccessToken:e}}var D=`github-copilot.models.v1`;function O(e){let t=e.supported_endpoints??[],n=(e.vendor??``).toLowerCase(),r=e.id;return n===`anthropic`&&t.includes(`/v1/messages`)?`anthropic-messages`:n===`openai`&&(/^gpt-5/i.test(r)||/codex/i.test(r)||/^o\d/i.test(r))?`openai-responses`:`openai-completions`}function k(e){if(!e||typeof e!=`object`)return[];let t=e.data;if(!Array.isArray(t))return[];let n=[];for(let e of t)e.capabilities?.type&&e.capabilities.type!==`chat`||e.model_picker_enabled!==!1&&e.id&&n.push({id:e.id,name:e.name??e.id,vendor:e.vendor??``,api:O(e),contextWindow:e.capabilities?.limits?.max_context_window_tokens??e.capabilities?.limits?.max_prompt_tokens??128e3,maxTokens:e.capabilities?.limits?.max_output_tokens??8192,supportsTools:e.capabilities?.supports?.tool_calls===!0,supportsStreaming:e.capabilities?.supports?.streaming!==!1,supportsVision:e.capabilities?.supports?.vision===!0,supportsReasoning:e.capabilities?.supports?.adaptive_thinking===!0||Array.isArray(e.capabilities?.supports?.reasoning_effort),policyState:e.policy?.state??`enabled`});return n}async function A(e){let t=await fetch(`${e.apiBaseUrl}/models`,{headers:{...v,Authorization:`Bearer ${e.copilotToken}`,Accept:`application/json`}});if(!t.ok)throw Error(`Copilot /models returned ${t.status} ${t.statusText}`);return k(await t.json())}function j(){if(typeof localStorage>`u`)return[];try{let e=localStorage.getItem(D);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function M(e){if(!(typeof localStorage>`u`))try{localStorage.setItem(D,JSON.stringify(e))}catch{}}function N(e){return j().find(t=>t.id===e)??null}async function P(e){let t;try{t=await A(e)}catch(e){console.warn(`[github-copilot] Catalog refresh failed; keeping previous cache.`,e instanceof Error?e.message:String(e));return}M(t),await Promise.all(t.filter(e=>e.policyState===`disabled`).map(async t=>{let n=`${e.apiBaseUrl}/models/${encodeURIComponent(t.id)}/policy`;try{let r=await fetch(n,{method:`POST`,headers:{...v,"Content-Type":`application/json`,Authorization:`Bearer ${e.copilotToken}`,"openai-intent":`chat-policy`,"x-interaction-type":`chat-policy`},body:JSON.stringify({state:`enabled`})});r.ok?t.policyState=`enabled`:r.status!==404&&r.status!==400&&console.warn(`[github-copilot] enable policy for ${t.id} returned ${r.status} ${r.statusText}`)}catch(e){console.warn(`[github-copilot] enable policy for ${t.id} failed:`,e instanceof Error?e.message:String(e))}})),M(t)}async function F(e,t){await d({providerId:p,accessToken:e.copilotToken,refreshToken:e.githubAccessToken,tokenExpiresAt:e.expiresAtMs,baseUrl:e.apiBaseUrl,userName:t})}async function I(){let e=x();if(!e?.accessToken||!e.refreshToken)throw Error(`Not logged in to GitHub Copilot — click "Login" in the provider settings`);let t=e.tokenExpiresAt??0;if(Date.now()<t-6e4)return e.accessToken;let n=await E(e.refreshToken);return await F(n,e.userName),n.copilotToken}var L=[`mini`,`nano`,`flash`,`haiku`,`lite`,`embedding`];function R(e){let t=[e.id,e.name??``].flatMap(e=>{let t=e.toLowerCase();return[t,t.replace(/[\s_.:]+/g,`-`)]});return!L.some(e=>t.some(t=>t.includes(e)))}function z(){if(!x()?.accessToken)return[];let e=j();if(e.length>0)return e.filter(e=>!e.policyState.startsWith(`unavailable:`)).filter(e=>R(e)).map(e=>({id:e.id,name:e.name,api:e.api===`anthropic-messages`?`anthropic`:`openai`,context_window:e.contextWindow,max_tokens:e.maxTokens,reasoning:e.supportsReasoning,input:e.supportsVision?[`text`,`image`]:[`text`]}));let t;try{t=u(`github-copilot`)}catch{return[]}return t.filter(e=>R({id:e.id,name:e.name})).map(e=>({id:e.id,name:e.name??e.id,api:e.api===`anthropic-messages`?`anthropic`:`openai`,context_window:e.contextWindow,max_tokens:e.maxTokens,reasoning:e.reasoning,input:e.input}))}function B(e,t){return{type:`error`,reason:`error`,error:{role:`assistant`,content:[],api:e.api,provider:p,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:`error`,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}}var V={"User-Agent":`GitHubCopilotChat/0.35.0`,"Editor-Version":`vscode/1.107.0`,"Editor-Plugin-Version":`copilot-chat/0.35.0`,"Copilot-Integration-Id":`vscode-chat`};function H(e){let t=x(),n=t?.baseUrl??`https://api.individual.githubcopilot.com`,r=N(e);if(r)return{api:r.api,baseUrl:n,headers:{...V}};try{let n=c(`github-copilot`,e);return{api:n.api,baseUrl:t?.baseUrl??n.baseUrl,headers:{...n.headers??{},...V}}}catch{return null}}function U(e,t){let n=j(),r=n.findIndex(t=>t.id===e);r<0||(n[r]={...n[r],policyState:`unavailable:${t}`},M(n))}function W(e,t){return`GitHub Copilot rejected "${e}" with model_not_supported. This usually means the model isn't included in your Copilot plan (Opus and other premium models require Copilot Pro / Pro+ / Business / Enterprise). Try Claude Sonnet 4.6 or another model that appears in the picker after a fresh login. Original error: ${t}`}function G(e){if(!e||typeof e!=`object`)return null;let t=e;if(t.type!==`error`)return null;if(t.error&&typeof t.error==`object`){let e=t.error.errorMessage;if(typeof e==`string`)return e}return typeof t.errorMessage==`string`?t.errorMessage:null}function K(o){return(s,c,u={})=>{let d=l();return(async()=>{try{let l=await I(),f=H(s.id);if(!f)throw Error(`GitHub Copilot does not recognize "${s.id}" — open the picker (the model list refreshes on login) and pick a current model.`);let p={...s,api:f.api,baseUrl:f.baseUrl,headers:f.headers,provider:`github-copilot`},m={...u,apiKey:l},h;h=f.api===`anthropic-messages`?(o?a:i)(p,c,m):f.api===`openai-responses`?(o?r:e)(p,c,m):(o?t:n)(p,c,m);for await(let e of h){let t=G(e);if(t&&/model_not_supported/i.test(t)){U(s.id,`model_not_supported`);let e=W(s.id,t);console.error(`[github-copilot] Plan-gated model rejection:`,e),d.push(B(s,Error(e))),d.end();return}d.push(e)}d.end()}catch(e){let t=e instanceof Error?e.message:String(e),n=e;/model_not_supported/i.test(t)&&(U(s.id,`model_not_supported`),n=Error(W(s.id,t))),console.error(`[github-copilot] Stream error:`,n instanceof Error?n.message:String(n)),d.push(B(s,n)),d.end()}})(),d}}var q=K(!1),J=K(!0),Y=({userCode:e,verificationUrl:t})=>typeof document>`u`?(console.info(`[github-copilot] Device verification code: ${e} — open ${t} in a browser to authorize.`),Promise.resolve(`continue`)):new Promise(t=>{let n=document.createElement(`div`);n.setAttribute(`data-slicc-overlay`,`github-copilot-device`),n.style.cssText=[`position:fixed`,`top:24px`,`right:24px`,`z-index:2147483647`,`background:#0d1117`,`color:#e6edf3`,`border:1px solid #30363d`,`border-radius:10px`,`padding:16px 18px`,`box-shadow:0 8px 32px rgba(0,0,0,0.45)`,`font:13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,`min-width:260px`,`max-width:340px`].join(`;`);let r=document.createElement(`div`);r.textContent=`GitHub Copilot — verification code`,r.style.cssText=`font-weight:600;margin-bottom:8px;color:#7ee787`;let i=document.createElement(`div`);i.textContent=e,i.style.cssText=[`font:600 22px ui-monospace, SFMono-Regular, Menlo, monospace`,`letter-spacing:2px`,`background:#161b22`,`border:1px solid #30363d`,`border-radius:6px`,`padding:10px 12px`,`text-align:center`,`margin-bottom:10px`,`user-select:all`,`cursor:text`].join(`;`);let a=document.createElement(`div`);a.style.cssText=`color:#8b949e;font-size:12px;line-height:1.5`,a.textContent=`Copy the code, then click Continue to open the GitHub authorization page in a new tab.`;let o=document.createElement(`div`);o.style.cssText=`display:flex;gap:8px;margin-top:12px;justify-content:flex-end`;let c=document.createElement(`button`);c.type=`button`,c.textContent=`Cancel`,c.style.cssText=[`background:transparent`,`color:#e6edf3`,`border:1px solid #30363d`,`border-radius:6px`,`padding:6px 12px`,`font:600 12px inherit`,`cursor:pointer`].join(`;`);let l=document.createElement(`button`);l.type=`button`,l.textContent=`Copy & Continue`,l.style.cssText=[`background:#238636`,`color:#fff`,`border:0`,`border-radius:6px`,`padding:6px 12px`,`font:600 12px inherit`,`cursor:pointer`].join(`;`);let u=()=>{try{n.remove()}catch{}};c.addEventListener(`click`,()=>{u(),t(`cancel`)}),l.addEventListener(`click`,()=>{(async()=>{try{let{copyTextToClipboard:t}=await s(async()=>{let{copyTextToClipboard:e}=await import(`./clipboard-DgFtRQbq.js`).then(e=>e.t);return{copyTextToClipboard:e}},__vite__mapDeps([0,1]));await t(e)}catch{}u(),t(`continue`)})()}),o.appendChild(c),o.appendChild(l),n.appendChild(r),n.appendChild(i),n.appendChild(a),n.appendChild(o),document.body.appendChild(n)}),X={id:p,name:`GitHub Copilot`,description:`Use your GitHub Copilot subscription to access Claude, GPT-5, Codex, Gemini, and Grok models. Sign in with the GitHub device-code flow.`,requiresApiKey:!1,requiresBaseUrl:!1,isOAuth:!0,defaultModelId:`claude-sonnet-4.6`,oauthTokenDomains:[`*.githubcopilot.com`,`api.individual.githubcopilot.com`,`api.business.githubcopilot.com`,`api.enterprise.githubcopilot.com`],getModelIds:z,onOAuthLoginIntercepted:async(e,t,n)=>{let r=await S(),i=new URL(r.verification_uri);if(i.searchParams.set(`user_code`,r.user_code),await(n?.presentDeviceCode??Y)({userCode:r.user_code,verificationUrl:i.toString(),expiresInSeconds:r.expires_in})===`cancel`)throw Error(`GitHub Copilot login cancelled`);let a=new AbortController,o=e({authorizeUrl:i.toString(),redirectUriPattern:b,onCapture:`close`,timeoutMs:r.expires_in*1e3}).catch(e=>(console.warn(`[github-copilot] Launcher failed:`,e instanceof Error?e.message:String(e)),null)),s;try{s=await C(r,a.signal)}catch(e){throw a.abort(),await o,e}await o;let c=await E(s),l;try{let e=await fetch(`https://api.github.com/user`,{headers:{Authorization:`Bearer ${s}`,Accept:`application/json`}});if(e.ok){let t=await e.json();l=t.name||t.login}}catch{}await F(c,l),await P(c),t()},onOAuthLogout:async()=>{await d({providerId:p,accessToken:``})},onSilentRenew:async()=>{let e=x();if(!e?.refreshToken)return null;try{let t=await E(e.refreshToken);return await F(t,e.userName),await P(t),t.copilotToken}catch(e){return console.warn(`[github-copilot] Silent renew failed:`,e instanceof Error?e.message:String(e)),null}}};function Z(){o({api:`github-copilot-anthropic`,stream:q,streamSimple:J}),o({api:`github-copilot-openai`,stream:q,streamSimple:J})}export{X as config,R as isCopilotConeCompatible,Z as register};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/clipboard-DuHpK59o.js","assets/rolldown-runtime-aKtaBQYM.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,c as t,i as n,l as r,n as i,o as a,u as o}from"./dist-D69OmKNn.js";import{t as s}from"./preload-helper-CZgWQFsJ.js";import{a as c,n as l,o as u}from"./event-stream-BJI_nGaK.js";import{R as d,d as f}from"./account-store-BZcvDLBt.js";import"./main-CVbQ_qox.js";var p=`github-copilot`,m=atob(`SXYxLmI1MDdhMDhjODdlY2ZlOTg=`),h=`https://github.com/login/device/code`,g=`https://github.com/login/oauth/access_token`,_=`https://api.github.com/copilot_internal/v2/token`,v={Accept:`application/json`,"Editor-Version":`vscode/1.107.0`,"Editor-Plugin-Version":`copilot-chat/0.35.0`,"Copilot-Integration-Id":`vscode-chat`},y={Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded`},b=`https://github.com/login/device/success*`;function x(){return f().find(e=>e.providerId===p)}async function S(){let e=await fetch(h,{method:`POST`,headers:y,body:new URLSearchParams({client_id:m,scope:`read:user`})});if(!e.ok)throw Error(`GitHub device-code request failed: ${e.status} ${e.statusText} — ${await e.text().catch(()=>``)}`);let t=await e.json();if(typeof t.device_code!=`string`||typeof t.user_code!=`string`||typeof t.verification_uri!=`string`||typeof t.expires_in!=`number`||typeof t.interval!=`number`)throw Error(`GitHub device-code response had an unexpected shape`);return t}async function C(e,t){let n=Date.now()+e.expires_in*1e3,r=Math.max(1e3,Math.floor(e.interval*1e3)),i=1.2;for(;Date.now()<n;){if(t.aborted)throw Error(`Copilot login cancelled`);await w(Math.ceil(r*i),t);let n=await fetch(g,{method:`POST`,headers:y,body:new URLSearchParams({client_id:m,device_code:e.device_code,grant_type:`urn:ietf:params:oauth:grant-type:device_code`})});if(!n.ok)throw Error(`GitHub token poll failed: ${n.status} ${n.statusText} — ${await n.text().catch(()=>``)}`);let a=await n.json();if(typeof a.access_token==`string`&&a.access_token.length>0)return a.access_token;if(a.error!==`authorization_pending`){if(a.error===`slow_down`){r=typeof a.interval==`number`?a.interval*1e3:r+5e3,i=1.4;continue}if(a.error){let e=a.error_description?`: ${a.error_description}`:``;throw Error(`Device flow failed (${a.error})${e}`)}}}throw Error(`Copilot device flow timed out (device code expired)`)}function w(e,t){return new Promise((n,r)=>{if(t.aborted){r(Error(`Copilot login cancelled`));return}let i=setTimeout(n,e);t.addEventListener(`abort`,()=>{clearTimeout(i),r(Error(`Copilot login cancelled`))},{once:!0})})}function T(e){let t=e.match(/proxy-ep=([^;]+)/);return t?`https://${t[1].replace(/^proxy\./,`api.`)}`:null}async function E(e){let t=await fetch(_,{headers:{...v,Authorization:`Bearer ${e}`}});if(!t.ok){let e=await t.text().catch(()=>``);throw Error(`Copilot token exchange failed: ${t.status} ${t.statusText} — ${e.slice(0,300)}`)}let n=await t.json();if(typeof n.token!=`string`||typeof n.expires_at!=`number`)throw Error(`Copilot token exchange returned an unexpected payload`);if(n.chat_enabled===!1)throw Error(`GitHub Copilot Chat is disabled for this account (no chat features granted)`);return{copilotToken:n.token,expiresAtMs:n.expires_at*1e3-300*1e3,apiBaseUrl:T(n.token)??`https://api.individual.githubcopilot.com`,githubAccessToken:e}}var D=`github-copilot.models.v1`;function O(e){let t=e.supported_endpoints??[],n=(e.vendor??``).toLowerCase(),r=e.id;return n===`anthropic`&&t.includes(`/v1/messages`)?`anthropic-messages`:n===`openai`&&(/^gpt-5/i.test(r)||/codex/i.test(r)||/^o\d/i.test(r))?`openai-responses`:`openai-completions`}function k(e){if(!e||typeof e!=`object`)return[];let t=e.data;if(!Array.isArray(t))return[];let n=[];for(let e of t)e.capabilities?.type&&e.capabilities.type!==`chat`||e.model_picker_enabled!==!1&&e.id&&n.push({id:e.id,name:e.name??e.id,vendor:e.vendor??``,api:O(e),contextWindow:e.capabilities?.limits?.max_context_window_tokens??e.capabilities?.limits?.max_prompt_tokens??128e3,maxTokens:e.capabilities?.limits?.max_output_tokens??8192,supportsTools:e.capabilities?.supports?.tool_calls===!0,supportsStreaming:e.capabilities?.supports?.streaming!==!1,supportsVision:e.capabilities?.supports?.vision===!0,supportsReasoning:e.capabilities?.supports?.adaptive_thinking===!0||Array.isArray(e.capabilities?.supports?.reasoning_effort),policyState:e.policy?.state??`enabled`});return n}async function A(e){let t=await fetch(`${e.apiBaseUrl}/models`,{headers:{...v,Authorization:`Bearer ${e.copilotToken}`,Accept:`application/json`}});if(!t.ok)throw Error(`Copilot /models returned ${t.status} ${t.statusText}`);return k(await t.json())}function j(){if(typeof localStorage>`u`)return[];try{let e=localStorage.getItem(D);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function M(e){if(!(typeof localStorage>`u`))try{localStorage.setItem(D,JSON.stringify(e))}catch{}}function N(e){return j().find(t=>t.id===e)??null}async function P(e){let t;try{t=await A(e)}catch(e){console.warn(`[github-copilot] Catalog refresh failed; keeping previous cache.`,e instanceof Error?e.message:String(e));return}M(t),await Promise.all(t.filter(e=>e.policyState===`disabled`).map(async t=>{let n=`${e.apiBaseUrl}/models/${encodeURIComponent(t.id)}/policy`;try{let r=await fetch(n,{method:`POST`,headers:{...v,"Content-Type":`application/json`,Authorization:`Bearer ${e.copilotToken}`,"openai-intent":`chat-policy`,"x-interaction-type":`chat-policy`},body:JSON.stringify({state:`enabled`})});r.ok?t.policyState=`enabled`:r.status!==404&&r.status!==400&&console.warn(`[github-copilot] enable policy for ${t.id} returned ${r.status} ${r.statusText}`)}catch(e){console.warn(`[github-copilot] enable policy for ${t.id} failed:`,e instanceof Error?e.message:String(e))}})),M(t)}async function F(e,t){await d({providerId:p,accessToken:e.copilotToken,refreshToken:e.githubAccessToken,tokenExpiresAt:e.expiresAtMs,baseUrl:e.apiBaseUrl,userName:t})}async function I(){let e=x();if(!e?.accessToken||!e.refreshToken)throw Error(`Not logged in to GitHub Copilot — click "Login" in the provider settings`);let t=e.tokenExpiresAt??0;if(Date.now()<t-6e4)return e.accessToken;let n=await E(e.refreshToken);return await F(n,e.userName),n.copilotToken}var L=[`mini`,`nano`,`flash`,`haiku`,`lite`,`embedding`];function R(e){let t=[e.id,e.name??``].flatMap(e=>{let t=e.toLowerCase();return[t,t.replace(/[\s_.:]+/g,`-`)]});return!L.some(e=>t.some(t=>t.includes(e)))}function z(){if(!x()?.accessToken)return[];let e=j();if(e.length>0)return e.filter(e=>!e.policyState.startsWith(`unavailable:`)).filter(e=>R(e)).map(e=>({id:e.id,name:e.name,api:e.api===`anthropic-messages`?`anthropic`:`openai`,context_window:e.contextWindow,max_tokens:e.maxTokens,reasoning:e.supportsReasoning,input:e.supportsVision?[`text`,`image`]:[`text`]}));let t;try{t=u(`github-copilot`)}catch{return[]}return t.filter(e=>R({id:e.id,name:e.name})).map(e=>({id:e.id,name:e.name??e.id,api:e.api===`anthropic-messages`?`anthropic`:`openai`,context_window:e.contextWindow,max_tokens:e.maxTokens,reasoning:e.reasoning,input:e.input}))}function B(e,t){return{type:`error`,reason:`error`,error:{role:`assistant`,content:[],api:e.api,provider:p,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:`error`,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}}var V={"User-Agent":`GitHubCopilotChat/0.35.0`,"Editor-Version":`vscode/1.107.0`,"Editor-Plugin-Version":`copilot-chat/0.35.0`,"Copilot-Integration-Id":`vscode-chat`};function H(e){let t=x(),n=t?.baseUrl??`https://api.individual.githubcopilot.com`,r=N(e);if(r)return{api:r.api,baseUrl:n,headers:{...V}};try{let n=c(`github-copilot`,e);return{api:n.api,baseUrl:t?.baseUrl??n.baseUrl,headers:{...n.headers??{},...V}}}catch{return null}}function U(e,t){let n=j(),r=n.findIndex(t=>t.id===e);r<0||(n[r]={...n[r],policyState:`unavailable:${t}`},M(n))}function W(e,t){return`GitHub Copilot rejected "${e}" with model_not_supported. This usually means the model isn't included in your Copilot plan (Opus and other premium models require Copilot Pro / Pro+ / Business / Enterprise). Try Claude Sonnet 4.6 or another model that appears in the picker after a fresh login. Original error: ${t}`}function G(e){if(!e||typeof e!=`object`)return null;let t=e;if(t.type!==`error`)return null;if(t.error&&typeof t.error==`object`){let e=t.error.errorMessage;if(typeof e==`string`)return e}return typeof t.errorMessage==`string`?t.errorMessage:null}function K(o){return(s,c,u={})=>{let d=l();return(async()=>{try{let l=await I(),f=H(s.id);if(!f)throw Error(`GitHub Copilot does not recognize "${s.id}" — open the picker (the model list refreshes on login) and pick a current model.`);let p={...s,api:f.api,baseUrl:f.baseUrl,headers:f.headers,provider:`github-copilot`},m={...u,apiKey:l},h;h=f.api===`anthropic-messages`?(o?a:i)(p,c,m):f.api===`openai-responses`?(o?r:e)(p,c,m):(o?t:n)(p,c,m);for await(let e of h){let t=G(e);if(t&&/model_not_supported/i.test(t)){U(s.id,`model_not_supported`);let e=W(s.id,t);console.error(`[github-copilot] Plan-gated model rejection:`,e),d.push(B(s,Error(e))),d.end();return}d.push(e)}d.end()}catch(e){let t=e instanceof Error?e.message:String(e),n=e;/model_not_supported/i.test(t)&&(U(s.id,`model_not_supported`),n=Error(W(s.id,t))),console.error(`[github-copilot] Stream error:`,n instanceof Error?n.message:String(n)),d.push(B(s,n)),d.end()}})(),d}}var q=K(!1),J=K(!0),Y=({userCode:e,verificationUrl:t})=>typeof document>`u`?(console.info(`[github-copilot] Device verification code: ${e} — open ${t} in a browser to authorize.`),Promise.resolve(`continue`)):new Promise(t=>{let n=document.createElement(`div`);n.setAttribute(`data-slicc-overlay`,`github-copilot-device`),n.style.cssText=[`position:fixed`,`top:24px`,`right:24px`,`z-index:2147483647`,`background:#0d1117`,`color:#e6edf3`,`border:1px solid #30363d`,`border-radius:10px`,`padding:16px 18px`,`box-shadow:0 8px 32px rgba(0,0,0,0.45)`,`font:13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,`min-width:260px`,`max-width:340px`].join(`;`);let r=document.createElement(`div`);r.textContent=`GitHub Copilot — verification code`,r.style.cssText=`font-weight:600;margin-bottom:8px;color:#7ee787`;let i=document.createElement(`div`);i.textContent=e,i.style.cssText=[`font:600 22px ui-monospace, SFMono-Regular, Menlo, monospace`,`letter-spacing:2px`,`background:#161b22`,`border:1px solid #30363d`,`border-radius:6px`,`padding:10px 12px`,`text-align:center`,`margin-bottom:10px`,`user-select:all`,`cursor:text`].join(`;`);let a=document.createElement(`div`);a.style.cssText=`color:#8b949e;font-size:12px;line-height:1.5`,a.textContent=`Copy the code, then click Continue to open the GitHub authorization page in a new tab.`;let o=document.createElement(`div`);o.style.cssText=`display:flex;gap:8px;margin-top:12px;justify-content:flex-end`;let c=document.createElement(`button`);c.type=`button`,c.textContent=`Cancel`,c.style.cssText=[`background:transparent`,`color:#e6edf3`,`border:1px solid #30363d`,`border-radius:6px`,`padding:6px 12px`,`font:600 12px inherit`,`cursor:pointer`].join(`;`);let l=document.createElement(`button`);l.type=`button`,l.textContent=`Copy & Continue`,l.style.cssText=[`background:#238636`,`color:#fff`,`border:0`,`border-radius:6px`,`padding:6px 12px`,`font:600 12px inherit`,`cursor:pointer`].join(`;`);let u=()=>{try{n.remove()}catch{}};c.addEventListener(`click`,()=>{u(),t(`cancel`)}),l.addEventListener(`click`,()=>{(async()=>{try{let{copyTextToClipboard:t}=await s(async()=>{let{copyTextToClipboard:e}=await import(`./clipboard-DuHpK59o.js`).then(e=>e.t);return{copyTextToClipboard:e}},__vite__mapDeps([0,1]));await t(e)}catch{}u(),t(`continue`)})()}),o.appendChild(c),o.appendChild(l),n.appendChild(r),n.appendChild(i),n.appendChild(a),n.appendChild(o),document.body.appendChild(n)}),X={id:p,name:`GitHub Copilot`,description:`Use your GitHub Copilot subscription to access Claude, GPT-5, Codex, Gemini, and Grok models. Sign in with the GitHub device-code flow.`,requiresApiKey:!1,requiresBaseUrl:!1,isOAuth:!0,defaultModelId:`claude-sonnet-4.6`,oauthTokenDomains:[`*.githubcopilot.com`,`api.individual.githubcopilot.com`,`api.business.githubcopilot.com`,`api.enterprise.githubcopilot.com`],getModelIds:z,onOAuthLoginIntercepted:async(e,t,n)=>{let r=await S(),i=new URL(r.verification_uri);if(i.searchParams.set(`user_code`,r.user_code),await(n?.presentDeviceCode??Y)({userCode:r.user_code,verificationUrl:i.toString(),expiresInSeconds:r.expires_in})===`cancel`)throw Error(`GitHub Copilot login cancelled`);let a=new AbortController,o=e({authorizeUrl:i.toString(),redirectUriPattern:b,onCapture:`close`,timeoutMs:r.expires_in*1e3}).catch(e=>(console.warn(`[github-copilot] Launcher failed:`,e instanceof Error?e.message:String(e)),null)),s;try{s=await C(r,a.signal)}catch(e){throw a.abort(),await o,e}await o;let c=await E(s),l;try{let e=await fetch(`https://api.github.com/user`,{headers:{Authorization:`Bearer ${s}`,Accept:`application/json`}});if(e.ok){let t=await e.json();l=t.name||t.login}}catch{}await F(c,l),await P(c),t()},onOAuthLogout:async()=>{await d({providerId:p,accessToken:``})},onSilentRenew:async()=>{let e=x();if(!e?.refreshToken)return null;try{let t=await E(e.refreshToken);return await F(t,e.userName),await P(t),t.copilotToken}catch(e){return console.warn(`[github-copilot] Silent renew failed:`,e instanceof Error?e.message:String(e)),null}}};function Z(){o({api:`github-copilot-anthropic`,stream:q,streamSimple:J}),o({api:`github-copilot-openai`,stream:q,streamSimple:J})}export{X as config,R as isCopilotConeCompatible,Z as register};
@@ -1 +1 @@
1
- import{i as e,r as t,t as n}from"./event-stream-BJI_nGaK.js";import{r}from"./transform-messages-DzB_lMo-.js";import{t as i}from"./sanitize-unicode-DmIE6hZJ.js";import{a,i as o,n as s,o as c,r as l,s as u,t as d}from"./google-shared-CVRDRmWo.js";var f=0,p=(e,r,i)=>{let a=new n;return(async()=>{let n={role:`assistant`,content:[],api:`google-generative-ai`,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 s=i?.apiKey;if(!s)throw Error(`No API key for provider: ${e.provider}`);let u=h(e,s,i?.headers),d=g(e,r,i),p=await i?.onPayload?.(d,e);p!==void 0&&(d=p);let m=await u.models.generateContentStream(d);a.push({type:`start`,partial:n});let _=null,v=n.content,y=()=>v.length-1;for await(let r of m){n.responseId||=r.responseId;let i=r.candidates?.[0];if(i?.content?.parts)for(let e of i.content.parts){if(e.text!==void 0){let t=l(e);(!_||t&&_.type!==`thinking`||!t&&_.type!==`text`)&&(_&&(_.type===`text`?a.push({type:`text_end`,contentIndex:v.length-1,content:_.text,partial:n}):a.push({type:`thinking_end`,contentIndex:y(),content:_.thinking,partial:n})),t?(_={type:`thinking`,thinking:``,thinkingSignature:void 0},n.content.push(_),a.push({type:`thinking_start`,contentIndex:y(),partial:n})):(_={type:`text`,text:``},n.content.push(_),a.push({type:`text_start`,contentIndex:y(),partial:n}))),_.type===`thinking`?(_.thinking+=e.text,_.thinkingSignature=c(_.thinkingSignature,e.thoughtSignature),a.push({type:`thinking_delta`,contentIndex:y(),delta:e.text,partial:n})):(_.text+=e.text,_.textSignature=c(_.textSignature,e.thoughtSignature),a.push({type:`text_delta`,contentIndex:y(),delta:e.text,partial:n}))}if(e.functionCall){_&&=(_.type===`text`?a.push({type:`text_end`,contentIndex:y(),content:_.text,partial:n}):a.push({type:`thinking_end`,contentIndex:y(),content:_.thinking,partial:n}),null);let t=e.functionCall.id,r={type:`toolCall`,id:!t||n.content.some(e=>e.type===`toolCall`&&e.id===t)?`${e.functionCall.name}_${Date.now()}_${++f}`:t,name:e.functionCall.name||``,arguments:e.functionCall.args??{},...e.thoughtSignature&&{thoughtSignature:e.thoughtSignature}};n.content.push(r),a.push({type:`toolcall_start`,contentIndex:y(),partial:n}),a.push({type:`toolcall_delta`,contentIndex:y(),delta:JSON.stringify(r.arguments),partial:n}),a.push({type:`toolcall_end`,contentIndex:y(),toolCall:r,partial:n})}}i?.finishReason&&(n.stopReason=o(i.finishReason),n.content.some(e=>e.type===`toolCall`)&&(n.stopReason=`toolUse`)),r.usageMetadata&&(n.usage={input:(r.usageMetadata.promptTokenCount||0)-(r.usageMetadata.cachedContentTokenCount||0),output:(r.usageMetadata.candidatesTokenCount||0)+(r.usageMetadata.thoughtsTokenCount||0),cacheRead:r.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,totalTokens:r.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},t(e,n.usage))}if(_&&(_.type===`text`?a.push({type:`text_end`,contentIndex:y(),content:_.text,partial:n}):a.push({type:`thinking_end`,contentIndex:y(),content:_.thinking,partial:n})),i?.signal?.aborted)throw Error(`Request was aborted`);if(n.stopReason===`aborted`||n.stopReason===`error`)throw Error(`An unknown error occurred`);a.push({type:`done`,reason:n.stopReason,message:n}),a.end()}catch(e){for(let e of n.content)`index`in e&&delete e.index;n.stopReason=i?.signal?.aborted?`aborted`:`error`,n.errorMessage=e instanceof Error?e.message:JSON.stringify(e),a.push({type:`error`,reason:n.stopReason,error:n}),a.end()}})(),a},m=(t,n,i)=>{let a=i?.apiKey;if(!a)throw Error(`No API key for provider: ${t.provider}`);let o=r(t,i,a);if(!i?.reasoning)return p(t,n,{...o,thinking:{enabled:!1}});let s=e(t,i.reasoning),c=s===`off`?`high`:s,l=t;return v(l)||y(l)||_(l)?p(t,n,{...o,thinking:{enabled:!0,level:x(c,l)}}):p(t,n,{...o,thinking:{enabled:!0,budgetTokens:S(l,c,i.thinkingBudgets)}})};function h(e,t,n){let r={};return e.baseUrl&&(r.baseUrl=e.baseUrl,r.apiVersion=``),(e.headers||n)&&(r.headers={...e.headers,...n}),new u({apiKey:t,httpOptions:Object.keys(r).length>0?r:void 0})}function g(e,t,n={}){let r=d(e,t),o={};n.temperature!==void 0&&(o.temperature=n.temperature),n.maxTokens!==void 0&&(o.maxOutputTokens=n.maxTokens);let c={...Object.keys(o).length>0&&o,...t.systemPrompt&&{systemInstruction:i(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:s(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?c.toolConfig={functionCallingConfig:{mode:a(n.toolChoice)}}:c.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=n.thinking.level,c.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(c.thinkingConfig=b(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);c.abortSignal=n.signal}return{model:e.id,contents:r,config:c}}function _(e){return/gemma-?4/.test(e.id.toLowerCase())}function v(e){return/gemini-3(?:\.\d+)?-pro/.test(e.id.toLowerCase())}function y(e){return/gemini-3(?:\.\d+)?-flash/.test(e.id.toLowerCase())}function b(e){return v(e)?{thinkingLevel:`LOW`}:y(e)||_(e)?{thinkingLevel:`MINIMAL`}:{thinkingBudget:0}}function x(e,t){if(v(t))switch(e){case`minimal`:case`low`:return`LOW`;case`medium`:case`high`:return`HIGH`}if(_(t))switch(e){case`minimal`:case`low`:return`MINIMAL`;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 S(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-lite`)?{minimal:512,low:2048,medium:8192,high:24576}[t]:e.id.includes(`2.5-flash`)?{minimal:128,low:2048,medium:8192,high:24576}[t]:-1:n[t]}export{p as streamGoogle,m as streamSimpleGoogle};
1
+ import{i as e,r as t,t as n}from"./event-stream-BJI_nGaK.js";import{r}from"./transform-messages-DiIjWKhh.js";import{t as i}from"./sanitize-unicode-DmIE6hZJ.js";import{a,i as o,n as s,o as c,r as l,s as u,t as d}from"./google-shared-CFmFmYdk.js";var f=0,p=(e,r,i)=>{let a=new n;return(async()=>{let n={role:`assistant`,content:[],api:`google-generative-ai`,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 s=i?.apiKey;if(!s)throw Error(`No API key for provider: ${e.provider}`);let u=h(e,s,i?.headers),d=g(e,r,i),p=await i?.onPayload?.(d,e);p!==void 0&&(d=p);let m=await u.models.generateContentStream(d);a.push({type:`start`,partial:n});let _=null,v=n.content,y=()=>v.length-1;for await(let r of m){n.responseId||=r.responseId;let i=r.candidates?.[0];if(i?.content?.parts)for(let e of i.content.parts){if(e.text!==void 0){let t=l(e);(!_||t&&_.type!==`thinking`||!t&&_.type!==`text`)&&(_&&(_.type===`text`?a.push({type:`text_end`,contentIndex:v.length-1,content:_.text,partial:n}):a.push({type:`thinking_end`,contentIndex:y(),content:_.thinking,partial:n})),t?(_={type:`thinking`,thinking:``,thinkingSignature:void 0},n.content.push(_),a.push({type:`thinking_start`,contentIndex:y(),partial:n})):(_={type:`text`,text:``},n.content.push(_),a.push({type:`text_start`,contentIndex:y(),partial:n}))),_.type===`thinking`?(_.thinking+=e.text,_.thinkingSignature=c(_.thinkingSignature,e.thoughtSignature),a.push({type:`thinking_delta`,contentIndex:y(),delta:e.text,partial:n})):(_.text+=e.text,_.textSignature=c(_.textSignature,e.thoughtSignature),a.push({type:`text_delta`,contentIndex:y(),delta:e.text,partial:n}))}if(e.functionCall){_&&=(_.type===`text`?a.push({type:`text_end`,contentIndex:y(),content:_.text,partial:n}):a.push({type:`thinking_end`,contentIndex:y(),content:_.thinking,partial:n}),null);let t=e.functionCall.id,r={type:`toolCall`,id:!t||n.content.some(e=>e.type===`toolCall`&&e.id===t)?`${e.functionCall.name}_${Date.now()}_${++f}`:t,name:e.functionCall.name||``,arguments:e.functionCall.args??{},...e.thoughtSignature&&{thoughtSignature:e.thoughtSignature}};n.content.push(r),a.push({type:`toolcall_start`,contentIndex:y(),partial:n}),a.push({type:`toolcall_delta`,contentIndex:y(),delta:JSON.stringify(r.arguments),partial:n}),a.push({type:`toolcall_end`,contentIndex:y(),toolCall:r,partial:n})}}i?.finishReason&&(n.stopReason=o(i.finishReason),n.content.some(e=>e.type===`toolCall`)&&(n.stopReason=`toolUse`)),r.usageMetadata&&(n.usage={input:(r.usageMetadata.promptTokenCount||0)-(r.usageMetadata.cachedContentTokenCount||0),output:(r.usageMetadata.candidatesTokenCount||0)+(r.usageMetadata.thoughtsTokenCount||0),cacheRead:r.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,totalTokens:r.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},t(e,n.usage))}if(_&&(_.type===`text`?a.push({type:`text_end`,contentIndex:y(),content:_.text,partial:n}):a.push({type:`thinking_end`,contentIndex:y(),content:_.thinking,partial:n})),i?.signal?.aborted)throw Error(`Request was aborted`);if(n.stopReason===`aborted`||n.stopReason===`error`)throw Error(`An unknown error occurred`);a.push({type:`done`,reason:n.stopReason,message:n}),a.end()}catch(e){for(let e of n.content)`index`in e&&delete e.index;n.stopReason=i?.signal?.aborted?`aborted`:`error`,n.errorMessage=e instanceof Error?e.message:JSON.stringify(e),a.push({type:`error`,reason:n.stopReason,error:n}),a.end()}})(),a},m=(t,n,i)=>{let a=i?.apiKey;if(!a)throw Error(`No API key for provider: ${t.provider}`);let o=r(t,i,a);if(!i?.reasoning)return p(t,n,{...o,thinking:{enabled:!1}});let s=e(t,i.reasoning),c=s===`off`?`high`:s,l=t;return v(l)||y(l)||_(l)?p(t,n,{...o,thinking:{enabled:!0,level:x(c,l)}}):p(t,n,{...o,thinking:{enabled:!0,budgetTokens:S(l,c,i.thinkingBudgets)}})};function h(e,t,n){let r={};return e.baseUrl&&(r.baseUrl=e.baseUrl,r.apiVersion=``),(e.headers||n)&&(r.headers={...e.headers,...n}),new u({apiKey:t,httpOptions:Object.keys(r).length>0?r:void 0})}function g(e,t,n={}){let r=d(e,t),o={};n.temperature!==void 0&&(o.temperature=n.temperature),n.maxTokens!==void 0&&(o.maxOutputTokens=n.maxTokens);let c={...Object.keys(o).length>0&&o,...t.systemPrompt&&{systemInstruction:i(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:s(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?c.toolConfig={functionCallingConfig:{mode:a(n.toolChoice)}}:c.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=n.thinking.level,c.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(c.thinkingConfig=b(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);c.abortSignal=n.signal}return{model:e.id,contents:r,config:c}}function _(e){return/gemma-?4/.test(e.id.toLowerCase())}function v(e){return/gemini-3(?:\.\d+)?-pro/.test(e.id.toLowerCase())}function y(e){return/gemini-3(?:\.\d+)?-flash/.test(e.id.toLowerCase())}function b(e){return v(e)?{thinkingLevel:`LOW`}:y(e)||_(e)?{thinkingLevel:`MINIMAL`}:{thinkingBudget:0}}function x(e,t){if(v(t))switch(e){case`minimal`:case`low`:return`LOW`;case`medium`:case`high`:return`HIGH`}if(_(t))switch(e){case`minimal`:case`low`:return`MINIMAL`;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 S(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-lite`)?{minimal:512,low:2048,medium:8192,high:24576}[t]:e.id.includes(`2.5-flash`)?{minimal:128,low:2048,medium:8192,high:24576}[t]:-1:n[t]}export{p as streamGoogle,m as streamSimpleGoogle};
@@ -1 +1 @@
1
- import{a as e,c as t,r as n,s as r}from"./transform-messages-BjP6vDPY.js";import{t as i}from"./sanitize-unicode-DmIE6hZJ.js";import{a,i as o,n as s,o as c,r as l,s as u,t as d}from"./google-shared-RiqqHuiz.js";let f=0;const p=(t,n,i)=>{let a=new e;return(async()=>{let e={role:`assistant`,content:[],api:`google-generative-ai`,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=i?.apiKey;if(!s)throw Error(`No API key for provider: ${t.provider}`);let u=h(t,s,i?.headers),d=g(t,n,i),p=await i?.onPayload?.(d,t);p!==void 0&&(d=p);let m=await u.models.generateContentStream(d);a.push({type:`start`,partial:e});let _=null,v=e.content,y=()=>v.length-1;for await(let n of m){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=l(t);(!_||n&&_.type!==`thinking`||!n&&_.type!==`text`)&&(_&&(_.type===`text`?a.push({type:`text_end`,contentIndex:v.length-1,content:_.text,partial:e}):a.push({type:`thinking_end`,contentIndex:y(),content:_.thinking,partial:e})),n?(_={type:`thinking`,thinking:``,thinkingSignature:void 0},e.content.push(_),a.push({type:`thinking_start`,contentIndex:y(),partial:e})):(_={type:`text`,text:``},e.content.push(_),a.push({type:`text_start`,contentIndex:y(),partial:e}))),_.type===`thinking`?(_.thinking+=t.text,_.thinkingSignature=c(_.thinkingSignature,t.thoughtSignature),a.push({type:`thinking_delta`,contentIndex:y(),delta:t.text,partial:e})):(_.text+=t.text,_.textSignature=c(_.textSignature,t.thoughtSignature),a.push({type:`text_delta`,contentIndex:y(),delta:t.text,partial:e}))}if(t.functionCall){_&&=(_.type===`text`?a.push({type:`text_end`,contentIndex:y(),content:_.text,partial:e}):a.push({type:`thinking_end`,contentIndex:y(),content:_.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()}_${++f}`:n,name:t.functionCall.name||``,arguments:t.functionCall.args??{},...t.thoughtSignature&&{thoughtSignature:t.thoughtSignature}};e.content.push(r),a.push({type:`toolcall_start`,contentIndex:y(),partial:e}),a.push({type:`toolcall_delta`,contentIndex:y(),delta:JSON.stringify(r.arguments),partial:e}),a.push({type:`toolcall_end`,contentIndex:y(),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(_&&(_.type===`text`?a.push({type:`text_end`,contentIndex:y(),content:_.text,partial:e}):a.push({type:`thinking_end`,contentIndex:y(),content:_.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},m=(e,r,i)=>{let a=i?.apiKey;if(!a)throw Error(`No API key for provider: ${e.provider}`);let o=n(e,i,a);if(!i?.reasoning)return p(e,r,{...o,thinking:{enabled:!1}});let s=t(e,i.reasoning),c=s===`off`?`high`:s,l=e;return v(l)||y(l)||_(l)?p(e,r,{...o,thinking:{enabled:!0,level:x(c,l)}}):p(e,r,{...o,thinking:{enabled:!0,budgetTokens:S(l,c,i.thinkingBudgets)}})};function h(e,t,n){let r={};return e.baseUrl&&(r.baseUrl=e.baseUrl,r.apiVersion=``),(e.headers||n)&&(r.headers={...e.headers,...n}),new u({apiKey:t,httpOptions:Object.keys(r).length>0?r:void 0})}function g(e,t,n={}){let r=d(e,t),o={};n.temperature!==void 0&&(o.temperature=n.temperature),n.maxTokens!==void 0&&(o.maxOutputTokens=n.maxTokens);let c={...Object.keys(o).length>0&&o,...t.systemPrompt&&{systemInstruction:i(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:s(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?c.toolConfig={functionCallingConfig:{mode:a(n.toolChoice)}}:c.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=n.thinking.level,c.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(c.thinkingConfig=b(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);c.abortSignal=n.signal}return{model:e.id,contents:r,config:c}}function _(e){return/gemma-?4/.test(e.id.toLowerCase())}function v(e){return/gemini-3(?:\.\d+)?-pro/.test(e.id.toLowerCase())}function y(e){return/gemini-3(?:\.\d+)?-flash/.test(e.id.toLowerCase())}function b(e){return v(e)?{thinkingLevel:`LOW`}:y(e)||_(e)?{thinkingLevel:`MINIMAL`}:{thinkingBudget:0}}function x(e,t){if(v(t))switch(e){case`minimal`:case`low`:return`LOW`;case`medium`:case`high`:return`HIGH`}if(_(t))switch(e){case`minimal`:case`low`:return`MINIMAL`;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 S(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-lite`)?{minimal:512,low:2048,medium:8192,high:24576}[t]:e.id.includes(`2.5-flash`)?{minimal:128,low:2048,medium:8192,high:24576}[t]:-1:n[t]}export{p as streamGoogle,m as streamSimpleGoogle};
1
+ import{a as e,c as t,r as n,s as r}from"./transform-messages-BjP6vDPY.js";import{t as i}from"./sanitize-unicode-DmIE6hZJ.js";import{a,i as o,n as s,o as c,r as l,s as u,t as d}from"./google-shared-CwjAeP6N.js";let f=0;const p=(t,n,i)=>{let a=new e;return(async()=>{let e={role:`assistant`,content:[],api:`google-generative-ai`,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=i?.apiKey;if(!s)throw Error(`No API key for provider: ${t.provider}`);let u=h(t,s,i?.headers),d=g(t,n,i),p=await i?.onPayload?.(d,t);p!==void 0&&(d=p);let m=await u.models.generateContentStream(d);a.push({type:`start`,partial:e});let _=null,v=e.content,y=()=>v.length-1;for await(let n of m){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=l(t);(!_||n&&_.type!==`thinking`||!n&&_.type!==`text`)&&(_&&(_.type===`text`?a.push({type:`text_end`,contentIndex:v.length-1,content:_.text,partial:e}):a.push({type:`thinking_end`,contentIndex:y(),content:_.thinking,partial:e})),n?(_={type:`thinking`,thinking:``,thinkingSignature:void 0},e.content.push(_),a.push({type:`thinking_start`,contentIndex:y(),partial:e})):(_={type:`text`,text:``},e.content.push(_),a.push({type:`text_start`,contentIndex:y(),partial:e}))),_.type===`thinking`?(_.thinking+=t.text,_.thinkingSignature=c(_.thinkingSignature,t.thoughtSignature),a.push({type:`thinking_delta`,contentIndex:y(),delta:t.text,partial:e})):(_.text+=t.text,_.textSignature=c(_.textSignature,t.thoughtSignature),a.push({type:`text_delta`,contentIndex:y(),delta:t.text,partial:e}))}if(t.functionCall){_&&=(_.type===`text`?a.push({type:`text_end`,contentIndex:y(),content:_.text,partial:e}):a.push({type:`thinking_end`,contentIndex:y(),content:_.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()}_${++f}`:n,name:t.functionCall.name||``,arguments:t.functionCall.args??{},...t.thoughtSignature&&{thoughtSignature:t.thoughtSignature}};e.content.push(r),a.push({type:`toolcall_start`,contentIndex:y(),partial:e}),a.push({type:`toolcall_delta`,contentIndex:y(),delta:JSON.stringify(r.arguments),partial:e}),a.push({type:`toolcall_end`,contentIndex:y(),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(_&&(_.type===`text`?a.push({type:`text_end`,contentIndex:y(),content:_.text,partial:e}):a.push({type:`thinking_end`,contentIndex:y(),content:_.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},m=(e,r,i)=>{let a=i?.apiKey;if(!a)throw Error(`No API key for provider: ${e.provider}`);let o=n(e,i,a);if(!i?.reasoning)return p(e,r,{...o,thinking:{enabled:!1}});let s=t(e,i.reasoning),c=s===`off`?`high`:s,l=e;return v(l)||y(l)||_(l)?p(e,r,{...o,thinking:{enabled:!0,level:x(c,l)}}):p(e,r,{...o,thinking:{enabled:!0,budgetTokens:S(l,c,i.thinkingBudgets)}})};function h(e,t,n){let r={};return e.baseUrl&&(r.baseUrl=e.baseUrl,r.apiVersion=``),(e.headers||n)&&(r.headers={...e.headers,...n}),new u({apiKey:t,httpOptions:Object.keys(r).length>0?r:void 0})}function g(e,t,n={}){let r=d(e,t),o={};n.temperature!==void 0&&(o.temperature=n.temperature),n.maxTokens!==void 0&&(o.maxOutputTokens=n.maxTokens);let c={...Object.keys(o).length>0&&o,...t.systemPrompt&&{systemInstruction:i(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:s(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?c.toolConfig={functionCallingConfig:{mode:a(n.toolChoice)}}:c.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=n.thinking.level,c.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(c.thinkingConfig=b(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);c.abortSignal=n.signal}return{model:e.id,contents:r,config:c}}function _(e){return/gemma-?4/.test(e.id.toLowerCase())}function v(e){return/gemini-3(?:\.\d+)?-pro/.test(e.id.toLowerCase())}function y(e){return/gemini-3(?:\.\d+)?-flash/.test(e.id.toLowerCase())}function b(e){return v(e)?{thinkingLevel:`LOW`}:y(e)||_(e)?{thinkingLevel:`MINIMAL`}:{thinkingBudget:0}}function x(e,t){if(v(t))switch(e){case`minimal`:case`low`:return`LOW`;case`medium`:case`high`:return`HIGH`}if(_(t))switch(e){case`minimal`:case`low`:return`MINIMAL`;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 S(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-lite`)?{minimal:512,low:2048,medium:8192,high:24576}[t]:e.id.includes(`2.5-flash`)?{minimal:128,low:2048,medium:8192,high:24576}[t]:-1:n[t]}export{p as streamGoogle,m as streamSimpleGoogle};