@expiren/opencode-antigravity-auth 1.6.45 → 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 -9
- package/dist/index.js.map +2 -2
- package/dist/src/plugin.d.ts.map +1 -1
- package/dist/src/plugin.js +8 -6
- package/dist/src/plugin.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12737,20 +12737,19 @@ var createAntigravityPlugin = (providerId) => async ({ client, directory }) => {
|
|
|
12737
12737
|
parsed.generationConfig = {
|
|
12738
12738
|
maxOutputTokens: 1
|
|
12739
12739
|
};
|
|
12740
|
-
const probeHeaders = new Headers(prepared.init.headers ?? {});
|
|
12741
|
-
probeHeaders.set("accept", "application/json");
|
|
12742
|
-
const probeUrl = toUrlString(prepared.request).replace(
|
|
12743
|
-
":streamGenerateContent?alt=sse",
|
|
12744
|
-
":generateContent"
|
|
12745
|
-
);
|
|
12746
12740
|
pushDebug("cache-warmup-probe: start");
|
|
12747
|
-
const probeResponse = await fetch(
|
|
12741
|
+
const probeResponse = await fetch(toUrlString(prepared.request), {
|
|
12748
12742
|
...prepared.init,
|
|
12749
12743
|
method: "POST",
|
|
12750
|
-
headers: probeHeaders,
|
|
12751
12744
|
body: JSON.stringify(parsed)
|
|
12752
12745
|
});
|
|
12753
|
-
|
|
12746
|
+
if (probeResponse.body) {
|
|
12747
|
+
const reader = probeResponse.body.getReader();
|
|
12748
|
+
while (!(await reader.read()).done) {
|
|
12749
|
+
}
|
|
12750
|
+
} else {
|
|
12751
|
+
await probeResponse.text();
|
|
12752
|
+
}
|
|
12754
12753
|
const status = probeResponse.status;
|
|
12755
12754
|
pushDebug(`cache-warmup-probe: done status=${status}`);
|
|
12756
12755
|
} catch (error) {
|