n8n-nodes-github-copilot 3.38.17 → 3.38.18

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.
@@ -122,6 +122,30 @@ class GitHubCopilotOpenAI {
122
122
  content: "Hello! How can you help me?",
123
123
  });
124
124
  }
125
+ for (let msgIndex = 0; msgIndex < messages.length; msgIndex++) {
126
+ const msg = messages[msgIndex];
127
+ if (Array.isArray(msg.content)) {
128
+ for (const contentItem of msg.content) {
129
+ if (contentItem.type === 'file') {
130
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `❌ GitHub Copilot API Error: File attachments cannot be used inside 'content' array.\n\n` +
131
+ `📋 INCORRECT FORMAT (OpenAI style - doesn't work):\n` +
132
+ `{\n` +
133
+ ` "role": "user",\n` +
134
+ ` "content": [\n` +
135
+ ` {"type": "text", "text": "Analyze this"},\n` +
136
+ ` {"type": "file", "file": "data:..."} ❌ WRONG\n` +
137
+ ` ]\n` +
138
+ `}\n\n` +
139
+ `✅ CORRECT FORMAT (GitHub Copilot - message level):\n` +
140
+ `[\n` +
141
+ ` {"role": "user", "content": "Analyze this file"},\n` +
142
+ ` {"role": "user", "content": "data:image/png;base64,...", "type": "file"} ✅ CORRECT\n` +
143
+ `]\n\n` +
144
+ `💡 Solution: Use separate messages with 'type' property at message level, not inside content array.`, { itemIndex: i });
145
+ }
146
+ }
147
+ }
148
+ }
125
149
  console.log('📤 Final messages being sent to API:', JSON.stringify(messages, null, 2));
126
150
  const advancedOptions = this.getNodeParameter("advancedOptions", i, {});
127
151
  let parsedTools = [];
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.38.17",
3
+ "version": "3.38.18",
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.17",
3
+ "version": "3.38.18",
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",