@blocklet/pages-kit-block-studio 0.5.47 → 0.5.49

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.
@@ -39,7 +39,6 @@ exports.generatePageDataJsonSchemasWithZod = generatePageDataJsonSchemasWithZod;
39
39
  exports.generatePageDataTypesWithZod = generatePageDataTypesWithZod;
40
40
  exports.generatePropertiesTypesWithZod = generatePropertiesTypesWithZod;
41
41
  exports.generatePageDataZodToAgent = generatePageDataZodToAgent;
42
- // 导入 Zod 工具集
43
42
  const page_model_1 = require("@blocklet/pages-kit/utils/page-model");
44
43
  const property_1 = require("@blocklet/pages-kit/utils/property");
45
44
  const zod_1 = require("zod");
@@ -524,7 +523,11 @@ function generatePageDataZodToAgent(state, pageId) {
524
523
  const zodSchema = (0, zod_utils_1.propertiesToZodSchema)(component.properties || {}, {
525
524
  addZodDescribe: false,
526
525
  skipAnyType: true,
527
- llmConfig: section.llmConfig?.properties || {},
526
+ /**
527
+ * @tip 历史原因:section.llmConfig 是在页面模板配置的,component.llmConfig 是在组件配置的,存在一定的优先级关系
528
+ * section.llmConfig > component.llmConfig
529
+ */
530
+ llmConfig: section.llmConfig?.properties || component.llmConfig?.properties || {},
528
531
  });
529
532
  // 添加section描述
530
533
  sectionSchemas[sectionName] = zodSchema.describe(section.templateDescription || '');