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)
| 257 | /// - Very short prompts (≤ 3 chars) that are likely typos or noise |
| 258 | /// - Empty or whitespace-only prompts |
| 259 | pub(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 | /// |
no test coverage detected