MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / new_intent

Method new_intent

atomic-cli/tests/it/intent_turn_binding_test.rs:84–95  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

82 }
83
84 fn new_intent(&self) -> (String, String) {
85 let output = self.run(&["intent", "new", "Implement a greeting"]);
86 let id = output
87 .lines()
88 .find_map(|line| line.strip_prefix("Created intent: "))
89 .unwrap()
90 .to_string();
91 let repo = Repository::open_readonly(self.root()).unwrap();
92 let entry = repo.vault_intent_show(&id).unwrap();
93 let frontmatter: serde_json::Value = serde_json::from_str(&entry.frontmatter_json).unwrap();
94 (id, frontmatter["uid"].as_str().unwrap().to_string())
95 }
96}
97
98fn success(output: Output) -> String {

Calls 6

vault_intent_showMethod · 0.80
runMethod · 0.45
unwrapMethod · 0.45
linesMethod · 0.45
rootMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected