copilot-api-plus 1.0.26 → 1.0.27
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 -8
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1312,10 +1312,7 @@ function convertMessages$1(messages) {
|
|
|
1312
1312
|
* Build system instruction from content
|
|
1313
1313
|
*/
|
|
1314
1314
|
function buildSystemInstruction(content) {
|
|
1315
|
-
return {
|
|
1316
|
-
role: "user",
|
|
1317
|
-
parts: [{ text: typeof content === "string" ? content : content.map((c) => c.text || "").join("") }]
|
|
1318
|
-
};
|
|
1315
|
+
return { parts: [{ text: typeof content === "string" ? content : content.map((c) => c.text || "").join("") }] };
|
|
1319
1316
|
}
|
|
1320
1317
|
/**
|
|
1321
1318
|
* Build message parts from content
|
|
@@ -1858,10 +1855,7 @@ const ANTIGRAVITY_USER_AGENT = "antigravity/1.11.3 windows/amd64";
|
|
|
1858
1855
|
function convertMessages(messages, system) {
|
|
1859
1856
|
const contents = [];
|
|
1860
1857
|
let systemInstruction;
|
|
1861
|
-
if (system) systemInstruction = {
|
|
1862
|
-
role: "user",
|
|
1863
|
-
parts: [{ text: system }]
|
|
1864
|
-
};
|
|
1858
|
+
if (system) systemInstruction = { parts: [{ text: system }] };
|
|
1865
1859
|
for (const message of messages) {
|
|
1866
1860
|
const role = message.role === "assistant" ? "model" : "user";
|
|
1867
1861
|
const parts = buildParts(message.content);
|