@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.
Files changed (97) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DGucd81N.js → ConnectedDataExplorerComponent-BzohsNSl.js} +9 -9
  2. package/dist/{ErrorBoundary-DwFWzyKY.js → ErrorBoundary-CfsFx-lV.js} +6 -6
  3. package/dist/{abnfDiagram-VCTEODGH-Dm3v1B8V.js → abnfDiagram-VCTEODGH-ChqGZ2ry.js} +2 -2
  4. package/dist/{any-language-editor-CuJ_HsCB.js → any-language-editor-jTRRyM00.js} +2 -2
  5. package/dist/{architectureDiagram-5GKGNRK7-DpbaviJn.js → architectureDiagram-5GKGNRK7-CnN59kY1.js} +1 -1
  6. package/dist/{assertNever-BCN-4W77.js → assertNever-C77RgMvO.js} +2 -2
  7. package/dist/assets/__vite-browser-external-C5NhJPNJ.js +1 -0
  8. package/dist/assets/{worker-D9NGcZWK.js → worker-D-n8vtGi.js} +2 -2
  9. package/dist/{chat-ui-DFu6TtNT.js → chat-ui-DfIJW9DA.js} +12 -12
  10. package/dist/{check-Cp78nuZm.js → check-BTtJ1HuS.js} +1 -1
  11. package/dist/{chunk-IMKFNOWR-BC0YdYLD.js → chunk-IMKFNOWR-DW_he6xH.js} +1 -1
  12. package/dist/{chunk-SHT3W25Y-D-4QYbSe.js → chunk-SHT3W25Y-rRSc_SiF.js} +1 -1
  13. package/dist/{chunk-SVP7TREG-D4hMfbCn.js → chunk-SVP7TREG-B_G3ACtc.js} +1 -1
  14. package/dist/{chunk-TICWLB2K-BYsR3p13.js → chunk-TICWLB2K-Bdqk9L9O.js} +1 -1
  15. package/dist/{classDiagram-ZZMXUADV-C5ajJVPv.js → classDiagram-ZZMXUADV-bkoIJ4ZI.js} +2 -2
  16. package/dist/{classDiagram-v2-VYDZK3BY-B78-nsX1.js → classDiagram-v2-VYDZK3BY-QvUGvghM.js} +2 -2
  17. package/dist/{code-visibility-B3Ynn3tA.js → code-visibility-MxQYdRUh.js} +5 -5
  18. package/dist/{common-CPWE33MJ.js → common-9V-3fSE5.js} +19 -19
  19. package/dist/{config-C5m1QxBa.js → config-D9r7V8wm.js} +3 -3
  20. package/dist/{copy-icon-C88pF7Yd.js → copy-icon-AmDlztRw.js} +2 -2
  21. package/dist/{createReducer-CX4_c88Z.js → createReducer-iKO-TaDo.js} +1 -1
  22. package/dist/{cynefinDiagram-5FMLGOSQ-DKMYKL7e.js → cynefinDiagram-5FMLGOSQ-BtDkWTBE.js} +1 -1
  23. package/dist/{dagre-GXQ25YYZ-Cpk3cN6x.js → dagre-GXQ25YYZ-D0at1MO5.js} +1 -1
  24. package/dist/{data-grid-overlay-editor-BDy-Vbn6.js → data-grid-overlay-editor-CZOSayn7.js} +1 -1
  25. package/dist/{diagram-S7CK7UJ4-DJI8j406.js → diagram-S7CK7UJ4-DeEaMqSV.js} +1 -1
  26. package/dist/{diagram-UQ7AKVKN--t6Sxm0L.js → diagram-UQ7AKVKN-BbRfuaEy.js} +1 -1
  27. package/dist/{diagram-VX7I27RA-CAEWfMi4.js → diagram-VX7I27RA-B4Wp-rDT.js} +1 -1
  28. package/dist/{diagram-Z3DM3KII-CCN5pOhw.js → diagram-Z3DM3KII-C_ae4cSF.js} +1 -1
  29. package/dist/{dialog-BYBmCjb1.js → dialog-Daog9NU1.js} +2 -2
  30. package/dist/{dropdown-menu-DoF-TLG-.js → dropdown-menu-CnoeAarE.js} +5 -5
  31. package/dist/{ebnfDiagram-PWID7BFC-DHf-SOQy.js → ebnfDiagram-PWID7BFC-BPTzY6rk.js} +2 -2
  32. package/dist/{erDiagram-RLTQ6QDP-COlDd7VM.js → erDiagram-RLTQ6QDP-udqrzZ59.js} +1 -1
  33. package/dist/{error-banner-S4nxZ1uN.js → error-banner-ChszWQ3h.js} +1 -1
  34. package/dist/{error-entries-BRiOHm8G.js → error-entries-IU7i5tD8.js} +8 -8
  35. package/dist/{feedback-button-DVRUQ5IB.js → feedback-button-BJJEOprl.js} +8 -8
  36. package/dist/{flowDiagram-HODETNUW-CaxmYPMr.js → flowDiagram-HODETNUW-CU1S_qjB.js} +2 -2
  37. package/dist/{formats-gmuMlaye.js → formats-B85hYR8d.js} +1 -1
  38. package/dist/{glide-data-editor-BZgEHiYU.js → glide-data-editor-L6Y6rHai.js} +11 -11
  39. package/dist/{glide-utils-D_0KwKFV.js → glide-utils-DPwU6aTw.js} +2 -2
  40. package/dist/{globals-C_vrn7LH.js → globals-D6mNwlGK.js} +3 -3
  41. package/dist/{html-to-image-D0LFfNxI.js → html-to-image-BiNaAyYX.js} +13 -13
  42. package/dist/{infoDiagram-27XIBGKW-CcN7bG0a.js → infoDiagram-27XIBGKW-DKkp_SC7.js} +1 -1
  43. package/dist/{ishikawaDiagram-5VMMS53U-BeH0vKCR.js → ishikawaDiagram-5VMMS53U-C_TlrS-s.js} +1 -1
  44. package/dist/{kanban-definition-UXKFOSKX-CHogPzKj.js → kanban-definition-UXKFOSKX-CoqGlHyo.js} +1 -1
  45. package/dist/main.js +31 -31
  46. package/dist/{mermaid-DGjcwa4y.js → mermaid-DD6lvLSi.js} +34 -34
  47. package/dist/{mindmap-definition-YA3MSWOX-TaohGCOq.js → mindmap-definition-YA3MSWOX-DQ3RIRq_.js} +1 -1
  48. package/dist/{number-overlay-editor-CWYBaOD2.js → number-overlay-editor-1j5KGNcX.js} +1 -1
  49. package/dist/{pegDiagram-XKGWAZYB-B1LREJhD.js → pegDiagram-XKGWAZYB-DjP6v_UE.js} +2 -2
  50. package/dist/{pencil-DPoayiEc.js → pencil-YvDg98Vt.js} +1 -1
  51. package/dist/{pieDiagram-E7YTZNPT-kioJVzp8.js → pieDiagram-E7YTZNPT-Cq2pOY9y.js} +1 -1
  52. package/dist/{process-output-DLM5_K3W.js → process-output-BA7BGk1s.js} +4 -4
  53. package/dist/{railroadDiagram-O6MQD6OU-Pma-byb8.js → railroadDiagram-O6MQD6OU-BgTlJnKs.js} +2 -2
  54. package/dist/{requirementDiagram-BXWQKSXE-DzuAdFbY.js → requirementDiagram-BXWQKSXE-ZJoJ9EfE.js} +1 -1
  55. package/dist/{reveal-component-lqW70UaO.js → reveal-component-DvIssIBk.js} +8 -8
  56. package/dist/{select-0c6X5K-y.js → select-BoGBoXrZ.js} +4 -4
  57. package/dist/{sequenceDiagram-WJ2MYXX4-Ci2zhlHg.js → sequenceDiagram-WJ2MYXX4-BJvdtgI2.js} +1 -1
  58. package/dist/{spec-C1iS9GEg.js → spec-C7YYRfV5.js} +4 -4
  59. package/dist/{stateDiagram-D77RDMKH-Bi2orLYz.js → stateDiagram-D77RDMKH-UBhd6uK-.js} +2 -2
  60. package/dist/{stateDiagram-v2-MP3YSRHH-Bb6bmuGa.js → stateDiagram-v2-MP3YSRHH-Cx2Xr13h.js} +2 -2
  61. package/dist/{static-state-C-NJXwup.js → static-state-Dn05_alZ.js} +1 -1
  62. package/dist/style.css +1 -1
  63. package/dist/{swimlanes-42K2YHIH-B9OnmhxQ.js → swimlanes-42K2YHIH-uVbva14y.js} +1 -1
  64. package/dist/{swimlanesDiagram-VR7AAH4N-Vq_2vH42.js → swimlanesDiagram-VR7AAH4N-D2gn-4Ks.js} +2 -2
  65. package/dist/{timeline-definition-24CTP7MA-DXd0exhe.js → timeline-definition-24CTP7MA-DmIHJmrk.js} +1 -1
  66. package/dist/{toast-BvfR_w3m.js → toast-CXcT9TJm.js} +3 -3
  67. package/dist/{tooltip-DVVHv-uw.js → tooltip-DbRnGlK2.js} +1 -1
  68. package/dist/{use-restore-focus-92n9XpFH.js → use-restore-focus-hhbpbJwV.js} +5 -6
  69. package/dist/{useDateFormatter-BBJOPClo.js → useDateFormatter-BhUfu7Zv.js} +2 -2
  70. package/dist/{useDeepCompareMemoize-Ccv-X_CO.js → useDeepCompareMemoize-Crc0VFdZ.js} +1 -1
  71. package/dist/{useLifecycle-BIzIKY46.js → useLifecycle-BCXa5UQv.js} +1 -1
  72. package/dist/{vega-component-Co5N151m.js → vega-component-DqWRZerK.js} +6 -6
  73. package/dist/{vennDiagram-4TSXK5OY-CBa_ZCXA.js → vennDiagram-4TSXK5OY-BYps24XX.js} +1 -1
  74. package/dist/{wardleyDiagram-VM6X3IG4-DTsYwYF5.js → wardleyDiagram-VM6X3IG4-eJTaJjCK.js} +1 -1
  75. package/dist/{xychartDiagram-S5SC5T6Z-DBhQEWyP.js → xychartDiagram-S5SC5T6Z-DUHbPn-K.js} +1 -1
  76. package/package.json +1 -2
  77. package/src/components/app-config/ai-config.tsx +52 -34
  78. package/src/components/app-config/model-discovery.tsx +223 -0
  79. package/src/components/app-config/state.ts +2 -0
  80. package/src/components/app-config/user-config-form.tsx +12 -1
  81. package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +0 -2
  82. package/src/core/cells/__tests__/cells.test.ts +0 -1
  83. package/src/core/cells/__tests__/harness.ts +0 -1
  84. package/src/core/codemirror/__tests__/format.test.ts +0 -1
  85. package/src/core/codemirror/__tests__/setup.test.ts +0 -1
  86. package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +0 -2
  87. package/src/core/codemirror/copilot/extension.ts +0 -26
  88. package/src/core/codemirror/language/__tests__/extension.test.ts +0 -2
  89. package/src/core/codemirror/language/__tests__/utils.test.ts +0 -2
  90. package/src/core/config/__tests__/config-schema.test.ts +18 -0
  91. package/src/core/config/config-schema.ts +6 -2
  92. package/src/core/islands/stubs/slide-cell-view.tsx +2 -5
  93. package/src/core/notebook/document/__tests__/codemirror.test.ts +0 -1
  94. package/src/css/app/codemirror.css +0 -31
  95. package/src/stories/editor.stories.tsx +0 -1
  96. package/src/stories/theme.stories.tsx +0 -1
  97. package/dist/assets/__vite-browser-external-Ci3vRqC9.js +0 -1
