n8n-nodes-github-copilot 4.4.1 → 4.4.4
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.
|
@@ -152,19 +152,6 @@ class GitHubCopilotOpenAI {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
console.log('📤 Final messages being sent to API:', JSON.stringify(messages, null, 2));
|
|
155
|
-
for (let msgIndex = 0; msgIndex < messages.length; msgIndex++) {
|
|
156
|
-
const msg = messages[msgIndex];
|
|
157
|
-
if (msg.content !== null &&
|
|
158
|
-
msg.content !== undefined &&
|
|
159
|
-
typeof msg.content === 'object' &&
|
|
160
|
-
!Array.isArray(msg.content)) {
|
|
161
|
-
const originalContent = msg.content;
|
|
162
|
-
msg.content = JSON.stringify(msg.content, null, 2);
|
|
163
|
-
console.log(`🔄 Auto-converted message[${msgIndex}].content from object to JSON string`);
|
|
164
|
-
console.log(' Original type:', typeof originalContent);
|
|
165
|
-
console.log(' Converted to:', msg.content.substring(0, 100) + '...');
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
155
|
const advancedOptions = this.getNodeParameter('advancedOptions', i, {});
|
|
169
156
|
let parsedTools = [];
|
|
170
157
|
const tools = advancedOptions.tools;
|
|
@@ -256,7 +243,10 @@ class GitHubCopilotOpenAI {
|
|
|
256
243
|
break;
|
|
257
244
|
}
|
|
258
245
|
if (typeof content === 'string') {
|
|
259
|
-
|
|
246
|
+
const trimmed = content.trim();
|
|
247
|
+
const isActualDataUrl = /^data:image\/[a-z]+;base64,[A-Za-z0-9+\/=]{100,}/i.test(trimmed);
|
|
248
|
+
const isCopilotFileUrl = trimmed.startsWith('copilot-file://');
|
|
249
|
+
if (isActualDataUrl || isCopilotFileUrl) {
|
|
260
250
|
hasVisionContent = true;
|
|
261
251
|
break;
|
|
262
252
|
}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.4",
|
|
4
4
|
"description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows with full tools and function calling support - 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",
|
|
@@ -4,6 +4,10 @@ exports.DynamicModelsManager = void 0;
|
|
|
4
4
|
const GitHubCopilotEndpoints_1 = require("./GitHubCopilotEndpoints");
|
|
5
5
|
class DynamicModelsManager {
|
|
6
6
|
static hashToken(token) {
|
|
7
|
+
if (!token || typeof token !== 'string' || token.length === 0) {
|
|
8
|
+
console.warn('⚠️ Invalid token provided to hashToken, using fallback hash');
|
|
9
|
+
return 'models_default';
|
|
10
|
+
}
|
|
7
11
|
let hash = 0;
|
|
8
12
|
for (let i = 0; i < token.length; i++) {
|
|
9
13
|
const char = token.charCodeAt(i);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.4",
|
|
4
4
|
"description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows with full tools and function calling support - 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",
|