@ycodium-ai/plugin-office 0.2.5448 → 0.2.5542

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/dist/index.js +6 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import * as NodePath5 from "node:path";
3
3
  import { definePlugin } from "@ycodium-ai/plugin-api";
4
4
 
5
5
  // ../../packages/plugin-api/src/version.ts
6
- var PLUGIN_API_VERSION = 171;
6
+ var PLUGIN_API_VERSION = 174;
7
7
 
8
8
  // src/paths.ts
9
9
  import * as NodeFSP from "node:fs/promises";
@@ -823,7 +823,7 @@ Do not retry with another renderer; report the failure.`,
823
823
  true
824
824
  );
825
825
  var CJK_WARNING = "Warning: bundled Chinese fonts are missing or damaged, so CJK text may be drawn as boxes. Do not judge the layout from these images. Restore the complete Ycodium installation from an offline installer.";
826
- var missingFontsLine = (fonts) => fonts === void 0 || fonts.length === 0 ? "Missing fonts: none." : `Missing fonts (substituted): ${fonts.join(", ")}.`;
826
+ var missingFontsLine = (fonts) => fonts === void 0 ? "Font substitution was not reported by the engine." : fonts.length === 0 ? "Missing fonts: none." : `Missing fonts (substituted): ${fonts.join(", ")}.`;
827
827
  var readImages = async (invocation, images) => {
828
828
  const workspace = invocation.workspace;
829
829
  if (workspace === void 0) return [];
@@ -907,6 +907,7 @@ var render = (deps) => ({
907
907
  const images = result.images ?? [];
908
908
  const absoluteSource = NodePath4.resolve(cwd, source);
909
909
  const warn = !await machineHasCjkFont(deps.process, deps.paths, deps.target) && await documentHasCjk(invocation, absoluteSource) === true;
910
+ const attached = await readImages(invocation, images);
910
911
  const lines = [
911
912
  ...warn ? [CJK_WARNING] : [],
912
913
  `Rendered ${source} with the ${result.backend ?? "bundled"} engine: ${String(result.pageCount ?? images.length)} page(s) in the document, ${String(images.length)} image(s) written.`,
@@ -914,12 +915,12 @@ var render = (deps) => ({
914
915
  ...images.map(
915
916
  (image) => `- page ${String(image.page ?? "?")}: ${relativeTo(cwd, image.path)}${image.width === void 0 ? "" : ` (${String(image.width)}x${String(image.height)})`}`
916
917
  ),
917
- ...images.length > MAX_IMAGES ? [
918
- `Only the first ${String(MAX_IMAGES)} images are attached; the rest are at the paths above.`
918
+ ...attached.length < images.length ? [
919
+ `${attached.length} of ${images.length} images attached. Use the paths above to inspect individual pages.`
919
920
  ] : [],
920
921
  missingFontsLine(result.missingFonts)
921
922
  ];
922
- return { text: lines.join("\n"), images: await readImages(invocation, images) };
923
+ return { text: lines.join("\n"), images: attached };
923
924
  }
924
925
  });
925
926
  var convertLike = (deps, spec) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/plugin-office",
3
- "version": "0.2.5448",
3
+ "version": "0.2.5542",
4
4
  "description": "Lets agents create, check, and render Word, PowerPoint, and Excel files, and previews Office files in the app.",
5
5
  "keywords": [
6
6
  "docx",
@@ -29,7 +29,7 @@
29
29
  "esbuild": "0.28.1",
30
30
  "typescript": "~6.0.3",
31
31
  "vite-plus": "0.2.2",
32
- "@ycodium-ai/plugin-api": "0.2.0"
32
+ "@ycodium-ai/plugin-api": "0.2.5542"
33
33
  },
34
34
  "ycodium": {
35
35
  "plugin": "./dist/index.js",