Fix GitHub Copilot agent mode with Antigravity
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
1 parent
a331c34eab
commit
222e22fa53
5 files changed
+47
-19
No files matched your search
@@ -20,10 +20,17 @@ const NATIVE_PAIRS = {
|
||||
export function detectClientTool(headers = {}, body = {}) {
|
||||
const ua = (headers["user-agent"] || "").toLowerCase();
|
||||
const xApp = (headers["x-app"] || "").toLowerCase();
|
||||
const openaiIntent = (headers["openai-intent"] || "").toLowerCase();
|
||||
const initiator = (headers["x-initiator"] || headers["X-Initiator"] || "").toLowerCase();
|
||||
|
||||
// Antigravity: detected via body field (not header)
|
||||
if (body.userAgent === "antigravity") return "antigravity";
|
||||
|
||||
// GitHub Copilot / OAI compatible extension using Copilot chat headers
|
||||
if (ua.includes("githubcopilotchat") || openaiIntent === "conversation-panel" || initiator === "user") {
|
||||
return "github-copilot";
|
||||
}
|
||||
|
||||
// Claude Code / Claude CLI
|
||||
if (ua.includes("claude-cli") || ua.includes("claude-code") || xApp === "cli") return "claude";
|
||||
|
||||
|
||||
Reference in new issue
Block a user