@marimo-team/islands 0.19.7-dev37 → 0.19.7-dev39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.19.7-dev37",
3
+ "version": "0.19.7-dev39",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -213,7 +213,7 @@
213
213
  "devDependencies": {
214
214
  "@babel/plugin-proposal-decorators": "^7.28.0",
215
215
  "@babel/preset-typescript": "^7.25.9",
216
- "@biomejs/biome": "2.3.10",
216
+ "@biomejs/biome": "2.3.12",
217
217
  "@codecov/vite-plugin": "^1.9.1",
218
218
  "@csstools/postcss-light-dark-function": "^2.0.11",
219
219
  "@playwright/test": "^1.57.0",
@@ -5,6 +5,7 @@ import {
5
5
  BotIcon,
6
6
  BrainIcon,
7
7
  ChevronRightIcon,
8
+ InfoIcon,
8
9
  PlusIcon,
9
10
  Trash2Icon,
10
11
  } from "lucide-react";
@@ -61,6 +62,7 @@ import {
61
62
  } from "../ui/accordion";
62
63
  import { Button } from "../ui/button";
63
64
  import { Checkbox } from "../ui/checkbox";
65
+ import { DropdownMenuSeparator } from "../ui/dropdown-menu";
64
66
  import { Label } from "../ui/label";
65
67
  import { ExternalLink } from "../ui/links";
66
68
  import {
@@ -272,6 +274,32 @@ export const ModelSelector: React.FC<ModelSelectorProps> = ({
272
274
  placeholder={placeholder}
273
275
  onSelect={selectModel}
274
276
  triggerClassName="text-sm"
277
+ customDropdownContent={
278
+ <>
279
+ <DropdownMenuSeparator />
280
+ <p className="px-2 py-1.5 text-sm text-muted-secondary flex items-center gap-1">
281
+ Enter a custom model
282
+ <Tooltip content="Models should include the provider prefix, e.g. 'openai/gpt-4o'">
283
+ <InfoIcon className="h-3 w-3" />
284
+ </Tooltip>
285
+ </p>
286
+ <div className="px-2 py-1">
287
+ <Input
288
+ className="w-full border-border shadow-none focus-visible:shadow-xs"
289
+ placeholder={placeholder}
290
+ {...field}
291
+ value={asStringOrEmpty(field.value)}
292
+ onKeyDown={Events.stopPropagation()}
293
+ />
294
+ {value && (
295
+ <IncorrectModelId
296
+ value={value}
297
+ includeSuggestion={false}
298
+ />
299
+ )}
300
+ </div>
301
+ </>
302
+ }
275
303
  forRole={forRole}
276
304
  />
277
305
  </FormControl>
@@ -433,7 +433,7 @@ const ChatPanel = () => {
433
433
  return (
434
434
  <PanelEmptyState
435
435
  title="Chat with AI"
436
- description="No AI provider configured or model selected"
436
+ description="No AI provider configured or Chat model not selected"
437
437
  action={
438
438
  <Button
439
439
  variant="outline"
@@ -272,6 +272,7 @@ export const AddCellWithAI: React.FC<{
272
272
  triggerClassName="h-7 text-xs max-w-64"
273
273
  iconSize="small"
274
274
  forRole="edit"
275
+ showAddCustomModelDocs={true}
275
276
  />
276
277
  </div>
277
278
  </div>
@@ -363,6 +363,7 @@ export const AiCompletionEditor: React.FC<Props> = ({
363
363
  iconSize="small"
364
364
  forRole="edit"
365
365
  displayIconOnly={true}
366
+ placeholder="Edit model"
366
367
  />
367
368
  </div>
368
369
  {completion && (
@@ -13,6 +13,7 @@ import {
13
13
  SquareMIcon,
14
14
  } from "lucide-react";
15
15
  import { useEffect } from "react";
16
+ import { useOpenSettingsToTab } from "@/components/app-config/state";
16
17
  import { StartupLogsAlert } from "@/components/editor/alerts/startup-logs-alert";
17
18
  import { Cell } from "@/components/editor/notebook-cell";
18
19
  import { PackageAlert } from "@/components/editor/package-alert";
@@ -253,6 +254,7 @@ const AddCellButtons: React.FC<{
253
254
  const [isAiButtonOpen, isAiButtonOpenActions] = useBoolean(false);
254
255
  const aiEnabled = useAtomValue(aiEnabledAtom);
255
256
  const canInteractWithApp = useAtomValue(canInteractWithAppAtom);
257
+ const { handleClick } = useOpenSettingsToTab();
256
258
 
257
259
  const buttonClass = cn(
258
260
  "mb-0 rounded-none sm:px-4 md:px-5 lg:px-8 tracking-wide no-wrap whitespace-nowrap",
@@ -320,7 +322,9 @@ const AddCellButtons: React.FC<{
320
322
  </Button>
321
323
  <Tooltip
322
324
  content={
323
- aiEnabled ? null : <span>Enable via settings under AI Assist</span>
325
+ aiEnabled ? null : (
326
+ <span>AI provider not found or Edit model not selected</span>
327
+ )
324
328
  }
325
329
  delayDuration={100}
326
330
  asChild={false}
@@ -329,8 +333,12 @@ const AddCellButtons: React.FC<{
329
333
  className={buttonClass}
330
334
  variant="text"
331
335
  size="sm"
332
- disabled={!aiEnabled || !canInteractWithApp}
333
- onClick={isAiButtonOpenActions.toggle}
336
+ disabled={!canInteractWithApp}
337
+ onClick={
338
+ aiEnabled
339
+ ? isAiButtonOpenActions.toggle
340
+ : () => handleClick("ai", "ai-providers")
341
+ }
334
342
  >
335
343
  <SparklesIcon className="mr-2 size-4 shrink-0" />
336
344
  Generate with AI