MCPcopy Index your code
hub / github.com/AI45Lab/Code / write_text

Method write_text

core/src/tools/mod.rs:651–661  ·  view source on GitHub ↗
(
            &self,
            path: &WorkspacePath,
            content: &str,
        )

Source from the content-addressed store, hash-verified

649 }
650
651 async fn write_text(
652 &self,
653 path: &WorkspacePath,
654 content: &str,
655 ) -> WorkspaceResult<WorkspaceWriteOutcome> {
656 self.insert(path.as_str(), content);
657 Ok(WorkspaceWriteOutcome {
658 bytes: content.len(),
659 lines: content.lines().count(),
660 })
661 }
662
663 async fn list_dir(&self, path: &WorkspacePath) -> WorkspaceResult<Vec<WorkspaceDirEntry>> {
664 let prefix = if path.is_root() {

Callers 4

_write_agent_dirFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 3

insertMethod · 0.45
as_strMethod · 0.45
lenMethod · 0.45

Tested by 3

_write_agent_dirFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36