@jeffreycao/copilot-api 1.13.12 → 1.13.14
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 +1 -1
- package/dist/{server-FMk6a-WV.js → server-977yOyfA.js} +3 -3
- package/dist/{server-FMk6a-WV.js.map → server-977yOyfA.js.map} +1 -1
- package/dist/{start-uhrlGC0l.js → start-BP0GcUF7.js} +2 -2
- package/dist/{start-uhrlGC0l.js.map → start-BP0GcUF7.js.map} +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -25,7 +25,7 @@ bindElectronFetch();
|
|
|
25
25
|
const { auth } = await import("./auth-CfRmN-aH.js");
|
|
26
26
|
const { debug } = await import("./debug-JJUz1hBb.js");
|
|
27
27
|
const { mcp } = await import("./mcp-BseuqgHR.js");
|
|
28
|
-
const { start } = await import("./start-
|
|
28
|
+
const { start } = await import("./start-BP0GcUF7.js");
|
|
29
29
|
await runMain(defineCommand({
|
|
30
30
|
meta: {
|
|
31
31
|
name: "copilot-api",
|
|
@@ -1363,7 +1363,7 @@ const applyOpenAICompatibleContextCache = (payload) => {
|
|
|
1363
1363
|
const selectContextCacheMessageIndexes = (messages) => {
|
|
1364
1364
|
const cacheableIndexes = messages.flatMap((message, index) => isContextCacheMarkerEligible(message) ? [index] : []);
|
|
1365
1365
|
const systemIndexes = cacheableIndexes.filter((index) => messages[index]?.role === "system").slice(0, 2);
|
|
1366
|
-
const finalIndexes = cacheableIndexes.filter((index) => messages[index]?.role !== "system").slice(-
|
|
1366
|
+
const finalIndexes = cacheableIndexes.filter((index) => messages[index]?.role !== "system").slice(-1);
|
|
1367
1367
|
return uniqueIndexes$1([...systemIndexes, ...finalIndexes]).sort((a, b) => a - b);
|
|
1368
1368
|
};
|
|
1369
1369
|
const uniqueIndexes$1 = (indexes) => [...new Set(indexes)].slice(0, OPENAI_COMPATIBLE_CONTEXT_CACHE_MARKER_LIMIT);
|
|
@@ -5709,7 +5709,7 @@ const createMessages = async (payload, anthropicBetaHeader, options) => {
|
|
|
5709
5709
|
//#endregion
|
|
5710
5710
|
//#region src/routes/messages/api-flows.ts
|
|
5711
5711
|
const COPILOT_CONTEXT_CACHE_SYSTEM_MARKER_LIMIT = 2;
|
|
5712
|
-
const COPILOT_CONTEXT_CACHE_NON_SYSTEM_MARKER_LIMIT =
|
|
5712
|
+
const COPILOT_CONTEXT_CACHE_NON_SYSTEM_MARKER_LIMIT = 1;
|
|
5713
5713
|
const COPILOT_CONTEXT_CACHE_CONTROL = { type: "ephemeral" };
|
|
5714
5714
|
const messagesApiFlowDependencies = {
|
|
5715
5715
|
createChatCompletions,
|
|
@@ -6674,4 +6674,4 @@ server.route("/:provider/v1/models", providerModelRoutes);
|
|
|
6674
6674
|
//#endregion
|
|
6675
6675
|
export { server };
|
|
6676
6676
|
|
|
6677
|
-
//# sourceMappingURL=server-
|
|
6677
|
+
//# sourceMappingURL=server-977yOyfA.js.map
|