crabmate 0.5.0

Rust AI agent: OpenAI-compatible chat/completions, function calling, HTTP serve, ops CLI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[test]
fn normalize_conversation_id_accepts_expected_charset() {
    let got = crate::web::normalize_client_conversation_id(Some("conv_abc-123:xyz.test"))
        .expect("id should parse");
    assert_eq!(got.as_deref(), Some("conv_abc-123:xyz.test"));
}

#[test]
fn normalize_conversation_id_rejects_invalid_chars() {
    let err =
        crate::web::normalize_client_conversation_id(Some("abc/def")).expect_err("should reject /");
    assert!(err.contains("仅允许"));
}