@jeffreycao/copilot-api 1.14.0 → 1.14.1
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-BMEABwl7.js → server-_YRTKSO1.js} +6 -3
- package/dist/{server-BMEABwl7.js.map → server-_YRTKSO1.js.map} +1 -1
- package/dist/{start-jNRGYGpo.js → start-Ca-IHgWl.js} +2 -2
- package/dist/{start-jNRGYGpo.js.map → start-Ca-IHgWl.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-DvJ8r_tN.js");
|
|
26
26
|
const { debug } = await import("./debug-Bb5hamXX.js");
|
|
27
27
|
const { mcp } = await import("./mcp-BseuqgHR.js");
|
|
28
|
-
const { start } = await import("./start-
|
|
28
|
+
const { start } = await import("./start-Ca-IHgWl.js");
|
|
29
29
|
await runMain(defineCommand({
|
|
30
30
|
meta: {
|
|
31
31
|
name: "copilot-api",
|
|
@@ -6696,13 +6696,16 @@ const removeWebSearchTool = (payload) => {
|
|
|
6696
6696
|
});
|
|
6697
6697
|
};
|
|
6698
6698
|
const COPILOT_UNSUPPORTED_TOOL_TYPES = new Set(["image_generation"]);
|
|
6699
|
+
const COPILOT_UNSUPPORTED_TOOL_NAMESPACES = new Set(["image_gen"]);
|
|
6699
6700
|
const removeUnsupportedTools = (payload) => {
|
|
6700
6701
|
if (!Array.isArray(payload.tools) || payload.tools.length === 0) return;
|
|
6701
6702
|
const dropped = [];
|
|
6702
6703
|
payload.tools = payload.tools.filter((t) => {
|
|
6703
6704
|
const type = t.type;
|
|
6704
|
-
|
|
6705
|
-
|
|
6705
|
+
const name = "name" in t && typeof t.name === "string" ? t.name : void 0;
|
|
6706
|
+
const isUnsupportedNamespace = type === "namespace" && name !== void 0 && COPILOT_UNSUPPORTED_TOOL_NAMESPACES.has(name);
|
|
6707
|
+
if (COPILOT_UNSUPPORTED_TOOL_TYPES.has(type) || isUnsupportedNamespace) {
|
|
6708
|
+
dropped.push(isUnsupportedNamespace ? `${type}:${name}` : type);
|
|
6706
6709
|
return false;
|
|
6707
6710
|
}
|
|
6708
6711
|
return true;
|
|
@@ -6847,4 +6850,4 @@ server.route("/:provider/v1/models", providerModelRoutes);
|
|
|
6847
6850
|
//#endregion
|
|
6848
6851
|
export { server };
|
|
6849
6852
|
|
|
6850
|
-
//# sourceMappingURL=server-
|
|
6853
|
+
//# sourceMappingURL=server-_YRTKSO1.js.map
|