@marimo-team/islands 0.25.3-dev364 → 0.25.3-dev366
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-DGucd81N.js → ConnectedDataExplorerComponent-BzohsNSl.js} +9 -9
- package/dist/{ErrorBoundary-DwFWzyKY.js → ErrorBoundary-CfsFx-lV.js} +6 -6
- package/dist/{abnfDiagram-VCTEODGH-Dm3v1B8V.js → abnfDiagram-VCTEODGH-ChqGZ2ry.js} +2 -2
- package/dist/{any-language-editor-CuJ_HsCB.js → any-language-editor-jTRRyM00.js} +2 -2
- package/dist/{architectureDiagram-5GKGNRK7-DpbaviJn.js → architectureDiagram-5GKGNRK7-CnN59kY1.js} +1 -1
- package/dist/{assertNever-BCN-4W77.js → assertNever-C77RgMvO.js} +2 -2
- package/dist/assets/__vite-browser-external-C5NhJPNJ.js +1 -0
- package/dist/assets/{worker-D9NGcZWK.js → worker-D-n8vtGi.js} +2 -2
- package/dist/{chat-ui-DFu6TtNT.js → chat-ui-DfIJW9DA.js} +12 -12
- package/dist/{check-Cp78nuZm.js → check-BTtJ1HuS.js} +1 -1
- package/dist/{chunk-IMKFNOWR-BC0YdYLD.js → chunk-IMKFNOWR-DW_he6xH.js} +1 -1
- package/dist/{chunk-SHT3W25Y-D-4QYbSe.js → chunk-SHT3W25Y-rRSc_SiF.js} +1 -1
- package/dist/{chunk-SVP7TREG-D4hMfbCn.js → chunk-SVP7TREG-B_G3ACtc.js} +1 -1
- package/dist/{chunk-TICWLB2K-BYsR3p13.js → chunk-TICWLB2K-Bdqk9L9O.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-C5ajJVPv.js → classDiagram-ZZMXUADV-bkoIJ4ZI.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-B78-nsX1.js → classDiagram-v2-VYDZK3BY-QvUGvghM.js} +2 -2
- package/dist/{code-visibility-B3Ynn3tA.js → code-visibility-MxQYdRUh.js} +5 -5
- package/dist/{common-CPWE33MJ.js → common-9V-3fSE5.js} +19 -19
- package/dist/{config-C5m1QxBa.js → config-D9r7V8wm.js} +3 -3
- package/dist/{copy-icon-C88pF7Yd.js → copy-icon-AmDlztRw.js} +2 -2
- package/dist/{createReducer-CX4_c88Z.js → createReducer-iKO-TaDo.js} +1 -1
- package/dist/{cynefinDiagram-5FMLGOSQ-DKMYKL7e.js → cynefinDiagram-5FMLGOSQ-BtDkWTBE.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-Cpk3cN6x.js → dagre-GXQ25YYZ-D0at1MO5.js} +1 -1
- package/dist/{data-grid-overlay-editor-BDy-Vbn6.js → data-grid-overlay-editor-CZOSayn7.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-DJI8j406.js → diagram-S7CK7UJ4-DeEaMqSV.js} +1 -1
- package/dist/{diagram-UQ7AKVKN--t6Sxm0L.js → diagram-UQ7AKVKN-BbRfuaEy.js} +1 -1
- package/dist/{diagram-VX7I27RA-CAEWfMi4.js → diagram-VX7I27RA-B4Wp-rDT.js} +1 -1
- package/dist/{diagram-Z3DM3KII-CCN5pOhw.js → diagram-Z3DM3KII-C_ae4cSF.js} +1 -1
- package/dist/{dialog-BYBmCjb1.js → dialog-Daog9NU1.js} +2 -2
- package/dist/{dropdown-menu-DoF-TLG-.js → dropdown-menu-CnoeAarE.js} +5 -5
- package/dist/{ebnfDiagram-PWID7BFC-DHf-SOQy.js → ebnfDiagram-PWID7BFC-BPTzY6rk.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-COlDd7VM.js → erDiagram-RLTQ6QDP-udqrzZ59.js} +1 -1
- package/dist/{error-banner-S4nxZ1uN.js → error-banner-ChszWQ3h.js} +1 -1
- package/dist/{error-entries-BRiOHm8G.js → error-entries-IU7i5tD8.js} +8 -8
- package/dist/{feedback-button-DVRUQ5IB.js → feedback-button-BJJEOprl.js} +8 -8
- package/dist/{flowDiagram-HODETNUW-CaxmYPMr.js → flowDiagram-HODETNUW-CU1S_qjB.js} +2 -2
- package/dist/{formats-gmuMlaye.js → formats-B85hYR8d.js} +1 -1
- package/dist/{glide-data-editor-BZgEHiYU.js → glide-data-editor-L6Y6rHai.js} +11 -11
- package/dist/{glide-utils-D_0KwKFV.js → glide-utils-DPwU6aTw.js} +2 -2
- package/dist/{globals-C_vrn7LH.js → globals-D6mNwlGK.js} +3 -3
- package/dist/{html-to-image-D0LFfNxI.js → html-to-image-BiNaAyYX.js} +13 -13
- package/dist/{infoDiagram-27XIBGKW-CcN7bG0a.js → infoDiagram-27XIBGKW-DKkp_SC7.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-BeH0vKCR.js → ishikawaDiagram-5VMMS53U-C_TlrS-s.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-CHogPzKj.js → kanban-definition-UXKFOSKX-CoqGlHyo.js} +1 -1
- package/dist/main.js +31 -31
- package/dist/{mermaid-DGjcwa4y.js → mermaid-DD6lvLSi.js} +34 -34
- package/dist/{mindmap-definition-YA3MSWOX-TaohGCOq.js → mindmap-definition-YA3MSWOX-DQ3RIRq_.js} +1 -1
- package/dist/{number-overlay-editor-CWYBaOD2.js → number-overlay-editor-1j5KGNcX.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-B1LREJhD.js → pegDiagram-XKGWAZYB-DjP6v_UE.js} +2 -2
- package/dist/{pencil-DPoayiEc.js → pencil-YvDg98Vt.js} +1 -1
- package/dist/{pieDiagram-E7YTZNPT-kioJVzp8.js → pieDiagram-E7YTZNPT-Cq2pOY9y.js} +1 -1
- package/dist/{process-output-DLM5_K3W.js → process-output-BA7BGk1s.js} +4 -4
- package/dist/{railroadDiagram-O6MQD6OU-Pma-byb8.js → railroadDiagram-O6MQD6OU-BgTlJnKs.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-DzuAdFbY.js → requirementDiagram-BXWQKSXE-ZJoJ9EfE.js} +1 -1
- package/dist/{reveal-component-lqW70UaO.js → reveal-component-DvIssIBk.js} +8 -8
- package/dist/{select-0c6X5K-y.js → select-BoGBoXrZ.js} +4 -4
- package/dist/{sequenceDiagram-WJ2MYXX4-Ci2zhlHg.js → sequenceDiagram-WJ2MYXX4-BJvdtgI2.js} +1 -1
- package/dist/{spec-C1iS9GEg.js → spec-C7YYRfV5.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-Bi2orLYz.js → stateDiagram-D77RDMKH-UBhd6uK-.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-Bb6bmuGa.js → stateDiagram-v2-MP3YSRHH-Cx2Xr13h.js} +2 -2
- package/dist/{static-state-C-NJXwup.js → static-state-Dn05_alZ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-B9OnmhxQ.js → swimlanes-42K2YHIH-uVbva14y.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-Vq_2vH42.js → swimlanesDiagram-VR7AAH4N-D2gn-4Ks.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-DXd0exhe.js → timeline-definition-24CTP7MA-DmIHJmrk.js} +1 -1
- package/dist/{toast-BvfR_w3m.js → toast-CXcT9TJm.js} +3 -3
- package/dist/{tooltip-DVVHv-uw.js → tooltip-DbRnGlK2.js} +1 -1
- package/dist/{use-restore-focus-92n9XpFH.js → use-restore-focus-hhbpbJwV.js} +5 -6
- package/dist/{useDateFormatter-BBJOPClo.js → useDateFormatter-BhUfu7Zv.js} +2 -2
- package/dist/{useDeepCompareMemoize-Ccv-X_CO.js → useDeepCompareMemoize-Crc0VFdZ.js} +1 -1
- package/dist/{useLifecycle-BIzIKY46.js → useLifecycle-BCXa5UQv.js} +1 -1
- package/dist/{vega-component-Co5N151m.js → vega-component-DqWRZerK.js} +6 -6
- package/dist/{vennDiagram-4TSXK5OY-CBa_ZCXA.js → vennDiagram-4TSXK5OY-BYps24XX.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-DTsYwYF5.js → wardleyDiagram-VM6X3IG4-eJTaJjCK.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-DBhQEWyP.js → xychartDiagram-S5SC5T6Z-DUHbPn-K.js} +1 -1
- package/package.json +1 -2
- package/src/components/app-config/ai-config.tsx +52 -34
- package/src/components/app-config/model-discovery.tsx +223 -0
- package/src/components/app-config/state.ts +2 -0
- package/src/components/app-config/user-config-form.tsx +12 -1
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +0 -2
- package/src/core/cells/__tests__/cells.test.ts +0 -1
- package/src/core/cells/__tests__/harness.ts +0 -1
- package/src/core/codemirror/__tests__/format.test.ts +0 -1
- package/src/core/codemirror/__tests__/setup.test.ts +0 -1
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +0 -2
- package/src/core/codemirror/copilot/extension.ts +0 -26
- package/src/core/codemirror/language/__tests__/extension.test.ts +0 -2
- package/src/core/codemirror/language/__tests__/utils.test.ts +0 -2
- package/src/core/config/__tests__/config-schema.test.ts +18 -0
- package/src/core/config/config-schema.ts +6 -2
- package/src/core/islands/stubs/slide-cell-view.tsx +2 -5
- package/src/core/notebook/document/__tests__/codemirror.test.ts +0 -1
- package/src/css/app/codemirror.css +0 -31
- package/src/stories/editor.stories.tsx +0 -1
- package/src/stories/theme.stories.tsx +0 -1
- package/dist/assets/__vite-browser-external-Ci3vRqC9.js +0 -1
|
@@ -9,7 +9,7 @@ import "./chunk-4HAMMTFA-qKgadZwy.js";
|
|
|
9
9
|
import "./chunk-GVQU2GXP-BkolpSXU.js";
|
|
10
10
|
import "./chunk-L3NEJ4N5-B-BFQp9t.js";
|
|
11
11
|
import { o as n } from "./chunk-OSK3NFVY-BzfZ4VBG.js";
|
|
12
|
-
import { c as r } from "./mermaid-
|
|
12
|
+
import { c as r } from "./mermaid-DD6lvLSi.js";
|
|
13
13
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/swimlanes-42K2YHIH.mjs
|
|
14
14
|
var i = 5, a = 1e-5, o = 1e-6;
|
|
15
15
|
function s(e) {
|
package/dist/{swimlanesDiagram-VR7AAH4N-Vq_2vH42.js → swimlanesDiagram-VR7AAH4N-D2gn-4Ks.js}
RENAMED
|
@@ -9,11 +9,11 @@ import "./chunk-4HAMMTFA-qKgadZwy.js";
|
|
|
9
9
|
import "./chunk-GVQU2GXP-BkolpSXU.js";
|
|
10
10
|
import "./chunk-L3NEJ4N5-B-BFQp9t.js";
|
|
11
11
|
import "./chunk-OSK3NFVY-BzfZ4VBG.js";
|
|
12
|
-
import "./mermaid-
|
|
12
|
+
import "./mermaid-DD6lvLSi.js";
|
|
13
13
|
import "./chunk-F27PBJKO-COH2t-FO.js";
|
|
14
14
|
import "./chunk-XXDRQBXY-BM-YIt-_.js";
|
|
15
15
|
import "./chunk-POPQ4Y6H-BFSZel4w.js";
|
|
16
|
-
import { r as t, t as n } from "./chunk-SHT3W25Y-
|
|
16
|
+
import { r as t, t as n } from "./chunk-SHT3W25Y-rRSc_SiF.js";
|
|
17
17
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-VR7AAH4N.mjs
|
|
18
18
|
var r = n({
|
|
19
19
|
defaultLayout: "swimlane",
|
package/dist/{timeline-definition-24CTP7MA-DXd0exhe.js → timeline-definition-24CTP7MA-DmIHJmrk.js}
RENAMED
|
@@ -3,7 +3,7 @@ import { p as t } from "./chunk-75Z2AOVW-76L6My3P.js";
|
|
|
3
3
|
import { n, t as r } from "./src-D5uZaZib.js";
|
|
4
4
|
import { n as i, t as a } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
5
5
|
import { $ as o, J as s, a as c, b as l, et as u, nt as d, o as f, x as p } from "./chunk-DU6HZSFF-4SDIhUTY.js";
|
|
6
|
-
import { p as m } from "./mermaid-
|
|
6
|
+
import { p as m } from "./mermaid-DD6lvLSi.js";
|
|
7
7
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-24CTP7MA.mjs
|
|
8
8
|
var h = (function() {
|
|
9
9
|
var e = /* @__PURE__ */ i(function(e, t, n, r) {
|
|
@@ -2,11 +2,11 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { h as t, p as n, r } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as i } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as a } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { m as o } from "./tooltip-
|
|
6
|
-
import { a as s, s as c } from "./assertNever-
|
|
5
|
+
import { m as o } from "./tooltip-DbRnGlK2.js";
|
|
6
|
+
import { a as s, s as c } from "./assertNever-C77RgMvO.js";
|
|
7
7
|
import { t as l } from "./react-dom-DdqGVp5N.js";
|
|
8
8
|
import { t as u } from "./jsx-runtime-D8btoEHk.js";
|
|
9
|
-
import { $t as d, an as f, cn as p, dn as m, fn as h, in as g, ln as _, mn as ee, on as v, pn as y, un as b } from "./use-restore-focus-
|
|
9
|
+
import { $t as d, an as f, cn as p, dn as m, fn as h, in as g, ln as _, mn as ee, on as v, pn as y, un as b } from "./use-restore-focus-hhbpbJwV.js";
|
|
10
10
|
//#region ../node_modules/.pnpm/@radix-ui+react-toast@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@1_72d2e12f1af98becc17c9660ff8081b2/node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
11
11
|
var x = /* @__PURE__ */ e(i(), 1), te = /* @__PURE__ */ e(l(), 1), S = u(), C = Object.defineProperty, w = (e, t) => C(e, "name", {
|
|
12
12
|
value: t,
|
|
@@ -4,7 +4,7 @@ import { t as i } from "./react-Bgs_wQh3.js";
|
|
|
4
4
|
import { t as a } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { t as o } from "./react-dom-DdqGVp5N.js";
|
|
6
6
|
import { t as s } from "./jsx-runtime-D8btoEHk.js";
|
|
7
|
-
import { $t as c, cn as l, dn as u, fn as d, in as f, l as p, ln as m, nn as h, o as g, on as _, pn as v, s as y, sn as b, un as x } from "./use-restore-focus-
|
|
7
|
+
import { $t as c, cn as l, dn as u, fn as d, in as f, l as p, ln as m, nn as h, o as g, on as _, pn as v, s as y, sn as b, un as x } from "./use-restore-focus-hhbpbJwV.js";
|
|
8
8
|
//#region ../node_modules/.pnpm/lucide-react@0.577.0_react@19.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
9
9
|
var S = /* @__PURE__ */ e(i()), C = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), w = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), T = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), E = (e) => {
|
|
10
10
|
let t = T(e);
|
|
@@ -7102,12 +7102,11 @@ var Pm = [
|
|
|
7102
7102
|
activate_on_typing: J().prefault(!0),
|
|
7103
7103
|
signature_hint_on_typing: J().prefault(!1),
|
|
7104
7104
|
auto_close_pairs: J().prefault(!0),
|
|
7105
|
-
copilot: Kp([
|
|
7106
|
-
|
|
7107
|
-
"
|
|
7108
|
-
"
|
|
7109
|
-
])
|
|
7110
|
-
codeium_api_key: K().nullish()
|
|
7105
|
+
copilot: Kp([
|
|
7106
|
+
J(),
|
|
7107
|
+
Z(["github", "custom"]),
|
|
7108
|
+
rm("codeium").transform(() => !1)
|
|
7109
|
+
]).prefault(!1).transform((e) => e === !0 ? "github" : e)
|
|
7111
7110
|
}).prefault({}),
|
|
7112
7111
|
save: X({
|
|
7113
7112
|
autosave: Z(["off", "after_delay"]).prefault("after_delay"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
|
-
import { h as n } from "./tooltip-
|
|
4
|
-
import { C as r } from "./select-
|
|
3
|
+
import { h as n } from "./tooltip-DbRnGlK2.js";
|
|
4
|
+
import { C as r } from "./select-BoGBoXrZ.js";
|
|
5
5
|
var i = n("chart-pie", [["path", {
|
|
6
6
|
d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",
|
|
7
7
|
key: "pzmjnu"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
|
-
import { jt as n } from "./use-restore-focus-
|
|
3
|
+
import { jt as n } from "./use-restore-focus-hhbpbJwV.js";
|
|
4
4
|
//#region src/hooks/useDeepCompareMemoize.ts
|
|
5
5
|
var r = /* @__PURE__ */ e(t(), 1);
|
|
6
6
|
function i(e) {
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { h as t, r as n } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as r } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as i } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { h as a } from "./tooltip-
|
|
5
|
+
import { h as a } from "./tooltip-DbRnGlK2.js";
|
|
6
6
|
import { t as o } from "./jsx-runtime-D8btoEHk.js";
|
|
7
7
|
var s = a("calendar", [
|
|
8
8
|
["path", {
|
|
@@ -2,22 +2,22 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { g as t, h as n, m as r, s as i } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as a } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as o } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { t as s } from "./tooltip-
|
|
6
|
-
import { l as c, t as l } from "./config-
|
|
5
|
+
import { t as s } from "./tooltip-DbRnGlK2.js";
|
|
6
|
+
import { l as c, t as l } from "./config-D9r7V8wm.js";
|
|
7
7
|
import { t as u } from "./jsx-runtime-D8btoEHk.js";
|
|
8
|
-
import { d } from "./use-restore-focus-
|
|
9
|
-
import { n as f } from "./error-banner-
|
|
8
|
+
import { d } from "./use-restore-focus-hhbpbJwV.js";
|
|
9
|
+
import { n as f } from "./error-banner-ChszWQ3h.js";
|
|
10
10
|
import { t as p } from "./debounce-DrhhziJv.js";
|
|
11
11
|
import { t as ee } from "./objects-DCmMvZtn.js";
|
|
12
12
|
import { t as te } from "./useEvent-BoN7U38T.js";
|
|
13
|
-
import { a as ne, i as re, n as ie, t as m } from "./formats-
|
|
13
|
+
import { a as ne, i as re, n as ie, t as m } from "./formats-B85hYR8d.js";
|
|
14
14
|
import { a as h, t as g } from "./arrays-DoQ-AILx.js";
|
|
15
15
|
import { t as ae } from "./useAsyncData-P5-Oovhq.js";
|
|
16
16
|
import { t as _ } from "./semaphore-8KhQouXt.js";
|
|
17
17
|
import { W as oe, n as se } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
18
18
|
import { t as ce } from "./react-vega-CGgQEf0O.js";
|
|
19
19
|
import { a as le, n as v } from "./loader-Bin_dutt.js";
|
|
20
|
-
import { t as ue } from "./useDeepCompareMemoize-
|
|
20
|
+
import { t as ue } from "./useDeepCompareMemoize-Crc0VFdZ.js";
|
|
21
21
|
import { t as de } from "./use-vega-container-remeasure-BrUpWQfF.js";
|
|
22
22
|
//#region src/plugins/impl/vega/fix-relative-url.ts
|
|
23
23
|
var fe = /* @__PURE__ */ e(a(), 1), pe = o();
|
|
@@ -3,7 +3,7 @@ import { t } from "./src-D5uZaZib.js";
|
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
4
|
import { $ as r, H as i, K as a, U as o, a as s, b as c, c as l, et as u, f as d, nt as f, tt as p, v as m, w as h, y as g } from "./chunk-DU6HZSFF-4SDIhUTY.js";
|
|
5
5
|
import { t as _ } from "./rough.esm-CtV9AnV1.js";
|
|
6
|
-
import { p as v } from "./mermaid-
|
|
6
|
+
import { p as v } from "./mermaid-DD6lvLSi.js";
|
|
7
7
|
//#region ../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/transparentize.js
|
|
8
8
|
var y = (e, t) => p(e, "a", -t), b = 1e-10;
|
|
9
9
|
function x(e, t) {
|
|
@@ -2,7 +2,7 @@ import { i as e } from "./chunk-75Z2AOVW-76L6My3P.js";
|
|
|
2
2
|
import { n as t } from "./src-D5uZaZib.js";
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
4
|
import { D as r, H as i, K as a, U as o, a as s, b as c, c as l, v as u, w as d, x as f, y as p } from "./chunk-DU6HZSFF-4SDIhUTY.js";
|
|
5
|
-
import { p as m } from "./mermaid-
|
|
5
|
+
import { p as m } from "./mermaid-DD6lvLSi.js";
|
|
6
6
|
import { n as h } from "./mermaid-parser.core-DtOnl7m4.js";
|
|
7
7
|
import { t as g } from "./chunk-JWPE2WC7-DJvv1t8U.js";
|
|
8
8
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-VM6X3IG4.mjs
|
|
@@ -9,7 +9,7 @@ import { n as s } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
|
9
9
|
import { D as c, H as l, K as u, U as d, a as f, b as p, c as m, f as h, v as g, w as _, y as v, z as y } from "./chunk-DU6HZSFF-4SDIhUTY.js";
|
|
10
10
|
import "./chunk-PWAF6VOD-CRu_RGP2.js";
|
|
11
11
|
import { t as b } from "./chunk-GMAD6QVW-BJGF8QZL.js";
|
|
12
|
-
import { p as x } from "./mermaid-
|
|
12
|
+
import { p as x } from "./mermaid-DD6lvLSi.js";
|
|
13
13
|
//#region ../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js
|
|
14
14
|
function S() {
|
|
15
15
|
var e = t().unknown(void 0), r = e.domain, i = e.range, o = 0, s = 1, c, l, u = !1, d = 0, f = 0, p = .5;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marimo-team/islands",
|
|
3
|
-
"version": "0.25.3-
|
|
3
|
+
"version": "0.25.3-dev366",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
"@uiw/react-codemirror": "4.25.12",
|
|
83
83
|
"@uiw/react-json-view": "2.0.0-alpha.44",
|
|
84
84
|
"@uwdata/flechette": "^1.1.2",
|
|
85
|
-
"@valtown/codemirror-codeium": "^1.1.1",
|
|
86
85
|
"@xterm/addon-attach": "^0.12.0",
|
|
87
86
|
"@xterm/addon-canvas": "^0.7.0",
|
|
88
87
|
"@xterm/addon-fit": "^0.11.0",
|
|
@@ -84,6 +84,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs";
|
|
|
84
84
|
import { Tooltip } from "../ui/tooltip";
|
|
85
85
|
import { formItemClasses, SettingSubtitle } from "./common";
|
|
86
86
|
import { AWS_REGIONS } from "./constants";
|
|
87
|
+
import { ModelDiscovery } from "./model-discovery";
|
|
87
88
|
import { IncorrectModelId } from "./incorrect-model-id";
|
|
88
89
|
import {
|
|
89
90
|
IsOverridden,
|
|
@@ -91,7 +92,7 @@ import {
|
|
|
91
92
|
useConfigOverride,
|
|
92
93
|
} from "./is-overridden";
|
|
93
94
|
import { MCPConfig } from "./mcp-config";
|
|
94
|
-
import { aiSettingsSubTabAtom } from "./state";
|
|
95
|
+
import { aiSettingsSubTabAtom, pendingConfigSavesAtom } from "./state";
|
|
95
96
|
|
|
96
97
|
interface AiConfigProps {
|
|
97
98
|
form: UseFormReturn<UserConfig>;
|
|
@@ -415,27 +416,6 @@ const renderCopilotProvider = ({
|
|
|
415
416
|
return null;
|
|
416
417
|
}
|
|
417
418
|
|
|
418
|
-
if (copilot === "codeium") {
|
|
419
|
-
return (
|
|
420
|
-
<>
|
|
421
|
-
<p className="text-sm text-muted-secondary">
|
|
422
|
-
To get a Windsurf API key, follow{" "}
|
|
423
|
-
<ExternalLink href="https://docs.marimo.io/guides/editor_features/ai_completion.html#windsurf-copilot">
|
|
424
|
-
these instructions
|
|
425
|
-
</ExternalLink>
|
|
426
|
-
.
|
|
427
|
-
</p>
|
|
428
|
-
<ApiKey
|
|
429
|
-
form={form}
|
|
430
|
-
config={config}
|
|
431
|
-
name="completion.codeium_api_key"
|
|
432
|
-
placeholder="key"
|
|
433
|
-
testId="codeium-api-key-input"
|
|
434
|
-
/>
|
|
435
|
-
</>
|
|
436
|
-
);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
419
|
if (copilot === "github") {
|
|
440
420
|
return <CopilotConfig />;
|
|
441
421
|
}
|
|
@@ -573,9 +553,9 @@ export const AiCodeCompletionConfig: React.FC<AiConfigProps> = ({
|
|
|
573
553
|
form={form}
|
|
574
554
|
config={config}
|
|
575
555
|
name="completion.copilot"
|
|
576
|
-
options={["none", "github", "
|
|
556
|
+
options={["none", "github", "custom"]}
|
|
577
557
|
testId="copilot-select"
|
|
578
|
-
description="Choose GitHub Copilot
|
|
558
|
+
description="Choose GitHub Copilot or a custom provider (such as Ollama) to enable AI-powered code completion."
|
|
579
559
|
/>
|
|
580
560
|
|
|
581
561
|
{renderCopilotProvider({ form, config, onSubmit, copilot })}
|
|
@@ -1555,6 +1535,7 @@ const ProviderTreeItem: React.FC<ProviderTreeItemProps> = ({
|
|
|
1555
1535
|
|
|
1556
1536
|
export const AiModelDisplayConfig: React.FC<AiConfigProps> = ({
|
|
1557
1537
|
form,
|
|
1538
|
+
config,
|
|
1558
1539
|
onSubmit,
|
|
1559
1540
|
}) => {
|
|
1560
1541
|
const resolvedAi = useAtomValue(resolvedMarimoConfigAtom).ai;
|
|
@@ -1676,6 +1657,7 @@ export const AiModelDisplayConfig: React.FC<AiConfigProps> = ({
|
|
|
1676
1657
|
</div>
|
|
1677
1658
|
<AddModelForm
|
|
1678
1659
|
form={form}
|
|
1660
|
+
config={config}
|
|
1679
1661
|
customModels={customModels}
|
|
1680
1662
|
customProviderNames={customProviderNames}
|
|
1681
1663
|
onSubmit={onSubmit}
|
|
@@ -1686,10 +1668,11 @@ export const AiModelDisplayConfig: React.FC<AiConfigProps> = ({
|
|
|
1686
1668
|
|
|
1687
1669
|
export const AddModelForm: React.FC<{
|
|
1688
1670
|
form: UseFormReturn<UserConfig>;
|
|
1671
|
+
config: UserConfig;
|
|
1689
1672
|
customModels: QualifiedModelId[];
|
|
1690
1673
|
customProviderNames: string[];
|
|
1691
1674
|
onSubmit: (values: UserConfig) => void;
|
|
1692
|
-
}> = ({ form, customModels, customProviderNames, onSubmit }) => {
|
|
1675
|
+
}> = ({ form, config, customModels, customProviderNames, onSubmit }) => {
|
|
1693
1676
|
const [isFormOpen, setIsFormOpen] = useState(false);
|
|
1694
1677
|
const [modelAdded, setModelAdded] = useState(false);
|
|
1695
1678
|
const [provider, setProvider] = useState<ProviderId | "custom" | null>(null);
|
|
@@ -1702,6 +1685,18 @@ export const AddModelForm: React.FC<{
|
|
|
1702
1685
|
|
|
1703
1686
|
const isCustomProvider = provider === "custom";
|
|
1704
1687
|
const providerName = isCustomProvider ? customProviderName : provider;
|
|
1688
|
+
const canDiscoverModels =
|
|
1689
|
+
!!providerName &&
|
|
1690
|
+
(providerName === "openrouter" ||
|
|
1691
|
+
customProviderNames.includes(providerName));
|
|
1692
|
+
const configurationPending = useAtomValue(pendingConfigSavesAtom) > 0;
|
|
1693
|
+
const savedProviderConfig =
|
|
1694
|
+
providerName === "openrouter"
|
|
1695
|
+
? config.ai?.openrouter
|
|
1696
|
+
: providerName
|
|
1697
|
+
? config.ai?.custom_providers?.[providerName]
|
|
1698
|
+
: undefined;
|
|
1699
|
+
const configurationKey = JSON.stringify(savedProviderConfig ?? null);
|
|
1705
1700
|
const hasValidValues = providerName?.trim() && modelName?.trim();
|
|
1706
1701
|
|
|
1707
1702
|
const resetForm = () => {
|
|
@@ -1749,7 +1744,10 @@ export const AddModelForm: React.FC<{
|
|
|
1749
1744
|
</Label>
|
|
1750
1745
|
<Select
|
|
1751
1746
|
value={provider || ""}
|
|
1752
|
-
onValueChange={(v) =>
|
|
1747
|
+
onValueChange={(v) => {
|
|
1748
|
+
setProvider(v as ProviderId | "custom");
|
|
1749
|
+
setModelName("");
|
|
1750
|
+
}}
|
|
1753
1751
|
>
|
|
1754
1752
|
<SelectTrigger id={providerSelectId} className={providerClassName}>
|
|
1755
1753
|
{provider ? (
|
|
@@ -1846,18 +1844,38 @@ export const AddModelForm: React.FC<{
|
|
|
1846
1844
|
>
|
|
1847
1845
|
Model
|
|
1848
1846
|
</Label>
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1847
|
+
{canDiscoverModels && providerName ? (
|
|
1848
|
+
<ModelDiscovery
|
|
1849
|
+
key={providerName}
|
|
1850
|
+
provider={providerName}
|
|
1851
|
+
label="Model"
|
|
1852
|
+
configurationKey={configurationKey}
|
|
1853
|
+
configurationPending={configurationPending}
|
|
1854
|
+
inputId={modelNameInputId}
|
|
1855
|
+
inputClassName="text-xs mb-0"
|
|
1856
|
+
value={modelName}
|
|
1857
|
+
onValueChange={setModelName}
|
|
1858
|
+
/>
|
|
1859
|
+
) : (
|
|
1860
|
+
<Input
|
|
1861
|
+
id={modelNameInputId}
|
|
1862
|
+
value={modelName}
|
|
1863
|
+
onChange={(e) => setModelName(e.target.value)}
|
|
1864
|
+
placeholder="gpt-5.6-sol"
|
|
1865
|
+
className="text-xs mb-0"
|
|
1866
|
+
/>
|
|
1867
|
+
)}
|
|
1856
1868
|
</div>
|
|
1857
1869
|
);
|
|
1858
1870
|
|
|
1859
1871
|
const inputForm = (
|
|
1860
|
-
<div
|
|
1872
|
+
<div
|
|
1873
|
+
className={cn(
|
|
1874
|
+
"flex items-center gap-3 p-3 border border-border rounded-md",
|
|
1875
|
+
canDiscoverModels &&
|
|
1876
|
+
"relative pb-12 [&_[data-testid^='model-discovery-']>button]:absolute [&_[data-testid^='model-discovery-']>button]:right-3 [&_[data-testid^='model-discovery-']>button]:bottom-3",
|
|
1877
|
+
)}
|
|
1878
|
+
>
|
|
1861
1879
|
{providerSelect}
|
|
1862
1880
|
{modelInput}
|
|
1863
1881
|
<div
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { API } from "@/core/network/api";
|
|
6
|
+
import { getRuntimeManager } from "@/core/runtime/config";
|
|
7
|
+
import { isWasm } from "@/core/wasm/utils";
|
|
8
|
+
import { Button } from "../ui/button";
|
|
9
|
+
import { Input } from "../ui/input";
|
|
10
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
11
|
+
import { Popover, PopoverContent } from "../ui/popover";
|
|
12
|
+
|
|
13
|
+
const CatalogSchema = z.object({
|
|
14
|
+
models: z.array(z.object({ id: z.string().min(1), name: z.string() })),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
interface ModelDiscoveryProps {
|
|
18
|
+
provider: string;
|
|
19
|
+
label: string;
|
|
20
|
+
configurationKey: string;
|
|
21
|
+
configurationPending: boolean;
|
|
22
|
+
onSelect?: (modelId: string) => void;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
value?: string;
|
|
25
|
+
onValueChange?: (value: string) => void;
|
|
26
|
+
inputId?: string;
|
|
27
|
+
inputClassName?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function ModelDiscovery({
|
|
31
|
+
provider,
|
|
32
|
+
label,
|
|
33
|
+
configurationKey,
|
|
34
|
+
configurationPending,
|
|
35
|
+
onSelect,
|
|
36
|
+
disabled = false,
|
|
37
|
+
value,
|
|
38
|
+
onValueChange,
|
|
39
|
+
inputId,
|
|
40
|
+
inputClassName,
|
|
41
|
+
}: ModelDiscoveryProps) {
|
|
42
|
+
const [models, setModels] = useState<z.infer<typeof CatalogSchema>["models"]>(
|
|
43
|
+
[],
|
|
44
|
+
);
|
|
45
|
+
const [query, setQuery] = useState("");
|
|
46
|
+
const inputRef = useRef<HTMLInputElement | null>(null);
|
|
47
|
+
const [loading, setLoading] = useState(false);
|
|
48
|
+
const [loaded, setLoaded] = useState(false);
|
|
49
|
+
const [error, setError] = useState("");
|
|
50
|
+
const [open, setOpen] = useState(false);
|
|
51
|
+
const requestRef = useRef<AbortController | null>(null);
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
requestRef.current?.abort();
|
|
55
|
+
setModels([]);
|
|
56
|
+
setQuery("");
|
|
57
|
+
setOpen(false);
|
|
58
|
+
setLoaded(false);
|
|
59
|
+
setLoading(false);
|
|
60
|
+
setError("");
|
|
61
|
+
return () => requestRef.current?.abort();
|
|
62
|
+
}, [provider, configurationKey]);
|
|
63
|
+
|
|
64
|
+
const search = (value ?? query).trim().toLowerCase();
|
|
65
|
+
const filtered = models.filter((model) =>
|
|
66
|
+
`${model.name} ${model.id}`.toLowerCase().includes(search),
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
const load = async () => {
|
|
70
|
+
requestRef.current?.abort();
|
|
71
|
+
const controller = new AbortController();
|
|
72
|
+
requestRef.current = controller;
|
|
73
|
+
setLoading(true);
|
|
74
|
+
setError("");
|
|
75
|
+
try {
|
|
76
|
+
const url = getRuntimeManager().httpURL;
|
|
77
|
+
url.search = "";
|
|
78
|
+
url.hash = "";
|
|
79
|
+
url.pathname = `${url.pathname.replace(/\/$/, "")}/api/ai/models/${encodeURIComponent(provider)}`;
|
|
80
|
+
const response = await fetch(url.toString(), {
|
|
81
|
+
headers: API.headers(),
|
|
82
|
+
signal: controller.signal,
|
|
83
|
+
});
|
|
84
|
+
if (!response.ok) {
|
|
85
|
+
const raw = await response.text();
|
|
86
|
+
let detail = "";
|
|
87
|
+
|
|
88
|
+
try {
|
|
89
|
+
const parsed = z
|
|
90
|
+
.object({ detail: z.string() })
|
|
91
|
+
.safeParse(JSON.parse(raw));
|
|
92
|
+
|
|
93
|
+
detail = parsed.success ? parsed.data.detail : "";
|
|
94
|
+
} catch {
|
|
95
|
+
// The backend may return a non-JSON error response.
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (!controller.signal.aborted) {
|
|
99
|
+
setError(
|
|
100
|
+
detail ||
|
|
101
|
+
"Unable to load the provider model catalog. Check the connection and retry.",
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const catalog = CatalogSchema.parse(await response.json());
|
|
108
|
+
if (controller.signal.aborted) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
setModels(catalog.models);
|
|
112
|
+
setLoaded(true);
|
|
113
|
+
setOpen(true);
|
|
114
|
+
} catch {
|
|
115
|
+
if (!controller.signal.aborted) {
|
|
116
|
+
setError(
|
|
117
|
+
"Unable to load a valid catalog. Check the connection and retry.",
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
} finally {
|
|
121
|
+
if (!controller.signal.aborted) {
|
|
122
|
+
setLoading(false);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<div
|
|
129
|
+
className="flex flex-col gap-2 sm:flex-row sm:items-end sm:gap-4"
|
|
130
|
+
data-testid={`model-discovery-${provider}`}
|
|
131
|
+
>
|
|
132
|
+
<div className="relative min-w-0 flex-1">
|
|
133
|
+
<Popover open={open && loaded} onOpenChange={setOpen}>
|
|
134
|
+
<PopoverPrimitive.Anchor asChild>
|
|
135
|
+
<div>
|
|
136
|
+
<Input
|
|
137
|
+
ref={inputRef}
|
|
138
|
+
id={inputId}
|
|
139
|
+
className={inputClassName ?? "w-full"}
|
|
140
|
+
aria-label={label}
|
|
141
|
+
aria-haspopup="dialog"
|
|
142
|
+
aria-expanded={open && loaded}
|
|
143
|
+
placeholder="Type a model ID or search…"
|
|
144
|
+
value={value ?? query}
|
|
145
|
+
onChange={(event) => {
|
|
146
|
+
setQuery(event.target.value);
|
|
147
|
+
onValueChange?.(event.target.value);
|
|
148
|
+
setOpen(true);
|
|
149
|
+
}}
|
|
150
|
+
onFocus={() => setOpen(true)}
|
|
151
|
+
onKeyDown={(event) => {
|
|
152
|
+
if (event.key === "Escape") {
|
|
153
|
+
setOpen(false);
|
|
154
|
+
}
|
|
155
|
+
if (event.key === "Enter") {
|
|
156
|
+
event.preventDefault();
|
|
157
|
+
}
|
|
158
|
+
if (event.key === "ArrowDown" && loaded) {
|
|
159
|
+
event.preventDefault();
|
|
160
|
+
setOpen(true);
|
|
161
|
+
}
|
|
162
|
+
}}
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
</PopoverPrimitive.Anchor>
|
|
166
|
+
<PopoverContent
|
|
167
|
+
align="start"
|
|
168
|
+
className="w-[var(--radix-popover-trigger-width)] min-w-64 max-w-[calc(100vw-2rem)] p-1 text-sm"
|
|
169
|
+
style={{
|
|
170
|
+
maxHeight:
|
|
171
|
+
"min(18rem, var(--radix-popover-content-available-height))",
|
|
172
|
+
overflowY: "auto",
|
|
173
|
+
}}
|
|
174
|
+
onOpenAutoFocus={(event) => event.preventDefault()}
|
|
175
|
+
onCloseAutoFocus={(event) => event.preventDefault()}
|
|
176
|
+
onInteractOutside={(event) => {
|
|
177
|
+
if (event.target === inputRef.current) {
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
}
|
|
180
|
+
}}
|
|
181
|
+
>
|
|
182
|
+
{filtered.length === 0 ? (
|
|
183
|
+
<p className="px-2 py-1">No models found</p>
|
|
184
|
+
) : (
|
|
185
|
+
filtered.map((model) => (
|
|
186
|
+
<button
|
|
187
|
+
type="button"
|
|
188
|
+
key={model.id}
|
|
189
|
+
className="block w-full cursor-pointer rounded-sm px-2 py-1 text-left hover:bg-accent focus:bg-accent focus:outline-hidden"
|
|
190
|
+
onClick={() => {
|
|
191
|
+
setQuery(model.id);
|
|
192
|
+
onValueChange?.(model.id);
|
|
193
|
+
setOpen(false);
|
|
194
|
+
onSelect?.(model.id);
|
|
195
|
+
inputRef.current?.focus();
|
|
196
|
+
setOpen(false);
|
|
197
|
+
}}
|
|
198
|
+
>
|
|
199
|
+
{model.name} — {model.id}
|
|
200
|
+
</button>
|
|
201
|
+
))
|
|
202
|
+
)}
|
|
203
|
+
</PopoverContent>
|
|
204
|
+
</Popover>
|
|
205
|
+
{error && (
|
|
206
|
+
<p role="alert" className="mt-1 text-sm text-destructive">
|
|
207
|
+
{error}
|
|
208
|
+
</p>
|
|
209
|
+
)}
|
|
210
|
+
</div>
|
|
211
|
+
<Button
|
|
212
|
+
type="button"
|
|
213
|
+
variant="outline"
|
|
214
|
+
size="xs"
|
|
215
|
+
className="self-start sm:self-end"
|
|
216
|
+
disabled={disabled || loading || configurationPending || isWasm()}
|
|
217
|
+
onClick={load}
|
|
218
|
+
>
|
|
219
|
+
{loading ? "Loading models…" : "Search available models"}
|
|
220
|
+
</Button>
|
|
221
|
+
</div>
|
|
222
|
+
);
|
|
223
|
+
}
|
|
@@ -10,6 +10,8 @@ export const aiSettingsSubTabAtom = atom<AiSettingsSubTab>("ai-features");
|
|
|
10
10
|
|
|
11
11
|
export const settingDialogAtom = atom<boolean>(false);
|
|
12
12
|
|
|
13
|
+
export const pendingConfigSavesAtom = atom<number>(0);
|
|
14
|
+
|
|
13
15
|
export function useOpenSettingsToTab() {
|
|
14
16
|
const setActiveCategory = useSetAtom(activeUserConfigCategoryAtom);
|
|
15
17
|
const setSettingsDialog = useSetAtom(settingDialogAtom);
|
|
@@ -48,6 +48,7 @@ import { Badge } from "../ui/badge";
|
|
|
48
48
|
import { ExternalLink } from "../ui/links";
|
|
49
49
|
import { Tooltip } from "../ui/tooltip";
|
|
50
50
|
import { AiConfig } from "./ai-config";
|
|
51
|
+
import { pendingConfigSavesAtom } from "./state";
|
|
51
52
|
import { formItemClasses, SettingGroup } from "./common";
|
|
52
53
|
import { DataForm } from "./data-form";
|
|
53
54
|
import { applyManualInjections, getDirtyValues } from "./get-dirty-values";
|
|
@@ -127,6 +128,7 @@ export const UserConfigForm: React.FC = () => {
|
|
|
127
128
|
const marimoVersion = useAtomValue(marimoVersionAtom);
|
|
128
129
|
const { locale } = useLocale();
|
|
129
130
|
const { saveUserConfig } = useRequestClient();
|
|
131
|
+
const setPendingConfigSaves = useSetAtom(pendingConfigSavesAtom);
|
|
130
132
|
|
|
131
133
|
// Create form
|
|
132
134
|
const form = useForm({
|
|
@@ -184,7 +186,16 @@ export const UserConfigForm: React.FC = () => {
|
|
|
184
186
|
// overwriting newer config changes.
|
|
185
187
|
setConfig((prev) => mergeConfig(prev, dirtyValues));
|
|
186
188
|
};
|
|
187
|
-
const onSubmit = useDebouncedCallback(
|
|
189
|
+
const onSubmit = useDebouncedCallback((values: UserConfig) => {
|
|
190
|
+
const save = onSubmitNotDebounced(values);
|
|
191
|
+
|
|
192
|
+
setPendingConfigSaves((count) => count + 1);
|
|
193
|
+
void save
|
|
194
|
+
.finally(() => {
|
|
195
|
+
setPendingConfigSaves((count) => Math.max(0, count - 1));
|
|
196
|
+
})
|
|
197
|
+
.catch(() => undefined);
|
|
198
|
+
}, FORM_DEBOUNCE);
|
|
188
199
|
|
|
189
200
|
const isWasmRuntime = isWasm();
|
|
190
201
|
const getOverride = useConfigOverride();
|
|
@@ -41,7 +41,6 @@ function createMockEditorView(code: string): EditorView {
|
|
|
41
41
|
copilot: false,
|
|
42
42
|
activate_on_typing: true,
|
|
43
43
|
signature_hint_on_typing: false,
|
|
44
|
-
codeium_api_key: null,
|
|
45
44
|
},
|
|
46
45
|
hotkeys: new OverridingHotkeyProvider({}),
|
|
47
46
|
placeholderType: "marimo-import",
|
|
@@ -54,7 +53,6 @@ function createMockEditorView(code: string): EditorView {
|
|
|
54
53
|
copilot: false,
|
|
55
54
|
activate_on_typing: true,
|
|
56
55
|
signature_hint_on_typing: false,
|
|
57
|
-
codeium_api_key: null,
|
|
58
56
|
},
|
|
59
57
|
hotkeys: new OverridingHotkeyProvider({}),
|
|
60
58
|
placeholderType: "marimo-import",
|