MCPcopy
hub / github.com/modstart-lib/aigcpanel / buildTaskTitle

Function buildTaskTitle

electron/mapi/httpserver/main.ts:165–188  ·  view source on GitHub ↗
(funcName: string, param: any)

Source from the content-addressed store, hash-verified

163};
164
165const buildTaskTitle = (funcName: string, param: any): string => {
166 switch (funcName) {
167 case "soundTts":
168 return param?.text ? String(param.text).slice(0, 20) : "TTS任务";
169 case "soundClone":
170 return param?.text
171 ? String(param.text).slice(0, 20)
172 : "音色克隆任务";
173 case "videoGen":
174 return "AI数字人视频";
175 case "asr":
176 return "ASR识别任务";
177 case "textToImage":
178 return param?.prompt
179 ? String(param.prompt).slice(0, 20)
180 : "文生图任务";
181 case "imageToImage":
182 return param?.prompt
183 ? String(param.prompt).slice(0, 20)
184 : "图生图任务";
185 default:
186 return "任务";
187 }
188};
189
190const sendJson = (res: Response, statusCode: number, data: any) => {
191 res.status(statusCode).json(data);

Callers 1

createAppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected