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

Method new_intent

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

Source from the content-addressed store, hash-verified

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