(&self, path: Option<String>)
| 3744 | /// List a directory in the workspace. |
| 3745 | #[napi] |
| 3746 | pub async fn ls(&self, path: Option<String>) -> napi::Result<ToolResult> { |
| 3747 | let session = self.inner.clone(); |
| 3748 | let result = get_runtime() |
| 3749 | .spawn(async move { session.ls(path.as_deref()).await }) |
| 3750 | .await |
| 3751 | .map_err(|e| napi::Error::from_reason(format!("Task join error: {e}")))? |
| 3752 | .map_err(|e| napi::Error::from_reason(format!("{e}")))?; |
| 3753 | Ok(tool_result_from_core(result)) |
| 3754 | } |
| 3755 | |
| 3756 | /// Edit a file by replacing text in the workspace. |
| 3757 | #[napi] |
no test coverage detected