Compare commits
6 Commits
da9a6a8def
...
028024474a
| Author | SHA1 | Date | |
|---|---|---|---|
| 028024474a | |||
| 4d5316bf18 | |||
| 5771206946 | |||
| 2cb90aac5c | |||
| d889022021 | |||
| 0a3e96056d |
@ -318,11 +318,11 @@ class ChatDB(Chat):
|
||||
# only keep messages from DB dir (or those that have not yet been written)
|
||||
self.messages = [m for m in self.messages if not m.file_path or m.file_path.parent.samefile(self.db_path)]
|
||||
|
||||
def add_to_db(self, messages: list[Message], write: bool = True) -> None:
|
||||
def add_to_db(self, messages: list[Message], do_write: bool = True) -> None:
|
||||
"""
|
||||
Adds the given messages and sets the file_path to the DB directory.
|
||||
"""
|
||||
if write:
|
||||
if do_write:
|
||||
write_dir(self.db_path,
|
||||
messages,
|
||||
self.file_suffix,
|
||||
@ -333,11 +333,11 @@ class ChatDB(Chat):
|
||||
self.messages += messages
|
||||
self.sort()
|
||||
|
||||
def add_to_cache(self, messages: list[Message], write: bool = True) -> None:
|
||||
def add_to_cache(self, messages: list[Message], do_write: bool = True) -> None:
|
||||
"""
|
||||
Adds the given messages and sets the file_path to the cache directory.
|
||||
"""
|
||||
if write:
|
||||
if do_write:
|
||||
write_dir(self.cache_path,
|
||||
messages,
|
||||
self.file_suffix,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user