MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / detectFormatType

Function detectFormatType

apps/webuiapps/src/lib/cardExtractor.ts:442–447  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

440// ── Format & example ──────────────────────────────────────────────
441
442function detectFormatType(content: string): string {
443 if (/\[(语音中|视频中|通话结束)\|/.test(content)) return 'bracket';
444 const tagRe = new RegExp(`<${TAG_NAME_PATTERN}+>.*</${TAG_NAME_PATTERN}+>`, 'u');
445 if (tagRe.test(content)) return 'xml';
446 return 'prose';
447}
448
449function extractExample(content: string): string {
450 const markers = ['生成示例:\n', '生成示例:\n', '总格式示例:\n', '总格式示例:\n'];

Callers 1

extractAppsFromEntriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected