feat: add Google code retrieval across desktop CLI and MCP
Core CI / core (macos-latest) (push) Canceled after 0s
Core CI / core (windows-latest) (push) Canceled after 0s
Core CI / desktop (macos-latest) (push) Canceled after 0s
Core CI / desktop (ubuntu-latest) (push) Canceled after 0s
Core CI / desktop (windows-latest) (push) Canceled after 0s
Core CI / core (ubuntu-latest) (push) Canceled after 2m23s

This commit is contained in:
karl committed 2026-10-12 21:22:11 +02:00
1 parent 8b9b079469
commit 81846b3e98
32 files changed
+1303 -59

No files matched your search

+25
View File
@@ -75,6 +75,16 @@ fn actual_mcp_handshake_search_and_guarded_sources() {
"Termination clause: sixty days written notice to end the supplier partnership.",
)
.unwrap();
std::fs::write(
folder.join("retry.rs"),
"pub fn refreshAccessToken() { /* retry requests */ }",
)
.unwrap();
std::fs::write(
folder.join("symbol-note.txt"),
"refreshAccessToken retry requests",
)
.unwrap();
let db = fixture.path().join("index.sqlite");
let indexed = Command::new(env!("CARGO_BIN_EXE_searchi"))
.args(["index", "--db"])
@@ -154,6 +164,21 @@ fn actual_mcp_handshake_search_and_guarded_sources() {
.unwrap()
.contains("local path"));
}
let code = server.request(
40,
"tools/call",
json!({"name":"search","arguments":{"query":"refreshAccessToken","code_only":true}}),
);
let code_results = code["result"]["structuredContent"]["results"]
.as_array()
.unwrap();
assert_eq!(code_results.len(), 1);
assert_eq!(code_results[0]["filename"], "retry.rs");
assert_eq!(code_results[0]["source"]["kind"], "line");
assert!(code_results[0]["snippet"]
.as_str()
.unwrap()
.contains("refreshAccessToken"));
let mutation = server.request(7, "tools/call", json!({"name":"index","arguments":{}}));
assert!(mutation["error"].is_object());
std::fs::write(