n8n-nodes-github-copilot 3.31.25 â 3.31.27
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.
|
@@ -44,7 +44,15 @@ class GitHubCopilotOpenAI {
|
|
|
44
44
|
if (messagesInputMode === "json") {
|
|
45
45
|
const messagesJson = this.getNodeParameter("messagesJson", i, "[]");
|
|
46
46
|
try {
|
|
47
|
-
|
|
47
|
+
let parsed;
|
|
48
|
+
if (typeof messagesJson === 'object') {
|
|
49
|
+
parsed = messagesJson;
|
|
50
|
+
console.log('đĨ Received messages as direct object/array (no parsing needed)');
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
parsed = JSON.parse(messagesJson);
|
|
54
|
+
console.log('đĨ Parsed messages from JSON string');
|
|
55
|
+
}
|
|
48
56
|
if (Array.isArray(parsed)) {
|
|
49
57
|
messages = parsed;
|
|
50
58
|
}
|
|
@@ -81,9 +89,16 @@ class GitHubCopilotOpenAI {
|
|
|
81
89
|
});
|
|
82
90
|
}
|
|
83
91
|
let parsedTools = [];
|
|
84
|
-
if (tools
|
|
92
|
+
if (tools) {
|
|
85
93
|
try {
|
|
86
|
-
|
|
94
|
+
if (typeof tools === 'object' && Array.isArray(tools)) {
|
|
95
|
+
parsedTools = tools;
|
|
96
|
+
console.log('đĨ Received tools as direct array (no parsing needed)');
|
|
97
|
+
}
|
|
98
|
+
else if (typeof tools === 'string' && tools.trim()) {
|
|
99
|
+
parsedTools = JSON.parse(tools);
|
|
100
|
+
console.log('đĨ Parsed tools from JSON string');
|
|
101
|
+
}
|
|
87
102
|
}
|
|
88
103
|
catch (error) {
|
|
89
104
|
throw new Error(`Failed to parse tools JSON: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
@@ -91,12 +106,17 @@ class GitHubCopilotOpenAI {
|
|
|
91
106
|
}
|
|
92
107
|
const max_tokens = this.getNodeParameter("max_tokens", i, 4096);
|
|
93
108
|
const seed = this.getNodeParameter("seed", i, 0);
|
|
109
|
+
const response_format_ui = this.getNodeParameter("response_format", i, "text");
|
|
94
110
|
const advancedOptions = this.getNodeParameter("advancedOptions", i, {});
|
|
95
111
|
let response_format = undefined;
|
|
96
112
|
if (requestBodyFromJson === null || requestBodyFromJson === void 0 ? void 0 : requestBodyFromJson.response_format) {
|
|
97
113
|
response_format = requestBodyFromJson.response_format;
|
|
98
114
|
console.log('đ response_format from JSON request body:', JSON.stringify(response_format));
|
|
99
115
|
}
|
|
116
|
+
else if (response_format_ui && response_format_ui !== 'text') {
|
|
117
|
+
response_format = { type: response_format_ui };
|
|
118
|
+
console.log('đ response_format from UI field:', JSON.stringify(response_format));
|
|
119
|
+
}
|
|
100
120
|
else if (advancedOptions.response_format && typeof advancedOptions.response_format === 'string') {
|
|
101
121
|
try {
|
|
102
122
|
response_format = JSON.parse(advancedOptions.response_format);
|
|
@@ -111,7 +131,7 @@ class GitHubCopilotOpenAI {
|
|
|
111
131
|
console.log('đ response_format.type:', response_format.type);
|
|
112
132
|
}
|
|
113
133
|
else {
|
|
114
|
-
console.log('âšī¸ No response_format specified');
|
|
134
|
+
console.log('âšī¸ No response_format specified - using default text format');
|
|
115
135
|
}
|
|
116
136
|
const modelMapping = {
|
|
117
137
|
"gpt-4": "gpt-4o",
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.31.
|
|
3
|
+
"version": "3.31.27",
|
|
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.31.
|
|
3
|
+
"version": "3.31.27",
|
|
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",
|