forked from open-webui/open-webui
		
	fix: disable all documents by default
This commit is contained in:
		
							parent
							
								
									eb2b1ab77b
								
							
						
					
					
						commit
						f814b08bcc
					
				
					 1 changed files with 10 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -17,12 +17,16 @@
 | 
			
		|||
	let collections = [];
 | 
			
		||||
 | 
			
		||||
	$: collections = [
 | 
			
		||||
		{
 | 
			
		||||
			name: 'All Documents',
 | 
			
		||||
			type: 'collection',
 | 
			
		||||
			title: 'All Documents',
 | 
			
		||||
			collection_names: $documents.map((doc) => doc.collection_name)
 | 
			
		||||
		},
 | 
			
		||||
		...($documents.length > 0
 | 
			
		||||
			? [
 | 
			
		||||
					{
 | 
			
		||||
						name: 'All Documents',
 | 
			
		||||
						type: 'collection',
 | 
			
		||||
						title: 'All Documents',
 | 
			
		||||
						collection_names: $documents.map((doc) => doc.collection_name)
 | 
			
		||||
					}
 | 
			
		||||
			  ]
 | 
			
		||||
			: []),
 | 
			
		||||
		...$documents
 | 
			
		||||
			.reduce((a, e, i, arr) => {
 | 
			
		||||
				return [...new Set([...a, ...(e?.content?.tags ?? []).map((tag) => tag.name)])];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue