@molecule/api-ai-moonshot 1.1.0 → 1.1.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,UAAU,EAOX,MAAM,kBAAkB,CAAA;AASzB,OAAO,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AA8oBhD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,UAAU,CAElE"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,UAAU,EAOX,MAAM,kBAAkB,CAAA;AASzB,OAAO,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAkpBhD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,UAAU,CAElE"}
package/dist/provider.js CHANGED
@@ -314,6 +314,11 @@ class MoonshotAIProvider {
314
314
  for (const tr of toolResults) {
315
315
  formatted.push(tr);
316
316
  }
317
+ // Non-tool parts of the SAME message (an image riding a tool result — the
318
+ // screenshot tool) must not be dropped: Chat Completions accepts a user
319
+ // message after the tool messages, so emit them instead of losing them.
320
+ if (parts.length > 0)
321
+ formatted.push({ role: m.role, content: parts });
317
322
  }
318
323
  else if (toolCalls.length > 0) {
319
324
  // Assistant message with tool calls — replay reasoning_content so
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@molecule/api-ai-moonshot",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Moonshot (Kimi) AI provider for molecule.dev",
5
+ "homepage": "https://www.molecule.dev/packages/api-ai-moonshot",
5
6
  "type": "module",
6
7
  "main": "dist/index.js",
7
8
  "types": "dist/index.d.ts",
@@ -33,11 +34,11 @@
33
34
  "directory": "packages/api/bonds/ai/moonshot"
34
35
  },
35
36
  "devDependencies": {
36
- "@molecule/api-ai": "1.2.0",
37
- "@molecule/api-bond": "1.0.1",
37
+ "@molecule/api-ai": "1.3.0",
38
+ "@molecule/api-bond": "1.0.2",
38
39
  "@types/node": "26.1.2",
39
40
  "typescript": "6.0.3",
40
- "vitest": "4.1.10"
41
+ "vitest": "4.1.11"
41
42
  },
42
43
  "peerDependencies": {
43
44
  "@molecule/api-ai": "^1.0.1",