n8n-nodes-github-copilot 3.38.9 → 3.38.11
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/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.d.ts +6 -1
- package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.js +38 -3
- package/dist/nodes/GitHubCopilotOpenAI/GitHubCopilotOpenAI.node.js +6 -2
- package/dist/nodes/GitHubCopilotOpenAI/nodeProperties.js +19 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { INodeType, INodeTypeDescription, ISupplyDataFunctions, SupplyData } from "n8n-workflow";
|
|
1
|
+
import { INodeType, INodeTypeDescription, ISupplyDataFunctions, SupplyData, ILoadOptionsFunctions, INodePropertyOptions } from "n8n-workflow";
|
|
2
2
|
export declare class GitHubCopilotChatModel implements INodeType {
|
|
3
3
|
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getAvailableModels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
4
9
|
supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
10
|
}
|
|
@@ -4,6 +4,7 @@ exports.GitHubCopilotChatModel = void 0;
|
|
|
4
4
|
const openai_1 = require("@langchain/openai");
|
|
5
5
|
const GitHubCopilotModels_1 = require("../../shared/models/GitHubCopilotModels");
|
|
6
6
|
const GitHubCopilotEndpoints_1 = require("../../shared/utils/GitHubCopilotEndpoints");
|
|
7
|
+
const DynamicModelLoader_1 = require("../../shared/models/DynamicModelLoader");
|
|
7
8
|
class GitHubCopilotChatModel {
|
|
8
9
|
constructor() {
|
|
9
10
|
this.description = {
|
|
@@ -44,9 +45,25 @@ class GitHubCopilotChatModel {
|
|
|
44
45
|
displayName: "Model",
|
|
45
46
|
name: "model",
|
|
46
47
|
type: "options",
|
|
48
|
+
typeOptions: {
|
|
49
|
+
loadOptionsMethod: "getAvailableModels",
|
|
50
|
+
},
|
|
47
51
|
default: GitHubCopilotModels_1.DEFAULT_MODELS.GENERAL,
|
|
48
|
-
description: "
|
|
49
|
-
|
|
52
|
+
description: "Select the GitHub Copilot model to use (loaded dynamically based on your subscription)",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
displayName: "Custom Model Name",
|
|
56
|
+
name: "customModel",
|
|
57
|
+
type: "string",
|
|
58
|
+
default: "",
|
|
59
|
+
placeholder: "gpt-4o, claude-3.5-sonnet, grok-code-fast-1, etc.",
|
|
60
|
+
description: "Enter the model name manually. This is useful for new/beta models not yet in the list.",
|
|
61
|
+
hint: "Examples: gpt-4o, gpt-4o-mini, claude-3.5-sonnet, gemini-2.0-flash-exp, grok-code-fast-1",
|
|
62
|
+
displayOptions: {
|
|
63
|
+
show: {
|
|
64
|
+
model: ["__manual__"],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
50
67
|
},
|
|
51
68
|
{
|
|
52
69
|
displayName: "Options",
|
|
@@ -122,9 +139,27 @@ class GitHubCopilotChatModel {
|
|
|
122
139
|
},
|
|
123
140
|
],
|
|
124
141
|
};
|
|
142
|
+
this.methods = {
|
|
143
|
+
loadOptions: {
|
|
144
|
+
async getAvailableModels() {
|
|
145
|
+
return await DynamicModelLoader_1.loadAvailableModels.call(this);
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
};
|
|
125
149
|
}
|
|
126
150
|
async supplyData(itemIndex) {
|
|
127
|
-
|
|
151
|
+
let model = this.getNodeParameter("model", itemIndex);
|
|
152
|
+
if (model === "__manual__") {
|
|
153
|
+
const customModel = this.getNodeParameter("customModel", itemIndex);
|
|
154
|
+
if (!customModel || customModel.trim() === "") {
|
|
155
|
+
throw new Error("Custom model name is required when selecting '✏️ Enter Custom Model Name'");
|
|
156
|
+
}
|
|
157
|
+
model = customModel;
|
|
158
|
+
console.log(`✏️ Using manually entered model: ${model}`);
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
console.log(`✅ Using model from list: ${model}`);
|
|
162
|
+
}
|
|
128
163
|
const options = this.getNodeParameter("options", itemIndex, {});
|
|
129
164
|
const modelInfo = GitHubCopilotModels_1.GitHubCopilotModelsManager.getModelByValue(model);
|
|
130
165
|
const credentials = (await this.getCredentials("githubCopilotApi"));
|
|
@@ -106,10 +106,14 @@ class GitHubCopilotOpenAI {
|
|
|
106
106
|
console.log('📥 Manual mode - messagesParam:', JSON.stringify(messagesParam, null, 2));
|
|
107
107
|
if (messagesParam.message && Array.isArray(messagesParam.message)) {
|
|
108
108
|
for (const msg of messagesParam.message) {
|
|
109
|
-
|
|
109
|
+
const message = {
|
|
110
110
|
role: msg.role,
|
|
111
111
|
content: msg.content,
|
|
112
|
-
}
|
|
112
|
+
};
|
|
113
|
+
if (msg.type && msg.type !== 'text') {
|
|
114
|
+
message.type = msg.type;
|
|
115
|
+
}
|
|
116
|
+
messages.push(message);
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
119
|
console.log('📥 Manual mode - parsed messages:', JSON.stringify(messages, null, 2));
|
|
@@ -181,6 +181,25 @@ exports.nodeProperties = [
|
|
|
181
181
|
placeholder: "Enter message content...",
|
|
182
182
|
description: "The content of the message",
|
|
183
183
|
},
|
|
184
|
+
{
|
|
185
|
+
displayName: "Type",
|
|
186
|
+
name: "type",
|
|
187
|
+
type: "options",
|
|
188
|
+
options: [
|
|
189
|
+
{
|
|
190
|
+
name: "Text",
|
|
191
|
+
value: "text",
|
|
192
|
+
description: "Regular text message",
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: "File",
|
|
196
|
+
value: "file",
|
|
197
|
+
description: "File attachment (use content as data URL or base64)",
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
default: "text",
|
|
201
|
+
description: "The type of message content (optional)",
|
|
202
|
+
},
|
|
184
203
|
],
|
|
185
204
|
},
|
|
186
205
|
],
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.38.
|
|
3
|
+
"version": "3.38.11",
|
|
4
4
|
"description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.38.
|
|
3
|
+
"version": "3.38.11",
|
|
4
4
|
"description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",
|