Commit 2972774d authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac

parent 64b6a8c5
......@@ -327,6 +327,9 @@
chatTextAreaElement.style.height = '';
}
const _files = JSON.parse(JSON.stringify(files));
files = [];
prompt = '';
// Create user message
......@@ -338,7 +341,7 @@
role: 'user',
user: _user ?? undefined,
content: userPrompt,
files: files.length > 0 ? files : undefined,
files: _files.length > 0 ? _files : undefined,
timestamp: Math.floor(Date.now() / 1000), // Unix epoch
models: selectedModels.filter((m, mIdx) => selectedModels.indexOf(m) === mIdx)
};
......@@ -378,9 +381,6 @@
}
await tick();
}
files = [];
// Send prompt
_responses = await sendPrompt(userPrompt, userMessageId);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment