fix: model bar should be hide correctly

This commit is contained in:
Pionxzh
2023-04-04 14:38:37 +08:00
parent 8c0652d0e9
commit 8b8844b2d3
+2 -5
View File
@@ -21,11 +21,8 @@ export async function exportToPng(fileNameFormat: string) {
const effect = new Effect()
// hide model bar
const modelBar = Array.from(thread.children).find((el) => {
const text = el.textContent
return text === 'Model: Default' || text === 'Model: Legacy' || text === 'Model: GPT-4'
})
if (modelBar) {
const modelBar = thread.firstElementChild
if (modelBar?.textContent?.startsWith('Model:')) {
effect.add(() => {
modelBar.classList.add('hidden')
return () => modelBar.classList.remove('hidden')