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

Function getOptions

agent-flow/src/components/start/Memory.jsx:114–138  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

112 }
113
114 const getOptions = (config) => {
115 const defaultOptions = [
116 { value: 'ByConversationTurn', label: '按对话轮次' },
117 // 430演示大模型选项不需要按条数、按Token大小、按时间,暂时屏蔽
118 // { value: 'ByNumber', label: '按条数' },
119 // { value: 'ByTokenSize', label: '按Token大小' },
120 // { value: 'ByTime', label: '按时间' },
121 // { value: 'Customizing', label: '自定义' },
122 { value: 'NotUseMemory', label: '不使用历史记录' }
123 ];
124
125 // 如果 config 或 config.params 为空,设置默认 type 为 'app'
126 const type = config?.params?.type || 'app';
127
128 // 根据 type 返回不同的 options
129 switch (type) {
130 case FLOW_TYPE.WORK_FLOW:
131 return [
132 ...defaultOptions,
133 { value: 'UserSelect', label: '用户自勾选' }
134 ];
135 default:
136 return defaultOptions;
137 }
138 }
139
140 return (<>
141 <JadeStopPropagationSelect

Callers 3

MemoryFunction · 0.70
JadeScrollSelectFunction · 0.50
TreeTitleFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected