Refactor verdict handling and editor state management
- Removed the Escalate variant from the Verdict enum and associated parsing logic. - Cleaned up the EditorState struct by removing unused fields and methods. - Simplified MCP connection functions by removing unnecessary disconnect and handle dismiss functions. - Added tick count to MiscState for managing UI updates during processing. - Updated chat and status views to display a spinner during AI processing using the tick count. - Created a README.md file to document the project, its features, architecture, usage, key bindings, agent modes, security measures, installation instructions, and configuration details.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
pub enum Verdict {
|
||||
Allow,
|
||||
Block(String),
|
||||
Escalate,
|
||||
}
|
||||
|
||||
pub struct Harness;
|
||||
@@ -80,7 +79,6 @@ mod tests {
|
||||
"block" => Some(Verdict::Block(
|
||||
v.get("reason").and_then(|r| r.as_str()).unwrap_or("blocked").to_string()
|
||||
)),
|
||||
"escalate" => Some(Verdict::Escalate),
|
||||
_ => None,
|
||||
};
|
||||
}
|
||||
@@ -153,12 +151,6 @@ mod tests {
|
||||
assert_eq!(v, Some(Verdict::Block("dangerous operation".to_string())));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_verdict_json_escalate() {
|
||||
let v = parse_verdict(r#"{"verdict": "escalate"}"#);
|
||||
assert_eq!(v, Some(Verdict::Escalate));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_verdict_text_allow() {
|
||||
let v = parse_verdict("Verdict: Allow");
|
||||
|
||||
Reference in New Issue
Block a user