pub struct CoderService { /* private fields */ }Implementations§
Source§impl CoderService
impl CoderService
pub fn new(config: CodeConfig) -> Self
pub fn allowed_directory(&self) -> &Path
pub fn current_directory(&self, conversation_id: &str) -> PathBuf
pub fn get_command_history( &self, conversation_id: &str, limit: Option<usize>, ) -> Vec<CommandHistoryEntry>
pub async fn change_directory( &mut self, conversation_id: &str, target: &str, ) -> CommandResult
pub async fn read_file( &self, conversation_id: &str, filepath: &str, ) -> Result<String, String>
pub async fn write_file( &self, conversation_id: &str, filepath: &str, content: &str, ) -> Result<(), String>
pub async fn edit_file( &self, conversation_id: &str, filepath: &str, old_str: &str, new_str: &str, ) -> Result<(), String>
pub async fn list_files( &self, conversation_id: &str, dirpath: &str, ) -> Result<Vec<String>, String>
pub async fn search_files( &self, conversation_id: &str, pattern: &str, dirpath: &str, max_matches: usize, ) -> Result<Vec<(String, usize, String)>, String>
pub async fn execute_shell( &mut self, conversation_id: &str, command: &str, ) -> Result<CommandResult>
pub async fn git( &mut self, conversation_id: &str, args: &str, ) -> Result<CommandResult>
pub fn note_file_op( &mut self, conversation_id: &str, op_type: FileOperationType, target: &str, )
Auto Trait Implementations§
impl Freeze for CoderService
impl RefUnwindSafe for CoderService
impl Send for CoderService
impl Sync for CoderService
impl Unpin for CoderService
impl UnsafeUnpin for CoderService
impl UnwindSafe for CoderService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more