n8n-nodes-github-copilot 3.38.16 → 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.
|
|
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",
|
|
@@ -90,6 +90,11 @@ async function makeGitHubCopilotRequest(context, endpoint, body, hasMedia = fals
|
|
|
90
90
|
}
|
|
91
91
|
if (!response.ok) {
|
|
92
92
|
const errorText = await response.text();
|
|
93
|
+
if (response.status === 400) {
|
|
94
|
+
console.log(`🚫 400 Bad Request detected - not retrying`);
|
|
95
|
+
const enhancedError = `GitHub Copilot API error: ${response.status} ${response.statusText}. ${errorText}`;
|
|
96
|
+
throw new Error(enhancedError);
|
|
97
|
+
}
|
|
93
98
|
const tokenPrefix = token.substring(0, 4);
|
|
94
99
|
const tokenSuffix = token.substring(token.length - 5);
|
|
95
100
|
const tokenInfo = `${tokenPrefix}...${tokenSuffix}`;
|
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.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",
|