feat(mcp): implement Prompts capability, Resources, and clean up daemon architecture
This commit is contained in:
1 parent
9b9b403ef2
commit
251757f8fc
29 files changed
+1276
-182
No files matched your search
@@ -13,3 +13,27 @@ pub fn now_secs() -> u64 {
|
||||
.unwrap_or_default()
|
||||
.as_secs()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_contains_ignore_ascii_case() {
|
||||
assert!(contains_ignore_ascii_case("Hello World", "world"));
|
||||
assert!(contains_ignore_ascii_case("Hello World", "HELLO"));
|
||||
assert!(contains_ignore_ascii_case("test", ""));
|
||||
assert!(!contains_ignore_ascii_case("test", "testing"));
|
||||
assert!(!contains_ignore_ascii_case("Hello", "world"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_now_secs() {
|
||||
let t1 = now_secs();
|
||||
assert!(t1 > 1700000000); // Sanity check for recent epoch
|
||||
std::thread::sleep(std::time::Duration::from_millis(1000));
|
||||
let t2 = now_secs();
|
||||
assert!(t2 >= t1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user