@benjamolina/pi-antigravity-guard 0.4.9 → 0.4.10
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/context.js +7 -2
- package/dist/tool-context.js +2 -1
- package/package.json +1 -1
package/dist/context.js
CHANGED
|
@@ -55,7 +55,11 @@ export function serializeContext(input, injectedSelection, onDiagnostics) {
|
|
|
55
55
|
? { parameters: normalizeCustomToolSchema(parameters) }
|
|
56
56
|
: { parametersJsonSchema: parameters }),
|
|
57
57
|
})) }],
|
|
58
|
-
...(prepared.mode === "NONE"
|
|
58
|
+
...(prepared.mode === "NONE"
|
|
59
|
+
? { toolConfig: { functionCallingConfig: { mode: "NONE" } } }
|
|
60
|
+
: (entry.response.family === "claude" || entry.response.family === "gpt-oss"
|
|
61
|
+
? { toolConfig: { functionCallingConfig: { mode: "AUTO" } } }
|
|
62
|
+
: {})),
|
|
59
63
|
} : {}),
|
|
60
64
|
generationConfig,
|
|
61
65
|
sessionId: envelope.sessionId,
|
|
@@ -192,7 +196,8 @@ function messagePart(part, assistant, sameProviderAndModel) {
|
|
|
192
196
|
fail("Invalid image data.");
|
|
193
197
|
const rawMime = field(part, "mimeType") ?? (isRecord(field(part, "source")) ? field(field(part, "source"), "media_type") : undefined);
|
|
194
198
|
const mimeType = typeof rawMime === "string" && rawMime ? rawMime : "image/jpeg";
|
|
195
|
-
|
|
199
|
+
const cleanedData = rawData.replace(/^data:[^;]+;base64,/s, "").trim();
|
|
200
|
+
return { inlineData: { mimeType, data: cleanedData } };
|
|
196
201
|
}
|
|
197
202
|
fail("Only text context is supported by this provider.");
|
|
198
203
|
}
|
package/dist/tool-context.js
CHANGED
|
@@ -105,7 +105,8 @@ export function replayToolHistory(messages, serializePart, onDiagnostics, policy
|
|
|
105
105
|
if (typeof rawData === "string" && rawData) {
|
|
106
106
|
const rawMime = value(part, "mimeType") ?? (isRecord(value(part, "source")) ? value(record(value(part, "source")), "media_type") : undefined);
|
|
107
107
|
const mimeType = typeof rawMime === "string" && rawMime ? rawMime : "image/jpeg";
|
|
108
|
-
|
|
108
|
+
const cleanedData = rawData.replace(/^data:[^;]+;base64,/s, "").trim();
|
|
109
|
+
imageParts.push({ inlineData: { mimeType, data: cleanedData } });
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
else {
|