Compare commits
6 Commits
028024474a
...
da9a6a8def
| Author | SHA1 | Date | |
|---|---|---|---|
| da9a6a8def | |||
| 00e06db721 | |||
| 4d8dbd3f15 | |||
| 2013c2817d | |||
| b2aa2df72b | |||
| e1a9b951d8 |
@ -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], do_write: bool = True) -> None:
|
||||
def add_to_db(self, messages: list[Message], write: bool = True) -> None:
|
||||
"""
|
||||
Adds the given messages and sets the file_path to the DB directory.
|
||||
"""
|
||||
if do_write:
|
||||
if 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], do_write: bool = True) -> None:
|
||||
def add_to_cache(self, messages: list[Message], write: bool = True) -> None:
|
||||
"""
|
||||
Adds the given messages and sets the file_path to the cache directory.
|
||||
"""
|
||||
if do_write:
|
||||
if write:
|
||||
write_dir(self.cache_path,
|
||||
messages,
|
||||
self.file_suffix,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user