MCPcopy Create free account
hub / github.com/douglance/devsql / parse_todo_filename

Function parse_todo_filename

crates/ccql/src/sql/composite_storage.rs:473–483  ·  view source on GitHub ↗

Parse todo filename to extract workspace_id and agent_id

(filename: &str)

Source from the content-addressed store, hash-verified

471
472/// Parse todo filename to extract workspace_id and agent_id
473fn parse_todo_filename(filename: &str) -> (String, String) {
474 let name = filename.strip_suffix(".json").unwrap_or(filename);
475
476 if let Some(idx) = name.find("-agent-") {
477 let workspace_id = name[..idx].to_string();
478 let agent_id = name[idx + 7..].to_string();
479 (workspace_id, agent_id)
480 } else {
481 (name.to_string(), "unknown".to_string())
482 }
483}
484
485/// Convert serde_json Value to GlueSQL Value
486fn json_value_to_glue_value(value: &JsonValue) -> Value {

Callers 2

scan_todosMethod · 0.85
test_parse_todo_filenameFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_parse_todo_filenameFunction · 0.68