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

Function is_meaningful_prompt

atomic-agent/src/record/message.rs:259–278  ·  view source on GitHub ↗

Check whether a prompt is meaningful enough to use as a change message. Returns `false` for: - Slash commands (`/init`, `/help`, `/review`, etc.) - Very short prompts (≤ 3 chars) that are likely typos or noise - Empty or whitespace-only prompts

(prompt: &str)

Source from the content-addressed store, hash-verified

257/// - Very short prompts (≤ 3 chars) that are likely typos or noise
258/// - Empty or whitespace-only prompts
259pub(crate) fn is_meaningful_prompt(prompt: &str) -> bool {
260 let trimmed = prompt.trim();
261
262 // Empty / whitespace-only
263 if trimmed.is_empty() {
264 return false;
265 }
266
267 // Slash commands — these describe the tool invocation, not the intent
268 if trimmed.starts_with('/') {
269 return false;
270 }
271
272 // Very short prompts are unlikely to be descriptive
273 if trimmed.len() <= 3 {
274 return false;
275 }
276
277 true
278}
279
280/// Build a human-readable summary of file changes from the repository status.
281///

Callers 2

build_turn_envelopeFunction · 0.85
build_turn_messageFunction · 0.85

Calls 2

is_emptyMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected