fix(ui): do not show [prompt] in preset preview

This commit is contained in:
psychedelicious 2024-08-14 12:29:05 +10:00
parent ddeafc6833
commit 5c37391883

View File

@ -8,7 +8,7 @@ export const getViewModeChunks = (currentPrompt: string, presetPrompt?: string):
const [before, after] = presetPrompt.split(PRESET_PLACEHOLDER, 2);
if (!before || !after) {
return ['', `${currentPrompt} `, presetPrompt];
return ['', `${currentPrompt} `, before || after || ''];
}
return [before ?? '', currentPrompt, after ?? ''];