MCPcopy Create free account
hub / github.com/ModelEngine-Group/app-platform / getConfiguration

Function getConfiguration

frontend/src/shared/utils/common.ts:414–427  ·  view source on GitHub ↗
(curAppInfo: any)

Source from the content-addressed store, hash-verified

412 * @return {Array} 对话多输入配置
413 */
414export const getConfiguration = (curAppInfo: any) => {
415 if (!curAppInfo?.flowGraph?.appearance) {
416 return [];
417 }
418 const graphOperator = createGraphOperator(JSON.stringify(curAppInfo.flowGraph.appearance));
419 const paramsList = graphOperator.getStartNodeInputParams() || [];
420 if (paramsList?.length !== 1) {
421 Message({ type: 'error', content: i18n.t('startingNodeTip') });
422 return [];
423 }
424 const inputData = find(paramsList[0], ['name', 'input']);
425 const inputList = inputData?.value || [];
426 return filter(inputList, (input) => input.name !== 'Question' && input.isVisible) || [];
427};
428
429/**
430 * 获取应用graph里开始节点的appConfig配置

Callers 2

checkMutipleInputFunction · 0.90

Calls 2

MessageFunction · 0.90
createGraphOperatorFunction · 0.70

Tested by

no test coverage detected