@@ -55,7 +55,6 @@ function getOpts() {
55
55
  activate_on_typing: false,
56
56
  signature_hint_on_typing: false,
57
57
  copilot: false,
58
- codeium_api_key: null,
59
58
  },
60
59
  keymapConfig: {
61
60
  preset: "default",
@@ -44,7 +44,6 @@ function createMockEditorView(code: string) {
44
44
  copilot: false,
45
45
  activate_on_typing: true,
46
46
  signature_hint_on_typing: false,
47
- codeium_api_key: null,
48
47
  },
49
48
  hotkeys: new OverridingHotkeyProvider({}),
50
49
  placeholderType: "marimo-import",
@@ -57,7 +56,6 @@ function createMockEditorView(code: string) {
57
56
  copilot: false,
58
57
  activate_on_typing: true,
59
58
  signature_hint_on_typing: false,
60
- codeium_api_key: null,
61
59
  },
62
60
  hotkeys: new OverridingHotkeyProvider({}),
63
61
  placeholderType: "marimo-import",
@@ -12,11 +12,6 @@ import {
12
12
  inlineCompletion,
13
13
  rejectInlineCompletion,
14
14
  } from "@marimo-team/codemirror-ai";
15
- import {
16
- copilotPlugin as codeiumCopilotPlugin,
17
- codeiumOtherDocumentsConfig,
18
- Language,
19
- } from "@valtown/codemirror-codeium";
20
15
  import {
21
16
  type InlineCompletionItem,
22
17
  type InlineCompletionList,
@@ -30,7 +25,6 @@ import { Logger } from "@/utils/Logger";
30
25
  import { languageAdapterState } from "../language/extension";
31
26
  import { isInVimMode } from "../utils";
32
27
  import { COPILOT_FILENAME, copilotServer, getCopilotClient } from "./client";
33
- import { getCodes } from "./getCodes";
34
28
  import { isCopilotEnabled } from "./state";
35
29
  import { trimAutocompleteResponse } from "./trim-utils";
36
30
 
@@ -55,26 +49,6 @@ export const copilotBundle = (config: CompletionConfig): Extension => {
55
49
 
56
50
  const extensions: Extension[] = [];
57
51
 
58
- if (config.copilot === "codeium" && config.codeium_api_key) {
59
- extensions.push(
60
- codeiumCopilotPlugin({
61
- apiKey: config.codeium_api_key,
62
- language: Language.PYTHON,
63
- }),
64
- codeiumOtherDocumentsConfig.of({
65
- override: async () => {
66
- return [
67
- {
68
- text: getCodes(""),
69
- language: Language.PYTHON,
70
- editorLanguage: "python",
71
- },
72
- ];
73
- },
74
- }),
75
- );
76
- }
77
-
78
52
  if (config.copilot === "github") {
79
53
  extensions.push(
80
54
  inlineCompletion({
@@ -45,7 +45,6 @@ function createState(content: string, selection?: { anchor: number }) {
45
45
  copilot: false,
46
46
  activate_on_typing: true,
47
47
  signature_hint_on_typing: false,
48
- codeium_api_key: null,
49
48
  },
50
49
  lspConfig: { ...defaultUserConfig().language_servers },
51
50
  hotkeys: new OverridingHotkeyProvider({}),
@@ -58,7 +57,6 @@ function createState(content: string, selection?: { anchor: number }) {
58
57
  copilot: false,
59
58
  activate_on_typing: true,
60
59
  signature_hint_on_typing: false,
61
- codeium_api_key: null,
62
60
  },
63
61
  hotkeys: new OverridingHotkeyProvider({}),
64
62
  placeholderType: "marimo-import",
@@ -38,7 +38,6 @@ function createEditor(doc: string) {
38
38
  activate_on_typing: true,
39
39
  signature_hint_on_typing: false,
40
40
  copilot: false,
41
- codeium_api_key: null,
42
41
  },
43
42
  hotkeys: new OverridingHotkeyProvider({}),
44
43
  cellId: cellId("cell1"),
@@ -52,7 +51,6 @@ function createEditor(doc: string) {
52
51
  activate_on_typing: true,
53
52
  signature_hint_on_typing: false,
54
53
  copilot: false,
55
- codeium_api_key: null,
56
54
  },
57
55
  hotkeys: new OverridingHotkeyProvider({}),
58
56
  placeholderType: "marimo-import",
@@ -16,6 +16,24 @@ import {
16
16
  UserConfigSchema,
17
17
  } from "../config-schema";
18
18
 
19
+ test("legacy Codeium selection disables completion without resetting other settings", () => {
20
+ expect(
21
+ UserConfigSchema.parse({
22
+ completion: {
23
+ copilot: "codeium",
24
+ codeium_api_key: "legacy-secret",
25
+ auto_close_pairs: false,
26
+ },
27
+ display: { theme: "dark" },
28
+ }),
29
+ ).toEqual(
30
+ UserConfigSchema.parse({
31
+ completion: { copilot: false, auto_close_pairs: false },
32
+ display: { theme: "dark" },
33
+ }),
34
+ );
35
+ });
36
+
19
37
  test("legacy Manual config resolves to Read only", () => {
20
38
  const config = UserConfigSchema.parse({ ai: { mode: "manual" } });
21
39
  expect(config).toEqual(UserConfigSchema.parse({ ai: { mode: "ask" } }));
@@ -84,7 +84,12 @@ export const UserConfigSchema = z
84
84
  signature_hint_on_typing: z.boolean().prefault(false),
85
85
  auto_close_pairs: z.boolean().prefault(true),
86
86
  copilot: z
87
- .union([z.boolean(), z.enum(["github", "codeium", "custom"])])
87
+ .union([
88
+ z.boolean(),
89
+ z.enum(["github", "custom"]),
90
+ // Disable legacy Codeium selections without resetting other settings.
91
+ z.literal("codeium").transform(() => false as const),
92
+ ])
88
93
  .prefault(false)
89
94
  .transform((copilot) => {
90
95
  if (copilot === true) {
@@ -92,7 +97,6 @@ export const UserConfigSchema = z
92
97
  }
93
98
  return copilot;
94
99
  }),
95
- codeium_api_key: z.string().nullish(),
96
100
  })
97
101
  .prefault({}),
98
102
  save: z
@@ -9,11 +9,8 @@ import { Logger } from "@/utils/Logger";
9
9
  * off the slides "show code" toggle entirely (see `useNotebookCodeAvailable`
10
10
  * + `isIslands()`), so neither view is reachable at runtime there.
11
11
  *
12
- * Replacing the module at build time keeps the entire CodeMirror /
13
- * Codeium / `@bufbuild/protobuf` import subtree out of the islands bundle,
14
- * which both shrinks the bundle and lets `islands/validate.sh` pass — the
15
- * upstream protobuf code contains a `process.env.BUF_BIGINT_DISABLE`
16
- * runtime check that the validator otherwise flags.
12
+ * Replacing the module at build time keeps the CodeMirror import subtree
13
+ * out of the islands bundle.
17
14
  */
18
15
  export const SlideCellView = (_props: { cell: RuntimeCell }) => {
19
16
  Logger.warn(
@@ -50,7 +50,6 @@ const completionConfig = {
50
50
  activate_on_typing: true,
51
51
  signature_hint_on_typing: false,
52
52
  copilot: false,
53
- codeium_api_key: null,
54
53
  } as const;
55
54
 
56
55
  /** The language configuration a marimo cell editor installs. */
@@ -126,37 +126,6 @@
126
126
  background: var(--gray-3);
127
127
  }
128
128
 
129
- /* -- Codeium -- */
130
-
131
- .cm-codeium-cycle {
132
- font-size: 0.5625rem;
133
- background-color: var(--sky-3);
134
- padding: 2px;
135
- border-radius: 2px;
136
- display: inline-block;
137
- }
138
-
139
- .cm-codeium-cycle-key {
140
- font-size: 0.5625rem;
141
- font-family: monospace;
142
- display: inline-block;
143
- padding: 2px;
144
- border-radius: 2px;
145
- border: none;
146
- background-color: var(--sky-7);
147
- margin-left: 5px;
148
- }
149
-
150
- .cm-codeium-cycle-key:hover {
151
- background-color: var(--sky-9);
152
- }
153
-
154
- .cm-codeium-cycle-explanation {
155
- font-family: monospace;
156
- display: inline-block;
157
- padding: 2px;
158
- }
159
-
160
129
  /* Rename symbol popup (F2). The upstream popup hardcodes white inline styles;
161
130
  override with theme tokens. */
162
131
  .cm-rename-popup {
@@ -97,7 +97,6 @@ export const DefaultPython: Story = {
97
97
  activate_on_typing: true,
98
98
  signature_hint_on_typing: false,
99
99
  copilot: false,
100
- codeium_api_key: null,
101
100
  }),
102
101
  ]}
103
102
  />
@@ -22,7 +22,6 @@ const demoConfig: Partial<CodeMirrorSetupOpts> = {
22
22
  activate_on_typing: false,
23
23
  signature_hint_on_typing: false,
24
24
  copilot: false,
25
- codeium_api_key: null,
26
25
  },
27
26
  hotkeys: new OverridingHotkeyProvider({}),
28
27
  showPlaceholder: false,
@@ -1 +0,0 @@
1
- import{t as e}from"./worker-D9NGcZWK.js";var t=/* @__PURE__ */ e(((e,t)=>{t.exports={}}));export default t();