From 71ef6099a8d839a9066ff1be3ae9f08d1dd978ed Mon Sep 17 00:00:00 2001 From: kwaroran Date: Sun, 8 Dec 2024 22:21:59 +0900 Subject: [PATCH] Refactor preset chain name parsing to split by commas and trim whitespace --- src/ts/process/index.svelte.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts/process/index.svelte.ts b/src/ts/process/index.svelte.ts index 718023cf..9fac0a04 100644 --- a/src/ts/process/index.svelte.ts +++ b/src/ts/process/index.svelte.ts @@ -110,7 +110,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{ doingChat.set(true) if(chatProcessIndex === -1 && DBState.db.presetChain){ - const names = DBState.db.presetChain.split(' ') + const names = DBState.db.presetChain.split(',').map((v) => v.trim()) const randomSelect = Math.floor(Math.random() * names.length) const ele = names[randomSelect]