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

feat: include files from previous prompts

parent 14226937
...@@ -185,10 +185,10 @@ ...@@ -185,10 +185,10 @@
const sendPrompt = async (prompt, parentId) => { const sendPrompt = async (prompt, parentId) => {
const _chatId = JSON.parse(JSON.stringify($chatId)); const _chatId = JSON.parse(JSON.stringify($chatId));
// TODO: update below to include all ancestral files const docs = messages
.filter((message) => message?.files ?? null)
console.log(history.messages[parentId]); .map((message) => message.files.filter((item) => item.type === 'doc'))
const docs = history.messages[parentId]?.files?.filter((item) => item.type === 'doc') ?? []; .flat(1);
console.log(docs); console.log(docs);
if (docs.length > 0) { if (docs.length > 0) {
......
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