MCPcopy Create free account
hub / github.com/acking-you/static_flow / read_comment_result_markdown

Function read_comment_result_markdown

crates/backend/src/comment_worker.rs:467–476  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

465}
466
467async fn read_comment_result_markdown(path: &Path) -> Result<String> {
468 let raw = tokio::fs::read_to_string(path)
469 .await
470 .with_context(|| format!("failed to read result file {}", path.display()))?;
471 let normalized = raw.trim();
472 if normalized.is_empty() {
473 anyhow::bail!("result file is empty: {}", path.display());
474 }
475 Ok(normalized.to_string())
476}
477
478fn build_comment_result_file_path(result_dir: &Path, task_id: &str) -> PathBuf {
479 let safe_task_id = sanitize_task_id_for_path(task_id);

Callers 1

process_one_taskFunction · 0.85

Calls 3

trimMethod · 0.80
with_contextMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected