(content: string)
| 447 | } |
| 448 | |
| 449 | function extractExample(content: string): string { |
| 450 | const markers = ['生成示例:\n', '生成示例:\n', '总格式示例:\n', '总格式示例:\n']; |
| 451 | for (const marker of markers) { |
| 452 | const idx = content.indexOf(marker); |
| 453 | if (idx === -1) continue; |
| 454 | const rest = content.slice(idx + marker.length); |
| 455 | const endM = /\n(?:请|注意|在|不要|保持|生成的|禁止|<CG>|如果)/.exec(rest); |
| 456 | const end = endM ? endM.index : rest.length; |
| 457 | const example = rest.slice(0, end).trim(); |
| 458 | if (example) return example; |
| 459 | } |
| 460 | return ''; |
| 461 | } |
| 462 | |
| 463 | // ── App extraction ───────────────────────────────────────────────── |
| 464 |
no outgoing calls
no test coverage detected