Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
aa82e381
Commit
aa82e381
authored
Jan 07, 2024
by
Timothy J. Baek
Browse files
feat: include files from previous prompts
parent
14226937
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/routes/(app)/+page.svelte
src/routes/(app)/+page.svelte
+4
-4
No files found.
src/routes/(app)/+page.svelte
View file @
aa82e381
...
...
@@ -185,10 +185,10 @@
const sendPrompt = async (prompt, parentId) => {
const _chatId = JSON.parse(JSON.stringify($chatId));
// TODO: update below to include all ancestral fil
es
console.log(history.messages[parentId]);
const docs = history.messages[parentId]?.files?.filter((item) => item.type === 'doc') ?? []
;
const docs = messag
es
.filter((message) => message?.files ?? null)
.map((message) => message.files.filter((item) => item.type === 'doc'))
.flat(1)
;
console.log(docs);
if (docs.length > 0) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment