MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / new

Method new

crates/chat-cli/src/cli/chat/cli/prompts.rs:93–99  ·  view source on GitHub ↗

Create a new prompt with the given name in the specified directory

(name: &str, base_dir: PathBuf)

Source from the content-addressed store, hash-verified

91impl Prompt {
92 /// Create a new prompt with the given name in the specified directory
93 fn new(name: &str, base_dir: PathBuf) -> Self {
94 let path = base_dir.join(format!("{}.md", name));
95 Self {
96 name: name.to_string(),
97 path,
98 }
99 }
100
101 /// Check if the prompt file exists
102 fn exists(&self) -> bool {

Callers

nothing calls this directly

Calls 5

joinMethod · 0.80
to_stringMethod · 0.80
prompts_dirMethod · 0.80
globalMethod · 0.80
workspaceMethod · 0.45

Tested by

no test coverage detected