copilot-api-plus 1.0.29 → 1.0.30
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/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1312,7 +1312,7 @@ function convertMessages$1(messages) {
|
|
|
1312
1312
|
* Build system instruction from content
|
|
1313
1313
|
*/
|
|
1314
1314
|
function buildSystemInstruction(content) {
|
|
1315
|
-
return { parts: { text: typeof content === "string" ? content : content.map((c) => c.text || "").join("") } };
|
|
1315
|
+
return { parts: [{ text: typeof content === "string" ? content : content.map((c) => c.text || "").join("") }] };
|
|
1316
1316
|
}
|
|
1317
1317
|
/**
|
|
1318
1318
|
* Build message parts from content
|
|
@@ -1875,7 +1875,7 @@ const ANTIGRAVITY_USER_AGENT = "antigravity/1.11.3 windows/amd64";
|
|
|
1875
1875
|
function convertMessages(messages, system) {
|
|
1876
1876
|
const contents = [];
|
|
1877
1877
|
let systemInstruction;
|
|
1878
|
-
if (system) systemInstruction = { parts: { text: system } };
|
|
1878
|
+
if (system) systemInstruction = { parts: [{ text: system }] };
|
|
1879
1879
|
for (const message of messages) {
|
|
1880
1880
|
const role = message.role === "assistant" ? "model" : "user";
|
|
1881
1881
|
const parts = buildParts(message.content);
|