Add delete_context_workspace tool
This commit is contained in:
1 parent
0699b603c1
commit
bb535b62b0
4 files changed
+50
-2
No files matched your search
@@ -249,7 +249,7 @@ impl MemoryIndex {
|
||||
}
|
||||
|
||||
pub fn delete_all(&self) {
|
||||
if let Ok(mut writer) = self.writer.lock() {
|
||||
if let Ok(writer) = self.writer.lock() {
|
||||
let _ = writer.delete_all_documents();
|
||||
self.needs_commit.store(true, std::sync::atomic::Ordering::SeqCst);
|
||||
}
|
||||
@@ -258,7 +258,7 @@ impl MemoryIndex {
|
||||
pub fn add_task_sync(&self, t: &Task) {
|
||||
println!("add_task_sync called for task: {}", t.id);
|
||||
if let Ok(writer) = self.writer.lock() {
|
||||
let res = writer.add_document(doc!(
|
||||
let _res = writer.add_document(doc!(
|
||||
self.id_field => t.id.as_str(),
|
||||
self.title_field => t.title.as_str(),
|
||||
self.body_field => t.description.as_str(),
|
||||
@@ -348,6 +348,8 @@ mod tests {
|
||||
context: "Test context".to_string(),
|
||||
decision: "Test decision".to_string(),
|
||||
consequence: "Test consequence".to_string(),
|
||||
status: "accepted".to_string(),
|
||||
supersedes: None,
|
||||
timestamp: 0,
|
||||
};
|
||||
let _ = index.index_adr(&adr).await.unwrap();
|
||||
|
||||
Reference in new issue
Block a user