sliccy 6.248.13 → 6.248.15

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 (199) hide show
  1. package/dist/ui/.vite/manifest.json +473 -473
  2. package/dist/ui/assets/{account-store-D4Humqb-.js → account-store-C8ku_32k.js} +2 -2
  3. package/dist/ui/assets/{account-store-AloIt5Ss.js → account-store-CLrcVXc0.js} +1 -1
  4. package/dist/ui/assets/{adobe-COzZgYMJ.js → adobe-Cpi2aE-H.js} +1 -1
  5. package/dist/ui/assets/{adobe-DzPNN5WH.js → adobe-ZF88lAqt.js} +2 -2
  6. package/dist/ui/assets/{agent-panels-C7WGWk6D.js → agent-panels-BeptN8xj.js} +1 -1
  7. package/dist/ui/assets/{almost-bash-shell-headless--HYnQClo.js → almost-bash-shell-headless-BVria6dz.js} +12 -12
  8. package/dist/ui/assets/{anthropic-messages-BPiITV7m.js → anthropic-messages-pITcoTin.js} +3 -3
  9. package/dist/ui/assets/{apply-layout-C4DLtjYf.js → apply-layout-mZoFZ7NI.js} +1 -1
  10. package/dist/ui/assets/{azure-openai-DCtV7Fk7.js → azure-openai-BuzUN1Zv.js} +1 -1
  11. package/dist/ui/assets/{azure-openai-qBC0T6wP.js → azure-openai-D8taz7yq.js} +1 -1
  12. package/dist/ui/assets/{azure-openai-responses-CYEKOLNU.js → azure-openai-responses-BzfTIQxM.js} +1 -1
  13. package/dist/ui/assets/{backend-hostfs-C_GQqMGj.js → backend-hostfs-BlwgXw0-.js} +1 -1
  14. package/dist/ui/assets/{bedrock-camp-BRe8SyVL.js → bedrock-camp-Drg4mDwe.js} +1 -1
  15. package/dist/ui/assets/{capability-ChjrBUX1.js → capability-COwjFLjM.js} +2 -2
  16. package/dist/ui/assets/{cdp-CCSeAKYa.js → cdp-BECQB1rP.js} +1 -1
  17. package/dist/ui/assets/{cerebras-D05pSaD3.js → cerebras-DZZFW27U.js} +1 -1
  18. package/dist/ui/assets/{cerebras-BlBAjiPm.js → cerebras-DfDfqh_L.js} +1 -1
  19. package/dist/ui/assets/{classifier-shared-2vXBXYjG.js → classifier-shared-1BfNmzbv.js} +1 -1
  20. package/dist/ui/assets/{cloudflare-workers-ai-system-one-gkmS2Nb_.js → cloudflare-workers-ai-system-one-CYstFSnj.js} +1 -1
  21. package/dist/ui/assets/{compat-d34y6SaJ.js → compat-TaBTsXFP.js} +2 -2
  22. package/dist/ui/assets/{composer-speech-ZEQzpxXl.js → composer-speech-B1kWFuju.js} +1 -1
  23. package/dist/ui/assets/{connect-surface-DVe7YnEx.js → connect-surface-CXFbDGll.js} +1 -1
  24. package/dist/ui/assets/{core-DfJhnyZb.js → core-kdG72Y8N.js} +1 -1
  25. package/dist/ui/assets/{directed-approval-DpSG1Fn9.js → directed-approval-LQT_TPqz.js} +1 -1
  26. package/dist/ui/assets/{discovery-preference-DZcZKow3.js → discovery-preference-C-pw_A76.js} +1 -1
  27. package/dist/ui/assets/{dist-BZDZf9iZ.js → dist-AEgtkPbB.js} +1 -1
  28. package/dist/ui/assets/{dist-sPwgAbDH.js → dist-BOzr2Ip-.js} +1 -1
  29. package/dist/ui/assets/{dist-C3U_YVHW.js → dist-CKtiDzqm.js} +1 -1
  30. package/dist/ui/assets/{dist-Dxh_321I.js → dist-Cr80TbAt.js} +1 -1
  31. package/dist/ui/assets/{dist-Bkks4gfH.js → dist-DMTrP4j6.js} +1 -1
  32. package/dist/ui/assets/{dist-CTibI9AZ.js → dist-EaD2nXS1.js} +1 -1
  33. package/dist/ui/assets/{emscripten-vfs-hook-rbqoLuA5.js → emscripten-vfs-hook-CnPmEK30.js} +1 -1
  34. package/dist/ui/assets/{env-api-keys-Ds64PXJ4.js → env-api-keys-Cfrk_k8Z.js} +1 -1
  35. package/dist/ui/assets/esp8266-mbfP83qK.js +1 -0
  36. package/dist/ui/assets/{esptool-operations-CndxwE1S.js → esptool-operations-CTZQdeQU.js} +2 -2
  37. package/dist/ui/assets/{float-topology-PI5i_WsZ.js → float-topology-DJxhvO9u.js} +1 -1
  38. package/dist/ui/assets/{follower-navigate-watcher-B3g-lkMJ.js → follower-navigate-watcher-BThbqvla.js} +1 -1
  39. package/dist/ui/assets/{frozen-archive-writer-D6ckorva.js → frozen-archive-writer-BTbtadrW.js} +1 -1
  40. package/dist/ui/assets/{frozen-archive-writer-ClcpBoUl.js → frozen-archive-writer-CUzf7C3s.js} +1 -1
  41. package/dist/ui/assets/{frozen-session-delete-_74oIhfQ.js → frozen-session-delete-CyRcONHk.js} +1 -1
  42. package/dist/ui/assets/{frozen-session-identity-DW7M6tap.js → frozen-session-identity-BCGVU2K1.js} +1 -1
  43. package/dist/ui/assets/{frozen-session-identity-DRez4L_k.js → frozen-session-identity-DVcpz2HB.js} +1 -1
  44. package/dist/ui/assets/{fs-CQpIxK2e.js → fs-DSnZb1DK.js} +2 -2
  45. package/dist/ui/assets/{gelatiere-unit-DY9kFx7W.js → gelatiere-unit-CLfqVD6U.js} +1 -1
  46. package/dist/ui/assets/{github-BAVQKGLM.js → github--CcFgkAY.js} +2 -2
  47. package/dist/ui/assets/{github-seYRLByd.js → github-ChxmjcJc.js} +1 -1
  48. package/dist/ui/assets/{github-copilot-NuiVJlRe.js → github-copilot-Bt2MljG0.js} +1 -1
  49. package/dist/ui/assets/{github-copilot-B2ui266i.js → github-copilot-DRF3abOV.js} +1 -1
  50. package/dist/ui/assets/{google-generative-ai-y59nuAoz.js → google-generative-ai-_4RGA5R9.js} +1 -1
  51. package/dist/ui/assets/{google-shared-BixQtMJk.js → google-shared-BmjkwexI.js} +1 -1
  52. package/dist/ui/assets/{google-vertex-BuV_pgMi.js → google-vertex-CCT-gmBZ.js} +1 -1
  53. package/dist/ui/assets/{hear-LEawuxbU.js → hear-BGGOzrLe.js} +1 -1
  54. package/dist/ui/assets/icons-CPOTRcvO.js +1 -0
  55. package/dist/ui/assets/{js-realm-worker-BQ2E7b6Z.js → js-realm-worker-Qikr6DIj.js} +2 -2
  56. package/dist/ui/assets/{jsh-executor-BA7Owezg.js → jsh-executor-Cduj8RKN.js} +3 -3
  57. package/dist/ui/assets/{kernel-worker-Bl7wfxQy.js → kernel-worker-DKhuL-SB.js} +8 -8
  58. package/dist/ui/assets/{kokoro-g58mp2Gg.js → kokoro-BZ2oL9at.js} +1 -1
  59. package/dist/ui/assets/{legacy-api-aliases-DZ7QKXPR.js → legacy-api-aliases-BqXqjuwj.js} +1 -1
  60. package/dist/ui/assets/{legacy-styles-CbYwED5J.js → legacy-styles-CGcVbQni.js} +1 -1
  61. package/dist/ui/assets/{lick-ws-bridge-BIajXq6B.js → lick-ws-bridge-Bgd2UUqy.js} +1 -1
  62. package/dist/ui/assets/{lick-ws-bridge-BEHNQbo5.js → lick-ws-bridge-Cy-M-w5Q.js} +1 -1
  63. package/dist/ui/assets/{live-session-curation-BJVU7yfS.js → live-session-curation-DKF46wEh.js} +1 -1
  64. package/dist/ui/assets/{live-session-curation-C8cnTFuk.js → live-session-curation-w6IDH4Wx.js} +1 -1
  65. package/dist/ui/assets/{live-session-snapshot-DB7ATVqO.js → live-session-snapshot-DCT_jWTD.js} +1 -1
  66. package/dist/ui/assets/{local-llm-Dxm6T0ph.js → local-llm-BzQlnS5L.js} +1 -1
  67. package/dist/ui/assets/{local-llm-B72jeBdJ.js → local-llm-DUc-GBj9.js} +1 -1
  68. package/dist/ui/assets/{main-pG2z7nDr.js → main-CWx8ZbOh.js} +3 -3
  69. package/dist/ui/assets/{main-cherry-Cndxk3tr.js → main-cherry-qefabkXK.js} +1 -1
  70. package/dist/ui/assets/{mcp-command-R_syvmA2.js → mcp-command-BMbHOLse.js} +10 -10
  71. package/dist/ui/assets/{memory-curation-seam-xAt4_ZGt.js → memory-curation-seam-DqgqK6CR.js} +1 -1
  72. package/dist/ui/assets/{memory-health-N-Qft3RQ.js → memory-health-CyDp9rny.js} +1 -1
  73. package/dist/ui/assets/{memory-write-execute-CcPwzxh2.js → memory-write-execute-mLtLK-OJ.js} +1 -1
  74. package/dist/ui/assets/{merge-folded-cost-into-frozen-D5QzQftk.js → merge-folded-cost-into-frozen-VpR7-OO_.js} +1 -1
  75. package/dist/ui/assets/{mistral-conversations-BbeDfELF.js → mistral-conversations-BTfu6zaw.js} +1 -1
  76. package/dist/ui/assets/{models-K_BYbYJy.js → models-DuCVW_cU.js} +1 -1
  77. package/dist/ui/assets/{mount-Cvx8MHrJ.js → mount-iiKbRe20.js} +1 -1
  78. package/dist/ui/assets/{new-session-CzmqZfEw.js → new-session-pyHdj7ky.js} +2 -2
  79. package/dist/ui/assets/{node.browser-D-KuY2NZ.js → node.browser-POTNsJTJ.js} +1 -1
  80. package/dist/ui/assets/{oauth-bootstrap-BgBpgpMH.js → oauth-bootstrap-4_xLQ_sb.js} +2 -2
  81. package/dist/ui/assets/{oauth-service-C9_em2OO.js → oauth-service-BTbFz00g.js} +1 -1
  82. package/dist/ui/assets/{onboarding-orchestrator-B0EOdDeN.js → onboarding-orchestrator-CjdNWdMC.js} +1 -1
  83. package/dist/ui/assets/{openai-codex-CBBCnX5G.js → openai-codex-4_vQIXxb.js} +1 -1
  84. package/dist/ui/assets/{openai-codex-responses-CsoNnMnP.js → openai-codex-responses-BQf_Un8s.js} +1 -1
  85. package/dist/ui/assets/{openai-codex-BuzdyFkb.js → openai-codex-uQMjU0_s.js} +1 -1
  86. package/dist/ui/assets/{openai-completions-CwpTiqkV.js → openai-completions-UyX4inUN.js} +1 -1
  87. package/dist/ui/assets/{openai-decisions-C2a995aZ.js → openai-decisions-6D6eupBk.js} +1 -1
  88. package/dist/ui/assets/{openai-responses-CXxDIIaJ.js → openai-responses-Bn1YXtN4.js} +1 -1
  89. package/dist/ui/assets/{openai-responses-shared-Df32ziOu.js → openai-responses-shared-CHC7SqmI.js} +1 -1
  90. package/dist/ui/assets/{openrouter-CajNnUyi.js → openrouter-DneJqayx.js} +1 -1
  91. package/dist/ui/assets/{openrouter-yrPyWZSZ.js → openrouter-TLjYxLOJ.js} +1 -1
  92. package/dist/ui/assets/{openrouter-free-CoKNk8Q9.js → openrouter-free-C9Ks_BoF.js} +1 -1
  93. package/dist/ui/assets/{openrouter-free-DvQSB466.js → openrouter-free-QijswzXp.js} +1 -1
  94. package/dist/ui/assets/{openrouter-oauth-Cwnv6aaR.js → openrouter-oauth-C3NFC0lq.js} +1 -1
  95. package/dist/ui/assets/{openrouter-oauth-Dm2bFG2r.js → openrouter-oauth-CWRFCzx3.js} +1 -1
  96. package/dist/ui/assets/{opfs-mount-DqwXxpJI.js → opfs-mount-DHQkCQyR.js} +1 -1
  97. package/dist/ui/assets/{page-approval-service-BV4pp4cE.js → page-approval-service-1D_bhphG.js} +1 -1
  98. package/dist/ui/assets/{panel-rpc-handlers-0Asc887-.js → panel-rpc-handlers-DJTIyg19.js} +2 -2
  99. package/dist/ui/assets/{panelize-shell-CYWV616_.js → panelize-shell-KnM6qBOd.js} +1 -1
  100. package/dist/ui/assets/{pi-edit-execution-DUHiH3Ek.js → pi-edit-execution-KjYZMQ1M.js} +1 -1
  101. package/dist/ui/assets/{pi-transcript-context-M0uAa_Rs.js → pi-transcript-context-BD-rasES.js} +1 -1
  102. package/dist/ui/assets/preload-helper-BLdHbfdN.js +1 -0
  103. package/dist/ui/assets/{provider-gVV-Tw2o.js → provider-BUOENNXd.js} +1 -1
  104. package/dist/ui/assets/{provider-DQEpec-V.js → provider-C6GKyGbH.js} +2 -2
  105. package/dist/ui/assets/{provider-settings-HdIWRUQi.js → provider-settings-DiWaVtMa.js} +1 -1
  106. package/dist/ui/assets/provider-store-access-BLah3TfA.js +1 -0
  107. package/dist/ui/assets/provider-store-access-DK9jcMFs.js +1 -0
  108. package/dist/ui/assets/{providers-BPtyhTCJ.js → providers-D98KfVHw.js} +2 -2
  109. package/dist/ui/assets/{providers-BqUoo02I.js → providers-DQDxShvT.js} +1 -1
  110. package/dist/ui/assets/{proxied-fetch-Co-YYDT9.js → proxied-fetch-Dcpb4ieV.js} +1 -1
  111. package/dist/ui/assets/{proxied-fetch-raw-C_Y--MLW.js → proxied-fetch-raw-DFOSVEWz.js} +1 -1
  112. package/dist/ui/assets/{quick-llm-DKIeT-Bm.js → quick-llm-BpqDA4jj.js} +1 -1
  113. package/dist/ui/assets/{realm-inprocess-I1Oa37_B.js → realm-inprocess-DB9T1J06.js} +2 -2
  114. package/dist/ui/assets/{realm-unhandled-rejections-5totJ0nZ.js → realm-unhandled-rejections--yhMR2JG.js} +1 -1
  115. package/dist/ui/assets/{realm-unhandled-rejections-Vf408gQs.js → realm-unhandled-rejections-C-dWyWFT.js} +1 -1
  116. package/dist/ui/assets/{recovery-screen-d6N9mctq.js → recovery-screen-DxmS11pP.js} +1 -1
  117. package/dist/ui/assets/{remote-terminal-view-B8EZ4je-.js → remote-terminal-view-CKT9I4xa.js} +3 -3
  118. package/dist/ui/assets/{rest-ops-Bu4Fgr3O.js → rest-ops-DUxY6dMv.js} +1 -1
  119. package/dist/ui/assets/{restore-YHJZnRoZ.js → restore-DBVHFRDn.js} +1 -1
  120. package/dist/ui/assets/{run-Ds5q8C_n.js → run-B2qNRdiQ.js} +2 -2
  121. package/dist/ui/assets/{run-qBD2W0pE.js → run-D6GtWFc7.js} +1 -1
  122. package/dist/ui/assets/{run-QN9mmLnD.js → run-DWu38u8c.js} +1 -1
  123. package/dist/ui/assets/{run-jEnj-WXZ.js → run-DxF2t6YH.js} +2 -2
  124. package/dist/ui/assets/{secret-env-Da2LI-Wl.js → secret-env-BDj2iVgu.js} +1 -1
  125. package/dist/ui/assets/secret-topology-CcM8VDVI.js +1 -0
  126. package/dist/ui/assets/{serve-command-ClUJJ3EB.js → serve-command-Cj91wHBd.js} +2 -2
  127. package/dist/ui/assets/{serve-runtime-WdVepvEi.js → serve-runtime-C6U19az5.js} +1 -1
  128. package/dist/ui/assets/{session-command-memory-CQnSNVmV.js → session-command-memory-DTJrpKQG.js} +2 -2
  129. package/dist/ui/assets/{session-jsonl-BGHEGuWx.js → session-jsonl-CUGtVDjz.js} +1 -1
  130. package/dist/ui/assets/{session-jsonl-BjBaj5ud.js → session-jsonl-PBSNVf5N.js} +1 -1
  131. package/dist/ui/assets/{session-search-index-DFWu63Zi.js → session-search-index-BmWzdxol.js} +1 -1
  132. package/dist/ui/assets/{setup-feature-flags-remote-CUbaBhWB.js → setup-feature-flags-remote-Dcyvcm1c.js} +1 -1
  133. package/dist/ui/assets/{setup-model-catalog-CykSe_Dx.js → setup-model-catalog-9sIjZkxM.js} +1 -1
  134. package/dist/ui/assets/{setup-sprinkle-exec-IU4qWikH.js → setup-sprinkle-exec-CdgElwNt.js} +1 -1
  135. package/dist/ui/assets/{silent-renew-backoff-BMr_pGCU.js → silent-renew-backoff-B9OHOzRe.js} +1 -1
  136. package/dist/ui/assets/{slicc-diff-D8v8ZLu9.js → slicc-diff-BfQJcIZe.js} +1 -1
  137. package/dist/ui/assets/{slicc-editor-CEzmoAZr.js → slicc-editor-CasndIRU.js} +3 -3
  138. package/dist/ui/assets/slicc-editor-tCvqLLxb.js +1 -0
  139. package/dist/ui/assets/slicc-version-QFUwKumj.js +1 -0
  140. package/dist/ui/assets/{soundscape-Blo80kkF.js → soundscape-BotaZrDR.js} +1 -1
  141. package/dist/ui/assets/{speak-DYYfW_FH.js → speak-DHpjynd6.js} +3 -3
  142. package/dist/ui/assets/{sprinkle-manager-6IcFnb1j.js → sprinkle-manager-8dcg9Iza.js} +1 -1
  143. package/dist/ui/assets/{sprinkle-renderer-BnGOcTUx.js → sprinkle-renderer-D0vfMqnl.js} +3 -3
  144. package/dist/ui/assets/{sudo-cs2WnTRn.js → sudo-CNQ60foM.js} +1 -1
  145. package/dist/ui/assets/{supervisor-BULFrqrk.js → supervisor-CPH3uat9.js} +1 -1
  146. package/dist/ui/assets/{sync-dialog-MmcHaZwh.js → sync-dialog-DcHJ8wDd.js} +1 -1
  147. package/dist/ui/assets/{system-one-shared-DLgt2600.js → system-one-shared-sVc-bQkc.js} +1 -1
  148. package/dist/ui/assets/{telemetry-BqfutULb.js → telemetry-kqkj0A7x.js} +1 -1
  149. package/dist/ui/assets/{transform-messages-Bx3wQh2R.js → transform-messages-HTSSP3zz.js} +1 -1
  150. package/dist/ui/assets/{transformers-env-Fm5j4giD.js → transformers-env-C4aTP2JX.js} +1 -1
  151. package/dist/ui/assets/{transformers.web-BR6ghS6P.js → transformers.web-C5VLk0m7.js} +1 -1
  152. package/dist/ui/assets/{tray-leader-CFIVvD5G.js → tray-leader-BO7RLnAz.js} +1 -1
  153. package/dist/ui/assets/{tray-leave-runtime-BSxSDTw5.js → tray-leave-runtime-DrPHvVi6.js} +1 -1
  154. package/dist/ui/assets/{tray-sidecar-DQqVkAjk.js → tray-sidecar-BF8y2nH9.js} +1 -1
  155. package/dist/ui/assets/{typesafe-system-one-CXEHNzQF.js → typesafe-system-one-BdxxnbQu.js} +1 -1
  156. package/dist/ui/assets/{upgrade-detection-MAFg6kZz.js → upgrade-detection-DYeqLwkQ.js} +1 -1
  157. package/dist/ui/assets/{usb-operations-Ccb6x34d.js → usb-operations-DvSWlz_Y.js} +1 -1
  158. package/dist/ui/assets/{voice-reply-Bum2oQcA.js → voice-reply-DVgxPsp4.js} +1 -1
  159. package/dist/ui/assets/{warm-wterm-C7ml3_29.js → warm-wterm-snqvCS0-.js} +1 -1
  160. package/dist/ui/assets/{wc-attach-BJHnH6pd.js → wc-attach-DtB955Cg.js} +3 -3
  161. package/dist/ui/assets/{wc-browser-sNhsHdWm.js → wc-browser-5eX1yDaM.js} +1 -1
  162. package/dist/ui/assets/{wc-computers-CWg9NiMK.js → wc-computers-BQe7QGA5.js} +1 -1
  163. package/dist/ui/assets/{wc-detached-DZvftcPT.js → wc-detached-B448Oceh.js} +1 -1
  164. package/dist/ui/assets/{wc-extension-BaYtWo4q.js → wc-extension-DcxJvbXQ.js} +2 -2
  165. package/dist/ui/assets/{wc-follower-C3skKl26.js → wc-follower-C4HBJRkp.js} +3 -3
  166. package/dist/ui/assets/{wc-follower-oauth-iJKLKYov.js → wc-follower-oauth-DWB_1KrV.js} +1 -1
  167. package/dist/ui/assets/{wc-gelatiere-DaysrnKa.js → wc-gelatiere-DNuoJgyp.js} +1 -1
  168. package/dist/ui/assets/{wc-live-DEo-6NQK.js → wc-live-BMXg1cW0.js} +5 -5
  169. package/dist/ui/assets/{wc-nav-DqmL5N5I.js → wc-nav-C4cQdKiF.js} +2 -2
  170. package/dist/ui/assets/{wc-onboarding-Dg7G2Ykz.js → wc-onboarding-CsrFGEQ2.js} +2 -2
  171. package/dist/ui/assets/{wc-permissions-wBb5q-ot.js → wc-permissions-DMVzE1os.js} +3 -3
  172. package/dist/ui/assets/{wc-permissions-providers-r97Cs0CM.js → wc-permissions-providers-CzfeTK0C.js} +1 -1
  173. package/dist/ui/assets/{wc-placeholder-Dcqr3sQ2.js → wc-placeholder-BSqm7GOK.js} +3 -3
  174. package/dist/ui/assets/{wc-secret-request-DLngmY78.js → wc-secret-request-BMp1_Dqa.js} +1 -1
  175. package/dist/ui/assets/{wc-settings-DhxNLvFd.js → wc-settings-D_rtZFP8.js} +3 -3
  176. package/dist/ui/assets/{wc-shell-RF_bfAGN.js → wc-shell-CbiYuC-u.js} +6 -6
  177. package/dist/ui/assets/{wc-shortcut-config-Cr8zuZad.js → wc-shortcut-config-Dit9NqHJ.js} +1 -1
  178. package/dist/ui/assets/{wc-sprinkles-DyMWm1jp.js → wc-sprinkles-CRU3Bd1x.js} +2 -2
  179. package/dist/ui/assets/{wc-transcript-export-DVyU4B6b.js → wc-transcript-export-CCBgVRIb.js} +2 -2
  180. package/dist/ui/assets/{wc-tray-BjkHiwAE.js → wc-tray-DMpwCD-i.js} +4 -4
  181. package/dist/ui/assets/welcome-detection-CMa9jsjd.js +1 -0
  182. package/dist/ui/assets/{whisper-session-nBcuStI7.js → whisper-session-DOG-n_Gl.js} +2 -2
  183. package/dist/ui/assets/{xai-grok-B0VdJo2K.js → xai-grok-BwRAMV0b.js} +1 -1
  184. package/dist/ui/assets/{xai-grok-B-1EsChx.js → xai-grok-D-s6Eti2.js} +1 -1
  185. package/dist/ui/index.html +12 -12
  186. package/dist/ui/lucide-icons.js +362 -359
  187. package/dist/ui/packages/webapp/index.html +12 -12
  188. package/dist/ui/slicc-diff.js +1 -1
  189. package/dist/ui/slicc-editor.js +1 -1
  190. package/package.json +2 -2
  191. package/dist/ui/assets/esp8266-6UF0nYRf.js +0 -1
  192. package/dist/ui/assets/icons-BUdZEBvI.js +0 -1
  193. package/dist/ui/assets/preload-helper-DjzSQ1t3.js +0 -1
  194. package/dist/ui/assets/provider-store-access-BG9uc1UB.js +0 -1
  195. package/dist/ui/assets/provider-store-access-CkviLtwb.js +0 -1
  196. package/dist/ui/assets/secret-topology-B-7q9k0Q.js +0 -1
  197. package/dist/ui/assets/slicc-editor-CnQU3MQS.js +0 -1
  198. package/dist/ui/assets/slicc-version-D_fWoQ7a.js +0 -1
  199. package/dist/ui/assets/welcome-detection-ZKXELBPe.js +0 -1
