feat: added .set memory REPL commands to control memory injection and applied formatting
This commit is contained in:
+6
-1
@@ -20,10 +20,10 @@ use crate::parsers::{bash, python, typescript};
|
||||
use anyhow::{Context, Result, anyhow, bail};
|
||||
use indexmap::IndexMap;
|
||||
use indoc::formatdoc;
|
||||
use memory::MEMORY_FUNCTION_PREFIX;
|
||||
use rust_embed::Embed;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{Value, json};
|
||||
use memory::MEMORY_FUNCTION_PREFIX;
|
||||
use skill::SKILL_FUNCTION_PREFIX;
|
||||
use std::collections::VecDeque;
|
||||
use std::ffi::OsStr;
|
||||
@@ -362,6 +362,11 @@ impl Functions {
|
||||
.extend(memory::memory_function_declarations());
|
||||
}
|
||||
|
||||
pub fn remove_memory_functions(&mut self) {
|
||||
self.declarations
|
||||
.retain(|f| !f.name.starts_with(MEMORY_FUNCTION_PREFIX));
|
||||
}
|
||||
|
||||
pub fn append_skill_functions(&mut self) {
|
||||
self.declarations
|
||||
.extend(skill::skill_function_declarations());
|
||||
|
||||
Reference in New Issue
Block a user