refactor(g3-cli): extract commands module and fix test organization

- Extract handle_command() from interactive.rs to new commands.rs module
  (320 lines, 15 match arms for /help, /compact, /thinnify, etc.)
- Fix orphaned tests in completion.rs that were outside mod tests block
- Add #[allow(dead_code)] to with_include_prompt_filename() (used in tests)
- interactive.rs reduced from 595 to 290 lines

Agent: fowler
This commit is contained in:
Dhanji R. Prasanna
2026-01-20 14:30:50 +05:30
parent 710c54105b
commit dec22f5e58
6 changed files with 336 additions and 309 deletions

View File

@@ -509,7 +509,6 @@ mod tests {
println!("Line: '{}', start: {}, completions: {}", line, start, completions.len());
assert_eq!(completions.len(), 0, "Quoted non-path should not trigger completion");
}
}
#[test]
fn test_resume_completion_lists_sessions() {
@@ -561,3 +560,4 @@ mod tests {
// The important thing is it doesn't panic
println!("list_sessions returned {} sessions", sessions.len());
}
}