coderio 1.0.1-alpha.2 → 1.0.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.
package/dist/cli.js CHANGED
@@ -475,7 +475,7 @@ var AGENT_CONTEXT_WINDOW_TOKENS = 128e3;
475
475
 
476
476
  // src/cli/init.ts
477
477
  function registerCommands(program) {
478
- const version = false ? "0.0.1" : "1.0.1-alpha.2";
478
+ const version = false ? "0.0.1" : "1.0.1";
479
479
  program.name(CLI_NAME).description(`${CLI_NAME} - Convert Figma designs to code`).version(version, "-v, -V, --version", "Output the version number").showHelpAfterError();
480
480
  }
481
481
 
@@ -1423,10 +1423,13 @@ var FigmaTool = class {
1423
1423
  }
1424
1424
  const document2 = await fetchFigmaNode(fileId, nodeId, token);
1425
1425
  if (!document2 || !document2?.children?.length) {
1426
- return void 0;
1426
+ throw new Error("Failed to fetch Figma document");
1427
1427
  }
1428
1428
  const images = await fetchFigmaImages(fileId, nodeId, token);
1429
1429
  const thumbnail = images?.[nodeId] || "";
1430
+ if (!thumbnail) {
1431
+ throw new Error("Failed to fetch Figma document thumbnail");
1432
+ }
1430
1433
  document2.thumbnailUrl = thumbnail;
1431
1434
  const cleanedDocument = cleanFigma(document2);
1432
1435
  return cleanedDocument;
@@ -6382,10 +6385,6 @@ async function design2code(url, mode) {
6382
6385
  } else {
6383
6386
  logger.printInfoLog("Resuming from cache...");
6384
6387
  }
6385
- await callModel({
6386
- question: "\u8BF7\u4ECB\u7ECD\u4F60\u81EA\u5DF1\uFF0C\u4F60\u662F\u4EC0\u4E48\u6A21\u578B",
6387
- streaming: false
6388
- });
6389
6388
  const graph = new StateGraph(GraphStateAnnotation).addNode("initial" /* INITIAL */, initialProject).addNode("process" /* PROCESS */, generateProtocol).addNode("code" /* CODE */, generateCode).addNode("validation" /* VALIDATION */, runValidation).addEdge(START, "initial" /* INITIAL */).addEdge("initial" /* INITIAL */, "process" /* PROCESS */).addEdge("process" /* PROCESS */, "code" /* CODE */).addEdge("code" /* CODE */, "validation" /* VALIDATION */).addEdge("validation" /* VALIDATION */, END).compile({ checkpointer });
6390
6389
  const config = { configurable: { thread_id: threadId } };
6391
6390
  const validationMode = mode ?? "full" /* Full */;