feat(antigravity): 增强请求参数和注入 Antigravity 身份 system prompt

This commit is contained in:
song
2026-01-08 13:07:20 +08:00
parent c7abfe67b5
commit a4a0c0e2cc
2 changed files with 14 additions and 18 deletions

View File

@@ -7,6 +7,7 @@ import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"net/url"
"strings"
@@ -23,6 +24,12 @@ func NewAPIRequest(ctx context.Context, action, accessToken string, body []byte)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+accessToken)
req.Header.Set("User-Agent", UserAgent)
req.Header.Set("requestType", "agent")
// 打印完整 HTTP 请求
log.Printf("[NewAPIRequest] POST %s\nHeaders: Content-Type=%s, Authorization=Bearer %s..., requestType=%s, User-Agent=%s\nBody: %s",
apiURL, req.Header.Get("Content-Type"), accessToken[:20], req.Header.Get("requestType"), req.Header.Get("User-Agent"), string(body))
return req, nil
}

File diff suppressed because one or more lines are too long