@@ -76,7 +76,7 @@ public class AppImExportUtil {
7676 private static final String [] APP_BUILT_TYPE_SET = {"basic" , "workflow" };
7777 private static final String [] APP_CATEGORY_SET = {"chatbot" , "workflow" , "agent" };
7878 private static final String [] APP_TYPE_SET = {"app" , "waterflow" , "template" };
79- private static final String [] APP_ATTR_DEFAULT_SET = {"icon" , "greeting" , " description" , "name " };
79+ private static final String [] APP_ATTR_DEFAULT_SET = {"icon" , "description" };
8080
8181 /**
8282 * 将 {@link AppBuilderApp} 转换为 {@link AppExportApp}。
@@ -396,7 +396,7 @@ public static AppBuilderApp convertToAppBuilderApp(AppExportDto appExportDto, Op
396396 AppBuilderConfig config = convertToAppBuilderConfig (appExportDto .getConfig (), context );
397397 AppBuilderFlowGraph flowGraph = convertToAppBuilderFlowGraph (appExportDto .getFlowGraph (), context );
398398 appExportApp .getAttributes ().put ("icon" , "" );
399- resetAppAttributes (appExportApp );
399+ appExportApp . setAttributes ( resetAppAttributes (appExportApp . getAttributes ()) );
400400 return AppBuilderApp .builder ()
401401 .createBy (context .getOperator ())
402402 .config (config )
@@ -429,10 +429,15 @@ public static List<AppBuilderFormProperty> getFormProperties(List<AppBuilderConf
429429 .collect (Collectors .toList ());
430430 }
431431
432- private static void resetAppAttributes (AppExportApp importedApp ) {
433- Map <String , Object > attributes = Stream .of (APP_ATTR_DEFAULT_SET )
434- .collect (Collectors .toMap (Function .identity (), importedApp .getAttributes ()::get ));
435- importedApp .setAttributes (attributes );
432+ /**
433+ * 将应用属性重置为预定义的默认属性集,仅保留输入参数与默认集。
434+ *
435+ * @param attributes 表示导入应用属性的 {@link Map}{@code <}{@link String}{@code , }{@link Object}{@code >}。
436+ * @return 表示重置后应用属性的 {@link Map}{@code <}{@link String}{@code , }{@link Object}{@code >}。
437+ */
438+ public static Map <String , Object > resetAppAttributes (Map <String , Object > attributes ) {
439+ return Stream .of (APP_ATTR_DEFAULT_SET )
440+ .collect (Collectors .toMap (Function .identity (), attributes ::get ));
436441 }
437442
438443 /**
0 commit comments