refac
This commit is contained in:
1 parent
a60d6c316e
commit
2f7120a73a
3 files changed
+29
-4
No files matched your search
@@ -232,8 +232,13 @@
|
||||
|
||||
name = character.name;
|
||||
|
||||
const turndownService = new TurndownService();
|
||||
info.meta.description = turndownService.turndown(character.summary);
|
||||
const pattern = /<\/?[a-z][\s\S]*>/i;
|
||||
if (character.summary.match(pattern)) {
|
||||
const turndownService = new TurndownService();
|
||||
info.meta.description = turndownService.turndown(character.summary);
|
||||
} else {
|
||||
info.meta.description = character.summary;
|
||||
}
|
||||
|
||||
info.params.system = `Personality: ${character.personality}${
|
||||
character?.scenario ? `\nScenario: ${character.scenario}` : ''
|
||||
|
||||
Reference in new issue
Block a user