@expiren/opencode-antigravity-auth 1.6.44 → 1.6.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -16
- package/dist/index.js.map +2 -2
- package/dist/src/plugin.d.ts.map +1 -1
- package/dist/src/plugin.js +8 -14
- package/dist/src/plugin.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12735,29 +12735,21 @@ var createAntigravityPlugin = (providerId) => async ({ client, directory }) => {
|
|
|
12735
12735
|
try {
|
|
12736
12736
|
const parsed = JSON.parse(bodyStr);
|
|
12737
12737
|
parsed.generationConfig = {
|
|
12738
|
-
...parsed.generationConfig ?? {},
|
|
12739
12738
|
maxOutputTokens: 1
|
|
12740
12739
|
};
|
|
12741
|
-
delete parsed.generationConfig.candidateCount;
|
|
12742
|
-
if (parsed.generationConfig.thinkingConfig) {
|
|
12743
|
-
parsed.generationConfig.thinkingConfig = {
|
|
12744
|
-
thinkingBudget: 128
|
|
12745
|
-
};
|
|
12746
|
-
}
|
|
12747
|
-
const probeHeaders = new Headers(prepared.init.headers ?? {});
|
|
12748
|
-
probeHeaders.set("accept", "application/json");
|
|
12749
|
-
const probeUrl = toUrlString(prepared.request).replace(
|
|
12750
|
-
":streamGenerateContent?alt=sse",
|
|
12751
|
-
":generateContent"
|
|
12752
|
-
);
|
|
12753
12740
|
pushDebug("cache-warmup-probe: start");
|
|
12754
|
-
const probeResponse = await fetch(
|
|
12741
|
+
const probeResponse = await fetch(toUrlString(prepared.request), {
|
|
12755
12742
|
...prepared.init,
|
|
12756
12743
|
method: "POST",
|
|
12757
|
-
headers: probeHeaders,
|
|
12758
12744
|
body: JSON.stringify(parsed)
|
|
12759
12745
|
});
|
|
12760
|
-
|
|
12746
|
+
if (probeResponse.body) {
|
|
12747
|
+
const reader = probeResponse.body.getReader();
|
|
12748
|
+
while (!(await reader.read()).done) {
|
|
12749
|
+
}
|
|
12750
|
+
} else {
|
|
12751
|
+
await probeResponse.text();
|
|
12752
|
+
}
|
|
12761
12753
|
const status = probeResponse.status;
|
|
12762
12754
|
pushDebug(`cache-warmup-probe: done status=${status}`);
|
|
12763
12755
|
} catch (error) {
|