@marimo-team/islands 0.21.2-dev87 → 0.21.2-dev88

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/main.js CHANGED
@@ -35175,7 +35175,7 @@ ${O}`,
35175
35175
  };
35176
35176
  }
35177
35177
  };
35178
- var LazyChatbot = import_react.lazy(() => import("./chat-ui-BzxT75mg.js").then((e) => ({
35178
+ var LazyChatbot = import_react.lazy(() => import("./chat-ui-hlaluDXt.js").then((e) => ({
35179
35179
  default: e.Chatbot
35180
35180
  }))), messageSchema = array(object({
35181
35181
  id: string(),
@@ -65424,7 +65424,7 @@ ${c}
65424
65424
  return Logger.warn("Failed to get version from mount config"), null;
65425
65425
  }
65426
65426
  }
65427
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-dev87"), showCodeInRunModeAtom = atom(true);
65427
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-dev88"), showCodeInRunModeAtom = atom(true);
65428
65428
  atom(null);
65429
65429
  var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
65430
65430
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.21.2-dev87",
3
+ "version": "0.21.2-dev88",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -21,7 +21,7 @@
21
21
  "./unstable_internal/*": "./src/*"
22
22
  },
23
23
  "dependencies": {
24
- "@ai-sdk/react": "^2.0.125",
24
+ "@ai-sdk/react": "^3.0.131",
25
25
  "@anywidget/types": "^0.2.0",
26
26
  "@codemirror/autocomplete": "^6.20.1",
27
27
  "@codemirror/commands": "^6.10.2",
@@ -115,7 +115,7 @@
115
115
  "@xterm/addon-web-links": "^0.12.0",
116
116
  "@xterm/xterm": "^5.5.0",
117
117
  "@zed-industries/agent-client-protocol": "^0.4.5",
118
- "ai": "^5.0.123",
118
+ "ai": "^6.0.129",
119
119
  "ansi_up": "^6.0.6",
120
120
  "class-variance-authority": "^0.7.1",
121
121
  "clsx": "^2.1.1",
@@ -1,7 +1,12 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
3
  import type { components } from "@marimo-team/marimo-api";
4
- import type { FileUIPart, ToolUIPart, UIMessage } from "ai";
4
+ import type {
5
+ ChatAddToolOutputFunction,
6
+ FileUIPart,
7
+ ToolUIPart,
8
+ UIMessage,
9
+ } from "ai";
5
10
  import { useState } from "react";
6
11
  import useEvent from "react-use-event-hook";
7
12
  import type { ProviderId } from "@/core/ai/ids/ids";
@@ -111,12 +116,6 @@ export async function buildCompletionRequestBody(
111
116
  };
112
117
  }
113
118
 
114
- interface AddToolOutput {
115
- tool: string;
116
- toolCallId: string;
117
- output: unknown;
118
- }
119
-
120
119
  export async function handleToolCall({
121
120
  invokeAiTool,
122
121
  addToolOutput, // Important that we don't await addToolOutput to prevent potential deadlocks
@@ -124,7 +123,7 @@ export async function handleToolCall({
124
123
  toolContext,
125
124
  }: {
126
125
  invokeAiTool: (request: InvokeAiToolRequest) => Promise<InvokeAiToolResponse>;
127
- addToolOutput: (output: AddToolOutput) => Promise<void>;
126
+ addToolOutput: ChatAddToolOutputFunction<UIMessage>;
128
127
  toolCall: {
129
128
  toolName: string;
130
129
  toolCallId: string;
@@ -161,6 +161,12 @@ export function useStagedCells(store: JotaiStore) {
161
161
  case "tool-output-error":
162
162
  Logger.error("Error", chunk.type, { chunk });
163
163
  break;
164
+ case "tool-approval-request":
165
+ Logger.log("Tool approval request", { chunk });
166
+ break;
167
+ case "tool-output-denied":
168
+ Logger.error("Tool output denied", { chunk });
169
+ break;
164
170
  // These logs are not useful for debugging
165
171
  case "start":
166
172
  case "start-step":