- Enhance passthrough function to support response inspection

- Add cursor tool configuration and update related components
This commit is contained in:
decolua
2026-03-19 15:32:29 +07:00
parent 9877f32efa
commit fd4ec9e5b8
12 changed files with 153 additions and 116 deletions
+3
View File
@@ -5,12 +5,14 @@ const TARGET_HOSTS = [
"cloudcode-pa.googleapis.com",
"api.individual.githubcopilot.com",
"q.us-east-1.amazonaws.com",
"api2.cursor.sh",
];
const URL_PATTERNS = {
antigravity: [":generateContent", ":streamGenerateContent"],
copilot: ["/chat/completions", "/v1/messages", "/responses"],
kiro: ["/generateAssistantResponse"],
cursor: ["/BidiAppend", "/RunSSE", "/RunPoll", "/Run"],
};
function getToolForHost(host) {
@@ -18,6 +20,7 @@ function getToolForHost(host) {
if (h === "api.individual.githubcopilot.com") return "copilot";
if (h === "daily-cloudcode-pa.googleapis.com" || h === "cloudcode-pa.googleapis.com") return "antigravity";
if (h === "q.us-east-1.amazonaws.com") return "kiro";
if (h === "api2.cursor.sh") return "cursor";
return null;
}