@@ -1 +1 @@
1
- import{_ as e,r as t}from"./account-store-AloIt5Ss.js";import{a as n}from"./diagnostics-B-5VkVir.js";import{a as r}from"./compat-CuWVDYYO.js";import{a as i,c as a,i as o,r as s,s as c,t as l}from"./legacy-api-aliases-DcPvcesD.js";import{a as u,i as d}from"./core-qVdZuDN0.js";import{t as f}from"./anthropic-proxy-compat-CaymbdBf.js";import"./provider-settings-HdIWRUQi.js";function p(e,t){return{...e,api:`anthropic-messages`,baseUrl:t.baseUrl,headers:t.headers,provider:`github-copilot`,compat:f(e.compat)}}function m(e){if(!e||typeof e!=`object`)return null;let t=e.quota_snapshots?.premium_interactions;return!t||t.unlimited||typeof t.percent_remaining!=`number`?null:{percent:Math.max(0,100-t.percent_remaining),status:t.percent_remaining<=0&&t.overage_permitted!==!0?`rate-limited`:`ok`,window:`monthly`,resetsAt:e.quota_reset_date_utc}}async function h(e,t,n={}){let r=typeof AbortController==`function`?new AbortController:null,i=r?setTimeout(()=>r.abort(),n.timeoutMs??8e3):null;try{let i=await t(`https://api.github.com/copilot_internal/user`,{headers:{...n.headers,Authorization:`Bearer ${e}`},...r?{signal:r.signal}:{}});if(i.status===404||i.status===501)return null;if(!i.ok)throw Error(`GitHub Copilot /copilot_internal/user returned ${i.status}`);return m(await i.json())}finally{i&&clearTimeout(i)}}const g=`github-copilot`,_=atob(`SXYxLmI1MDdhMDhjODdlY2ZlOTg=`),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`};function b(){return t().find(e=>e.providerId===g)}async function x(){let e=await fetch(`https://github.com/login/device/code`,{method:`POST`,headers:y,body:new URLSearchParams({client_id:_,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 S(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 C(Math.ceil(r*i),t);let n=await fetch(`https://github.com/login/oauth/access_token`,{method:`POST`,headers:y,body:new URLSearchParams({client_id:_,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 C(e,t){return new Promise((n,r)=>{if(t.aborted){r(/* @__PURE__ */ Error(`Copilot login cancelled`));return}let i=setTimeout(n,e);t.addEventListener(`abort`,()=>{clearTimeout(i),r(/* @__PURE__ */ Error(`Copilot login cancelled`))},{once:!0})})}function w(e){let t=e.match(/proxy-ep=([^;]+)/);return t?`https://${t[1].replace(/^proxy\./,`api.`)}`:null}async function T(e){let t=await fetch(`https://api.github.com/copilot_internal/v2/token`,{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-3e5,apiBaseUrl:w(n.token)??`https://api.individual.githubcopilot.com`,githubAccessToken:e}}const E=`github-copilot.models.v1`;function D(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 O(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:D(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 k(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 O(await t.json())}function A(){if(typeof localStorage>`u`)return[];try{let e=localStorage.getItem(E);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function j(e){if(typeof localStorage<`u`)try{localStorage.setItem(E,JSON.stringify(e))}catch{}}function M(e){return A().find(t=>t.id===e)??null}async function N(e){let t;try{t=await k(e)}catch(e){console.warn(`[github-copilot] Catalog refresh failed; keeping previous cache.`,e instanceof Error?e.message:String(e));return}j(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))}})),j(t)}async function P(t,n){await e({providerId:g,accessToken:t.copilotToken,refreshToken:t.githubAccessToken,tokenExpiresAt:t.expiresAtMs,baseUrl:t.apiBaseUrl,userName:n})}async function F(){let e=b();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 T(e.refreshToken);return await P(n,e.userName),n.copilotToken}const I=[`mini`,`nano`,`flash`,`haiku`,`lite`,`embedding`];function L(e){let t=[e.id,e.name??``].flatMap(e=>{let t=e.toLowerCase();return[t,t.replace(/[\s_.:]+/g,`-`)]});return!I.some(e=>t.some(t=>t.includes(e)))}function R(){if(!b()?.accessToken)return[];let e=A();if(e.length>0)return e.filter(e=>!e.policyState.startsWith(`unavailable:`)).filter(e=>L(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=>L({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 z(e,t){return{type:`error`,reason:`error`,error:{role:`assistant`,content:[],api:e.api,provider:g,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()}}}const B={"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 V(e){let t=b(),n=t?.baseUrl??`https://api.individual.githubcopilot.com`,r=M(e);if(r)return{api:r.api,baseUrl:n,headers:{...B}};try{let n=d(`github-copilot`,e);return{api:n.api,baseUrl:t?.baseUrl??n.baseUrl,headers:{...n.headers??{},...B}}}catch{return null}}function H(e,t){let n=A(),r=n.findIndex(t=>t.id===e);r<0||(n[r]={...n[r],policyState:`unavailable:${t}`},j(n))}function U(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 W(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 G(e,t){return e===`anthropic-messages`?t?i:l:e===`openai-responses`?t?a:o:t?c:s}function K(e,t,n){let r=W(n);if(r&&/model_not_supported/i.test(r)){H(t.id,`model_not_supported`);let n=U(t.id,r);return console.error(`[github-copilot] Plan-gated model rejection:`,n),e.push(z(t,Error(n))),e.end(),!0}return e.push(n),!1}function q(e,t,n){let r=n instanceof Error?n.message:String(n),i=n;/model_not_supported/i.test(r)&&(H(t.id,`model_not_supported`),i=Error(U(t.id,r))),console.error(`[github-copilot] Stream error:`,i instanceof Error?i.message:String(i)),e.push(z(t,i)),e.end()}async function J(e,t,n,r,i){try{let a=await F(),o=V(t.id);if(!o)throw Error(`GitHub Copilot does not recognize "${t.id}" — open the picker (the model list refreshes on login) and pick a current model.`);let s=o.api===`anthropic-messages`?p(t,o):{...t,api:o.api,baseUrl:o.baseUrl,headers:o.headers,provider:`github-copilot`},c={...r,apiKey:a},l=G(o.api,i)(s,n,c);for await(let n of l)if(K(e,t,n))return;e.end()}catch(n){q(e,t,n)}}function Y(e){return(t,r,i={})=>{let a=n();return J(a,t,r,i,e),a}}const X=Y(!1),Z=Y(!0),Q=({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 s=document.createElement(`button`);s.type=`button`,s.textContent=`Cancel`,s.style.cssText=[`background:transparent`,`color:#e6edf3`,`border:1px solid #30363d`,`border-radius:6px`,`padding:6px 12px`,`font:600 12px inherit`,`cursor:pointer`].join(`;`);let c=document.createElement(`button`);c.type=`button`,c.textContent=`Copy & Continue`,c.style.cssText=[`background:#238636`,`color:#fff`,`border:0`,`border-radius:6px`,`padding:6px 12px`,`font:600 12px inherit`,`cursor:pointer`].join(`;`);let l=()=>{try{n.remove()}catch{}};s.addEventListener(`click`,()=>{l(),t(`cancel`)}),c.addEventListener(`click`,()=>{(async()=>{try{let{copyTextToClipboard:t}=await import(`./provider-settings-HdIWRUQi.js`).then(e=>e.t);await t(e)}catch{}l(),t(`continue`)})()}),o.appendChild(s),o.appendChild(c),n.appendChild(r),n.appendChild(i),n.appendChild(a),n.appendChild(o),document.body.appendChild(n)});async function $(){let e=b();return e?.refreshToken?h(e.refreshToken,fetch,{headers:v}):null}const ee={id:g,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:R,getBudgetUsage:$,onOAuthLoginIntercepted:async(e,t,n)=>{let r=await x(),i=new URL(r.verification_uri);if(i.searchParams.set(`user_code`,r.user_code),await(n?.presentDeviceCode??Q)({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:`https://github.com/login/device/success*`,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 S(r,a.signal)}catch(e){throw a.abort(),await o,e}await o;let c=await T(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 P(c,l),await N(c),t()},onOAuthLogout:async()=>{await e({providerId:g,accessToken:``})},onSilentRenew:async()=>{let e=b();if(!e?.refreshToken)return null;try{let t=await T(e.refreshToken);return await P(t,e.userName),await N(t),t.copilotToken}catch(e){return console.warn(`[github-copilot] Silent renew failed:`,e instanceof Error?e.message:String(e)),null}}};function te(){r({api:`github-copilot-anthropic`,stream:X,streamSimple:Z}),r({api:`github-copilot-openai`,stream:X,streamSimple:Z})}export{ee as config,L as isCopilotConeCompatible,te as register};
1
+ import{_ as e,r as t}from"./account-store-CLrcVXc0.js";import{a as n}from"./diagnostics-B-5VkVir.js";import{a as r}from"./compat-CuWVDYYO.js";import{a as i,c as a,i as o,r as s,s as c,t as l}from"./legacy-api-aliases-DcPvcesD.js";import{a as u,i as d}from"./core-qVdZuDN0.js";import{t as f}from"./anthropic-proxy-compat-CaymbdBf.js";import"./provider-settings-DiWaVtMa.js";function p(e,t){return{...e,api:`anthropic-messages`,baseUrl:t.baseUrl,headers:t.headers,provider:`github-copilot`,compat:f(e.compat)}}function m(e){if(!e||typeof e!=`object`)return null;let t=e.quota_snapshots?.premium_interactions;return!t||t.unlimited||typeof t.percent_remaining!=`number`?null:{percent:Math.max(0,100-t.percent_remaining),status:t.percent_remaining<=0&&t.overage_permitted!==!0?`rate-limited`:`ok`,window:`monthly`,resetsAt:e.quota_reset_date_utc}}async function h(e,t,n={}){let r=typeof AbortController==`function`?new AbortController:null,i=r?setTimeout(()=>r.abort(),n.timeoutMs??8e3):null;try{let i=await t(`https://api.github.com/copilot_internal/user`,{headers:{...n.headers,Authorization:`Bearer ${e}`},...r?{signal:r.signal}:{}});if(i.status===404||i.status===501)return null;if(!i.ok)throw Error(`GitHub Copilot /copilot_internal/user returned ${i.status}`);return m(await i.json())}finally{i&&clearTimeout(i)}}const g=`github-copilot`,_=atob(`SXYxLmI1MDdhMDhjODdlY2ZlOTg=`),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`};function b(){return t().find(e=>e.providerId===g)}async function x(){let e=await fetch(`https://github.com/login/device/code`,{method:`POST`,headers:y,body:new URLSearchParams({client_id:_,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 S(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 C(Math.ceil(r*i),t);let n=await fetch(`https://github.com/login/oauth/access_token`,{method:`POST`,headers:y,body:new URLSearchParams({client_id:_,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 C(e,t){return new Promise((n,r)=>{if(t.aborted){r(/* @__PURE__ */ Error(`Copilot login cancelled`));return}let i=setTimeout(n,e);t.addEventListener(`abort`,()=>{clearTimeout(i),r(/* @__PURE__ */ Error(`Copilot login cancelled`))},{once:!0})})}function w(e){let t=e.match(/proxy-ep=([^;]+)/);return t?`https://${t[1].replace(/^proxy\./,`api.`)}`:null}async function T(e){let t=await fetch(`https://api.github.com/copilot_internal/v2/token`,{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-3e5,apiBaseUrl:w(n.token)??`https://api.individual.githubcopilot.com`,githubAccessToken:e}}const E=`github-copilot.models.v1`;function D(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 O(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:D(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 k(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 O(await t.json())}function A(){if(typeof localStorage>`u`)return[];try{let e=localStorage.getItem(E);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function j(e){if(typeof localStorage<`u`)try{localStorage.setItem(E,JSON.stringify(e))}catch{}}function M(e){return A().find(t=>t.id===e)??null}async function N(e){let t;try{t=await k(e)}catch(e){console.warn(`[github-copilot] Catalog refresh failed; keeping previous cache.`,e instanceof Error?e.message:String(e));return}j(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))}})),j(t)}async function P(t,n){await e({providerId:g,accessToken:t.copilotToken,refreshToken:t.githubAccessToken,tokenExpiresAt:t.expiresAtMs,baseUrl:t.apiBaseUrl,userName:n})}async function F(){let e=b();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 T(e.refreshToken);return await P(n,e.userName),n.copilotToken}const I=[`mini`,`nano`,`flash`,`haiku`,`lite`,`embedding`];function L(e){let t=[e.id,e.name??``].flatMap(e=>{let t=e.toLowerCase();return[t,t.replace(/[\s_.:]+/g,`-`)]});return!I.some(e=>t.some(t=>t.includes(e)))}function R(){if(!b()?.accessToken)return[];let e=A();if(e.length>0)return e.filter(e=>!e.policyState.startsWith(`unavailable:`)).filter(e=>L(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=>L({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 z(e,t){return{type:`error`,reason:`error`,error:{role:`assistant`,content:[],api:e.api,provider:g,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()}}}const B={"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 V(e){let t=b(),n=t?.baseUrl??`https://api.individual.githubcopilot.com`,r=M(e);if(r)return{api:r.api,baseUrl:n,headers:{...B}};try{let n=d(`github-copilot`,e);return{api:n.api,baseUrl:t?.baseUrl??n.baseUrl,headers:{...n.headers??{},...B}}}catch{return null}}function H(e,t){let n=A(),r=n.findIndex(t=>t.id===e);r<0||(n[r]={...n[r],policyState:`unavailable:${t}`},j(n))}function U(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 W(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 G(e,t){return e===`anthropic-messages`?t?i:l:e===`openai-responses`?t?a:o:t?c:s}function K(e,t,n){let r=W(n);if(r&&/model_not_supported/i.test(r)){H(t.id,`model_not_supported`);let n=U(t.id,r);return console.error(`[github-copilot] Plan-gated model rejection:`,n),e.push(z(t,Error(n))),e.end(),!0}return e.push(n),!1}function q(e,t,n){let r=n instanceof Error?n.message:String(n),i=n;/model_not_supported/i.test(r)&&(H(t.id,`model_not_supported`),i=Error(U(t.id,r))),console.error(`[github-copilot] Stream error:`,i instanceof Error?i.message:String(i)),e.push(z(t,i)),e.end()}async function J(e,t,n,r,i){try{let a=await F(),o=V(t.id);if(!o)throw Error(`GitHub Copilot does not recognize "${t.id}" — open the picker (the model list refreshes on login) and pick a current model.`);let s=o.api===`anthropic-messages`?p(t,o):{...t,api:o.api,baseUrl:o.baseUrl,headers:o.headers,provider:`github-copilot`},c={...r,apiKey:a},l=G(o.api,i)(s,n,c);for await(let n of l)if(K(e,t,n))return;e.end()}catch(n){q(e,t,n)}}function Y(e){return(t,r,i={})=>{let a=n();return J(a,t,r,i,e),a}}const X=Y(!1),Z=Y(!0),Q=({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 s=document.createElement(`button`);s.type=`button`,s.textContent=`Cancel`,s.style.cssText=[`background:transparent`,`color:#e6edf3`,`border:1px solid #30363d`,`border-radius:6px`,`padding:6px 12px`,`font:600 12px inherit`,`cursor:pointer`].join(`;`);let c=document.createElement(`button`);c.type=`button`,c.textContent=`Copy & Continue`,c.style.cssText=[`background:#238636`,`color:#fff`,`border:0`,`border-radius:6px`,`padding:6px 12px`,`font:600 12px inherit`,`cursor:pointer`].join(`;`);let l=()=>{try{n.remove()}catch{}};s.addEventListener(`click`,()=>{l(),t(`cancel`)}),c.addEventListener(`click`,()=>{(async()=>{try{let{copyTextToClipboard:t}=await import(`./provider-settings-DiWaVtMa.js`).then(e=>e.t);await t(e)}catch{}l(),t(`continue`)})()}),o.appendChild(s),o.appendChild(c),n.appendChild(r),n.appendChild(i),n.appendChild(a),n.appendChild(o),document.body.appendChild(n)});async function $(){let e=b();return e?.refreshToken?h(e.refreshToken,fetch,{headers:v}):null}const ee={id:g,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:R,getBudgetUsage:$,onOAuthLoginIntercepted:async(e,t,n)=>{let r=await x(),i=new URL(r.verification_uri);if(i.searchParams.set(`user_code`,r.user_code),await(n?.presentDeviceCode??Q)({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:`https://github.com/login/device/success*`,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 S(r,a.signal)}catch(e){throw a.abort(),await o,e}await o;let c=await T(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 P(c,l),await N(c),t()},onOAuthLogout:async()=>{await e({providerId:g,accessToken:``})},onSilentRenew:async()=>{let e=b();if(!e?.refreshToken)return null;try{let t=await T(e.refreshToken);return await P(t,e.userName),await N(t),t.copilotToken}catch(e){return console.warn(`[github-copilot] Silent renew failed:`,e instanceof Error?e.message:String(e)),null}}};function te(){r({api:`github-copilot-anthropic`,stream:X,streamSimple:Z}),r({api:`github-copilot-openai`,stream:X,streamSimple:Z})}export{ee as config,L as isCopilotConeCompatible,te as register};
@@ -1 +1 @@
1
- import{i as e}from"./diagnostics-B-5VkVir.js";import{c as t,h as n,n as r,o as i,t as a,u as o}from"./models-K_BYbYJy.js";import{n as s}from"./headers-FK4rgixo.js";import{s as c}from"./constrained-sampling-DA0j0g9I.js";import{t as l}from"./sanitize-unicode-DmIE6hZJ.js";import{r as u}from"./transform-messages-Bx3wQh2R.js";import{n as d,t as f}from"./error-body-pkrba6pf.js";import{a as p,c as m,d as h,f as g,i as _,l as v,m as y,n as b,o as x,p as S,r as C,s as w,t as T,u as E}from"./google-shared-BixQtMJk.js";var D=0,O=(t,n,r)=>{let o=new e,s=i(n);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:`pending`,timestamp:Date.now()};try{if(r?.fetch&&r.fetch!==globalThis.fetch)throw Error(`Custom fetch is not supported by the Google Generative AI adapter`);let n=r?.apiKey;if(!n)throw Error(`No API key for provider: ${t.provider}`);let i=A(t,n,r?.headers),c=j(t,s,r),l=await r?.onPayload?.(c,t);l!==void 0&&(c=l);let u=await v(()=>i.models.generateContentStream(c),r);o.push({type:`start`,partial:e});let d=null,f=e.content,h=()=>f.length-1;for await(let n of u){await r?.onProviderStreamEvent?.(n,t),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=_(t);(!d||n&&d.type!==`thinking`||!n&&d.type!==`text`)&&(d&&(d.type===`text`?o.push({type:`text_end`,contentIndex:f.length-1,content:d.text,partial:e}):o.push({type:`thinking_end`,contentIndex:h(),content:d.thinking,partial:e})),n?(d={type:`thinking`,thinking:``,thinkingSignature:void 0},e.content.push(d),o.push({type:`thinking_start`,contentIndex:h(),partial:e})):(d={type:`text`,text:``},e.content.push(d),o.push({type:`text_start`,contentIndex:h(),partial:e}))),d.type===`thinking`?(d.thinking+=t.text,d.thinkingSignature=m(d.thinkingSignature,t.thoughtSignature),o.push({type:`thinking_delta`,contentIndex:h(),delta:t.text,partial:e})):(d.text+=t.text,d.textSignature=m(d.textSignature,t.thoughtSignature),o.push({type:`text_delta`,contentIndex:h(),delta:t.text,partial:e}))}if(t.functionCall){d&&=(d.type===`text`?o.push({type:`text_end`,contentIndex:h(),content:d.text,partial:e}):o.push({type:`thinking_end`,contentIndex:h(),content:d.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()}_${++D}`:n,name:t.functionCall.name||``,arguments:t.functionCall.args??{},...t.thoughtSignature&&{thoughtSignature:t.thoughtSignature}};e.content.push(r),o.push({type:`toolcall_start`,contentIndex:h(),partial:e}),o.push({type:`toolcall_delta`,contentIndex:h(),delta:JSON.stringify(r.arguments),partial:e}),o.push({type:`toolcall_end`,contentIndex:h(),toolCall:r,partial:e})}}i?.finishReason&&(e.rawStopReason=i.finishReason,e.stopReason=p(i.finishReason),e.content.some(e=>e.type===`toolCall`)&&e.stopReason===`stop`&&(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,reasoning:n.usageMetadata.thoughtsTokenCount||0,totalTokens:n.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},a(t,e.usage))}if(d&&(d.type===`text`?o.push({type:`text_end`,contentIndex:h(),content:d.text,partial:e}):o.push({type:`thinking_end`,contentIndex:h(),content:d.thinking,partial:e})),r?.signal?.aborted)throw Error(`Request was aborted`);if(e.stopReason===`pending`)throw Error(`Google stream ended without a finish reason`);if(e.stopReason===`aborted`||e.stopReason===`error`){let t=e.rawStopReason?`Provider stopped with: ${e.rawStopReason}`:`An unknown error occurred`;throw Error(t)}o.push({type:`done`,reason:e.stopReason,message:e}),o.end()}catch(t){for(let t of e.content)`index`in t&&delete t.index;e.stopReason=r?.signal?.aborted?`aborted`:`error`,e.errorMessage=f(d(t)),o.push({type:`error`,reason:e.stopReason,error:e}),o.end()}})(),o},k=(e,t,n)=>{let i=n?.apiKey;if(!i)throw Error(`No API key for provider: ${e.provider}`);let a={...u(e,t,n,i),toolChoice:n?.toolChoice};if(!n?.reasoning)return O(e,t,{...a,thinking:{enabled:!1}});let o=r(e,n.reasoning);if(o===`off`)return O(e,t,{...a,thinking:{enabled:!1}});let s=w(e,o);return S(e)?O(e,t,{...a,thinking:{enabled:!0,level:g(s)}}):O(e,t,{...a,thinking:{enabled:!0,budgetTokens:M(e,s,n.thinkingBudgets)}})};function A(e,t,n){let r={};e.baseUrl&&(r.baseUrl=e.baseUrl,r.apiVersion=``);let i=s({"User-Agent":c(),...e.headers,...n});return i&&(r.headers=i),new y({apiKey:t,httpOptions:Object.keys(r).length>0?r:void 0})}function j(e,r,i={}){let a=T(e,r),s=o(r.messages),c=t(r.messages),u={};i.temperature!==void 0&&(u.temperature=i.temperature),i.maxTokens!==void 0&&(u.maxOutputTokens=i.maxTokens);let d=E(e.id),f=c.length>0?x(c,i.toolChoice,d):void 0,p=s?n(s):``,m={...Object.keys(u).length>0&&u,...p&&{systemInstruction:l(p)},...c.length>0&&{tools:b(c,!1,d)},...f!==void 0&&{toolConfig:{functionCallingConfig:{mode:f}}}};if(i.thinking?.enabled&&e.reasoning){let e={includeThoughts:!0};i.thinking.level===void 0?i.thinking.budgetTokens!==void 0&&(e.thinkingBudget=i.thinking.budgetTokens):e.thinkingLevel=h(i.thinking.level),m.thinkingConfig=e}else e.reasoning&&i.thinking&&!i.thinking.enabled&&(m.thinkingConfig=C(e));if(i.signal){if(i.signal.aborted)throw Error(`Request aborted`);m.abortSignal=i.signal}return{model:e.id,contents:a,config:m}}function M(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{O as stream,k as streamSimple};
1
+ import{i as e}from"./diagnostics-B-5VkVir.js";import{c as t,h as n,n as r,o as i,t as a,u as o}from"./models-DuCVW_cU.js";import{n as s}from"./headers-FK4rgixo.js";import{s as c}from"./constrained-sampling-DA0j0g9I.js";import{t as l}from"./sanitize-unicode-DmIE6hZJ.js";import{r as u}from"./transform-messages-HTSSP3zz.js";import{n as d,t as f}from"./error-body-pkrba6pf.js";import{a as p,c as m,d as h,f as g,i as _,l as v,m as y,n as b,o as x,p as S,r as C,s as w,t as T,u as E}from"./google-shared-BmjkwexI.js";var D=0,O=(t,n,r)=>{let o=new e,s=i(n);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:`pending`,timestamp:Date.now()};try{if(r?.fetch&&r.fetch!==globalThis.fetch)throw Error(`Custom fetch is not supported by the Google Generative AI adapter`);let n=r?.apiKey;if(!n)throw Error(`No API key for provider: ${t.provider}`);let i=A(t,n,r?.headers),c=j(t,s,r),l=await r?.onPayload?.(c,t);l!==void 0&&(c=l);let u=await v(()=>i.models.generateContentStream(c),r);o.push({type:`start`,partial:e});let d=null,f=e.content,h=()=>f.length-1;for await(let n of u){await r?.onProviderStreamEvent?.(n,t),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=_(t);(!d||n&&d.type!==`thinking`||!n&&d.type!==`text`)&&(d&&(d.type===`text`?o.push({type:`text_end`,contentIndex:f.length-1,content:d.text,partial:e}):o.push({type:`thinking_end`,contentIndex:h(),content:d.thinking,partial:e})),n?(d={type:`thinking`,thinking:``,thinkingSignature:void 0},e.content.push(d),o.push({type:`thinking_start`,contentIndex:h(),partial:e})):(d={type:`text`,text:``},e.content.push(d),o.push({type:`text_start`,contentIndex:h(),partial:e}))),d.type===`thinking`?(d.thinking+=t.text,d.thinkingSignature=m(d.thinkingSignature,t.thoughtSignature),o.push({type:`thinking_delta`,contentIndex:h(),delta:t.text,partial:e})):(d.text+=t.text,d.textSignature=m(d.textSignature,t.thoughtSignature),o.push({type:`text_delta`,contentIndex:h(),delta:t.text,partial:e}))}if(t.functionCall){d&&=(d.type===`text`?o.push({type:`text_end`,contentIndex:h(),content:d.text,partial:e}):o.push({type:`thinking_end`,contentIndex:h(),content:d.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()}_${++D}`:n,name:t.functionCall.name||``,arguments:t.functionCall.args??{},...t.thoughtSignature&&{thoughtSignature:t.thoughtSignature}};e.content.push(r),o.push({type:`toolcall_start`,contentIndex:h(),partial:e}),o.push({type:`toolcall_delta`,contentIndex:h(),delta:JSON.stringify(r.arguments),partial:e}),o.push({type:`toolcall_end`,contentIndex:h(),toolCall:r,partial:e})}}i?.finishReason&&(e.rawStopReason=i.finishReason,e.stopReason=p(i.finishReason),e.content.some(e=>e.type===`toolCall`)&&e.stopReason===`stop`&&(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,reasoning:n.usageMetadata.thoughtsTokenCount||0,totalTokens:n.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},a(t,e.usage))}if(d&&(d.type===`text`?o.push({type:`text_end`,contentIndex:h(),content:d.text,partial:e}):o.push({type:`thinking_end`,contentIndex:h(),content:d.thinking,partial:e})),r?.signal?.aborted)throw Error(`Request was aborted`);if(e.stopReason===`pending`)throw Error(`Google stream ended without a finish reason`);if(e.stopReason===`aborted`||e.stopReason===`error`){let t=e.rawStopReason?`Provider stopped with: ${e.rawStopReason}`:`An unknown error occurred`;throw Error(t)}o.push({type:`done`,reason:e.stopReason,message:e}),o.end()}catch(t){for(let t of e.content)`index`in t&&delete t.index;e.stopReason=r?.signal?.aborted?`aborted`:`error`,e.errorMessage=f(d(t)),o.push({type:`error`,reason:e.stopReason,error:e}),o.end()}})(),o},k=(e,t,n)=>{let i=n?.apiKey;if(!i)throw Error(`No API key for provider: ${e.provider}`);let a={...u(e,t,n,i),toolChoice:n?.toolChoice};if(!n?.reasoning)return O(e,t,{...a,thinking:{enabled:!1}});let o=r(e,n.reasoning);if(o===`off`)return O(e,t,{...a,thinking:{enabled:!1}});let s=w(e,o);return S(e)?O(e,t,{...a,thinking:{enabled:!0,level:g(s)}}):O(e,t,{...a,thinking:{enabled:!0,budgetTokens:M(e,s,n.thinkingBudgets)}})};function A(e,t,n){let r={};e.baseUrl&&(r.baseUrl=e.baseUrl,r.apiVersion=``);let i=s({"User-Agent":c(),...e.headers,...n});return i&&(r.headers=i),new y({apiKey:t,httpOptions:Object.keys(r).length>0?r:void 0})}function j(e,r,i={}){let a=T(e,r),s=o(r.messages),c=t(r.messages),u={};i.temperature!==void 0&&(u.temperature=i.temperature),i.maxTokens!==void 0&&(u.maxOutputTokens=i.maxTokens);let d=E(e.id),f=c.length>0?x(c,i.toolChoice,d):void 0,p=s?n(s):``,m={...Object.keys(u).length>0&&u,...p&&{systemInstruction:l(p)},...c.length>0&&{tools:b(c,!1,d)},...f!==void 0&&{toolConfig:{functionCallingConfig:{mode:f}}}};if(i.thinking?.enabled&&e.reasoning){let e={includeThoughts:!0};i.thinking.level===void 0?i.thinking.budgetTokens!==void 0&&(e.thinkingBudget=i.thinking.budgetTokens):e.thinkingLevel=h(i.thinking.level),m.thinkingConfig=e}else e.reasoning&&i.thinking&&!i.thinking.enabled&&(m.thinkingConfig=C(e));if(i.signal){if(i.signal.aborted)throw Error(`Request aborted`);m.abortSignal=i.signal}return{model:e.id,contents:a,config:m}}function M(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{O as stream,k as streamSimple};