🐛 ui fix for Delete All button
This commit is contained in:
parent
a529a7ce2f
commit
6281cc7981
2 changed files with 13 additions and 5 deletions
|
|
@ -817,6 +817,12 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
|
|||
}
|
||||
}, [inputFocused]);
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedContextItems.length > 0) {
|
||||
setShowContextItemsIfNotMain(true);
|
||||
}
|
||||
}, [selectedContextItems]);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={topRef}
|
||||
|
|
@ -1096,7 +1102,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
|
|||
{showContextToggleOn && (
|
||||
<div>
|
||||
<HeaderButtonWithText
|
||||
className="m-2 mr-4 float-right"
|
||||
className="mr-4 ml-auto -mt-2"
|
||||
text="Delete All"
|
||||
onClick={() => {
|
||||
dispatch(
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import json
|
|||
import os
|
||||
import re
|
||||
from functools import cached_property
|
||||
import sqlite3
|
||||
from typing import AsyncGenerator, Dict, List, Literal, Optional
|
||||
import chromadb
|
||||
from chromadb.config import Settings
|
||||
|
|
@ -209,10 +210,11 @@ class ChromaCodebaseIndex(CodebaseIndex):
|
|||
wait_time *= 2
|
||||
if wait_time > 2**10:
|
||||
raise e
|
||||
# except sqlite3.OperationalError as e:
|
||||
# logger.debug(f"SQL error: {e}")
|
||||
# os.chmod(self.chroma_dir, 0o777)
|
||||
# os.chmod(os.path.join(self.chroma_dir, "chroma.sqlite3"), 0o777)
|
||||
except sqlite3.OperationalError as e:
|
||||
logger.debug(f"SQL error: {e}")
|
||||
os.chmod(self.chroma_dir, 0o777)
|
||||
os.chmod(os.path.join(self.chroma_dir, "chroma.sqlite3"), 0o777)
|
||||
del collections[self.directory]
|
||||
|
||||
# Metadata keeps track of number of chunks per file, used in update()
|
||||
with open(f"{self.index_dir}/metadata.json", "w") as f:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue