@arcote.tech/arc-ai-gemini 0.7.26 → 0.7.27

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.ts +13 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcote.tech/arc-ai-gemini",
3
3
  "type": "module",
4
- "version": "0.7.26",
4
+ "version": "0.7.27",
5
5
  "private": false,
6
6
  "description": "Gemini (Google) adapter for Arc AI framework",
7
7
  "main": "./src/index.ts",
@@ -10,7 +10,7 @@
10
10
  "type-check": "tsc --noEmit"
11
11
  },
12
12
  "peerDependencies": {
13
- "@arcote.tech/arc-ai": "^0.7.26",
13
+ "@arcote.tech/arc-ai": "^0.7.27",
14
14
  "typescript": "^5.0.0"
15
15
  },
16
16
  "devDependencies": {
package/src/index.ts CHANGED
@@ -251,7 +251,7 @@ export function gemini(config: GeminiConfig): LLMProvider {
251
251
  } else {
252
252
  blocks.push({ type: "text", text: part.text });
253
253
  }
254
- onChunk({ type: "content_delta", content: part.text });
254
+ onChunk({ type: "text_delta", textDelta: part.text });
255
255
  } else if (part.functionCall) {
256
256
  const tc: ToolCall = {
257
257
  id: generateToolCallId(),
@@ -264,7 +264,18 @@ export function gemini(config: GeminiConfig): LLMProvider {
264
264
  name: tc.name,
265
265
  arguments: tc.arguments,
266
266
  });
267
- onChunk({ type: "tool_call_start", toolCall: tc });
267
+ // Gemini daje pełny functionCall od razu — emitujemy kanoniczną
268
+ // sekwencję (started + arguments_complete), jak openai/claude.
269
+ onChunk({
270
+ type: "tool_call_started",
271
+ toolCallId: tc.id,
272
+ toolCallName: tc.name,
273
+ });
274
+ onChunk({
275
+ type: "tool_call_arguments_complete",
276
+ toolCallId: tc.id,
277
+ arguments: tc.arguments,
278
+ });
268
279
  }
269
280
  }
270
281