n8n-nodes-github-copilot 3.38.9 → 3.38.10

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.
@@ -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,11 @@ 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: "The GitHub Copilot model to use",
49
- options: GitHubCopilotModels_1.GitHubCopilotModelsManager.toN8nOptions(),
52
+ description: "Select the GitHub Copilot model to use (loaded dynamically based on your subscription)",
50
53
  },
51
54
  {
52
55
  displayName: "Options",
@@ -122,6 +125,13 @@ class GitHubCopilotChatModel {
122
125
  },
123
126
  ],
124
127
  };
128
+ this.methods = {
129
+ loadOptions: {
130
+ async getAvailableModels() {
131
+ return await DynamicModelLoader_1.loadAvailableModels.call(this);
132
+ },
133
+ },
134
+ };
125
135
  }
126
136
  async supplyData(itemIndex) {
127
137
  const model = this.getNodeParameter("model", itemIndex);
@@ -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
- messages.push({
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.9",
3
+ "version": "3.38.10",
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.9",
3
+ "version": "3.38.10",
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",