Initial public release of Warp.

Repo-Sync-Origin: warpdotdev/warp-internal@12af1d983b
This commit is contained in:
David Stern
2026-04-28 08:43:33 -05:00
commit 0dbd3d567a
4982 changed files with 1431549 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,30 @@
use super::*;
#[test]
fn ask_user_question_skipped_by_auto_approve_converts_to_skipped_answers() {
let result = api::request::input::tool_call_result::Result::from(
AskUserQuestionResult::SkippedByAutoApprove {
question_ids: vec!["q1".to_string(), "q2".to_string()],
},
);
let api::request::input::tool_call_result::Result::AskUserQuestion(result) = result else {
panic!("expected ask_user_question result");
};
let Some(api::ask_user_question_result::Result::Success(success)) = result.result else {
panic!("expected success result");
};
assert_eq!(success.answers.len(), 2);
assert_eq!(success.answers[0].question_id, "q1");
assert_eq!(success.answers[1].question_id, "q2");
assert!(matches!(
success.answers[0].answer,
Some(AskUserQuestionAnswer::Skipped(()))
));
assert!(matches!(
success.answers[1].answer,
Some(AskUserQuestionAnswer::Skipped(()))
));
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,44 @@
use super::{StartAgentResult, StartAgentVersion};
#[test]
fn deserializes_legacy_start_agent_success_without_version_as_v1() {
let result: StartAgentResult =
serde_json::from_value(serde_json::json!({ "Success": { "agent_id": "agent-1" } }))
.expect("legacy start-agent success should deserialize");
assert_eq!(
result,
StartAgentResult::Success {
agent_id: "agent-1".to_string(),
version: StartAgentVersion::V1,
}
);
}
#[test]
fn deserializes_legacy_start_agent_error_without_version_as_v1() {
let result: StartAgentResult =
serde_json::from_value(serde_json::json!({ "Error": { "error": "boom" } }))
.expect("legacy start-agent error should deserialize");
assert_eq!(
result,
StartAgentResult::Error {
error: "boom".to_string(),
version: StartAgentVersion::V1,
}
);
}
#[test]
fn deserializes_legacy_start_agent_cancelled_without_version_as_v1() {
let result: StartAgentResult = serde_json::from_value(serde_json::json!({ "Cancelled": {} }))
.expect("legacy start-agent cancellation should deserialize");
assert_eq!(
result,
StartAgentResult::Cancelled {
version: StartAgentVersion::V1,
}
);
}