n8n-nodes-github-copilot 3.31.10 → 3.31.12
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.
|
@@ -3,25 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.nodeProperties = void 0;
|
|
4
4
|
const GitHubCopilotModels_1 = require("../../shared/models/GitHubCopilotModels");
|
|
5
5
|
exports.nodeProperties = [
|
|
6
|
-
{
|
|
7
|
-
displayName: "Credential Type",
|
|
8
|
-
name: "credentialType",
|
|
9
|
-
type: "options",
|
|
10
|
-
options: [
|
|
11
|
-
{
|
|
12
|
-
name: "GitHub Copilot API (Manual Token)",
|
|
13
|
-
value: "githubCopilotApi",
|
|
14
|
-
description: "Use manual GitHub CLI token",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: "GitHub Copilot OAuth2 (with Helper)",
|
|
18
|
-
value: "githubCopilotOAuth2Api",
|
|
19
|
-
description: "Use OAuth2 credential with helper script",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
default: "githubCopilotApi",
|
|
23
|
-
description: "Type of credential to use for GitHub Copilot authentication",
|
|
24
|
-
},
|
|
25
6
|
{
|
|
26
7
|
displayName: "Operation",
|
|
27
8
|
name: "operation",
|
|
@@ -34,18 +34,30 @@ class GitHubCopilotOpenAI {
|
|
|
34
34
|
const operation = this.getNodeParameter("operation", i);
|
|
35
35
|
if (operation === "chat") {
|
|
36
36
|
const model = this.getNodeParameter("model", i, "gpt-4o");
|
|
37
|
-
const
|
|
38
|
-
message: [],
|
|
39
|
-
});
|
|
37
|
+
const messagesInputMode = this.getNodeParameter("messagesInputMode", i, "manual");
|
|
40
38
|
const temperature = this.getNodeParameter("temperature", i, 1);
|
|
41
39
|
const tools = this.getNodeParameter("tools", i, "");
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
let messages = [];
|
|
41
|
+
if (messagesInputMode === "json") {
|
|
42
|
+
const messagesJson = this.getNodeParameter("messagesJson", i, "[]");
|
|
43
|
+
try {
|
|
44
|
+
messages = JSON.parse(messagesJson);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
throw new Error(`Failed to parse messages JSON: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
const messagesParam = this.getNodeParameter("messages", i, {
|
|
52
|
+
message: [],
|
|
53
|
+
});
|
|
54
|
+
if (messagesParam.message && Array.isArray(messagesParam.message)) {
|
|
55
|
+
for (const msg of messagesParam.message) {
|
|
56
|
+
messages.push({
|
|
57
|
+
role: msg.role,
|
|
58
|
+
content: msg.content,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
49
61
|
}
|
|
50
62
|
}
|
|
51
63
|
if (messages.length === 0) {
|
|
@@ -2,25 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.nodeProperties = void 0;
|
|
4
4
|
exports.nodeProperties = [
|
|
5
|
-
{
|
|
6
|
-
displayName: "Credential Type",
|
|
7
|
-
name: "credentialType",
|
|
8
|
-
type: "options",
|
|
9
|
-
options: [
|
|
10
|
-
{
|
|
11
|
-
name: "GitHub Copilot API (Manual Token)",
|
|
12
|
-
value: "githubCopilotApi",
|
|
13
|
-
description: "Use manual GitHub CLI token",
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: "GitHub Copilot OAuth2 (with Helper)",
|
|
17
|
-
value: "githubCopilotOAuth2Api",
|
|
18
|
-
description: "Use OAuth2 credential with helper script",
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
default: "githubCopilotApi",
|
|
22
|
-
description: "Type of credential to use for GitHub Copilot authentication",
|
|
23
|
-
},
|
|
24
5
|
{
|
|
25
6
|
displayName: "Operation",
|
|
26
7
|
name: "operation",
|
|
@@ -43,6 +24,47 @@ exports.nodeProperties = [
|
|
|
43
24
|
placeholder: "gpt-4o",
|
|
44
25
|
description: "The model to use for the completion. Supports all OpenAI model names that map to GitHub Copilot models.",
|
|
45
26
|
},
|
|
27
|
+
{
|
|
28
|
+
displayName: "Messages Input Mode",
|
|
29
|
+
name: "messagesInputMode",
|
|
30
|
+
type: "options",
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: "Manual (UI)",
|
|
34
|
+
value: "manual",
|
|
35
|
+
description: "Enter messages one by one using the UI",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "JSON (Programmatic)",
|
|
39
|
+
value: "json",
|
|
40
|
+
description: "Provide messages as JSON array",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
default: "manual",
|
|
44
|
+
description: "How to provide the messages for the conversation",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: "Messages (JSON)",
|
|
48
|
+
name: "messagesJson",
|
|
49
|
+
type: "json",
|
|
50
|
+
default: `[
|
|
51
|
+
{
|
|
52
|
+
"role": "system",
|
|
53
|
+
"content": "You are a helpful assistant."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"role": "user",
|
|
57
|
+
"content": "Hello!"
|
|
58
|
+
}
|
|
59
|
+
]`,
|
|
60
|
+
placeholder: "Enter messages as JSON array",
|
|
61
|
+
description: "Array of messages in OpenAI format: [{\"role\": \"user\", \"content\": \"...\"}]",
|
|
62
|
+
displayOptions: {
|
|
63
|
+
show: {
|
|
64
|
+
messagesInputMode: ["json"],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
46
68
|
{
|
|
47
69
|
displayName: "Messages",
|
|
48
70
|
name: "messages",
|
|
@@ -59,6 +81,11 @@ exports.nodeProperties = [
|
|
|
59
81
|
},
|
|
60
82
|
],
|
|
61
83
|
},
|
|
84
|
+
displayOptions: {
|
|
85
|
+
show: {
|
|
86
|
+
messagesInputMode: ["manual"],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
62
89
|
options: [
|
|
63
90
|
{
|
|
64
91
|
name: "message",
|
|
@@ -104,7 +131,7 @@ exports.nodeProperties = [
|
|
|
104
131
|
description: "Array of messages for the conversation",
|
|
105
132
|
},
|
|
106
133
|
{
|
|
107
|
-
displayName: "Tools",
|
|
134
|
+
displayName: "Tools (Optional)",
|
|
108
135
|
name: "tools",
|
|
109
136
|
type: "json",
|
|
110
137
|
default: "",
|
|
@@ -127,8 +154,8 @@ exports.nodeProperties = [
|
|
|
127
154
|
}
|
|
128
155
|
}
|
|
129
156
|
]`,
|
|
130
|
-
description: "Array of tools/functions available to the model (OpenAI format)",
|
|
131
|
-
hint: "JSON array of tool definitions in OpenAI format",
|
|
157
|
+
description: "Optional: Array of tools/functions available to the model (OpenAI format). Leave empty if not using function calling.",
|
|
158
|
+
hint: "JSON array of tool definitions in OpenAI format. This field is optional.",
|
|
132
159
|
},
|
|
133
160
|
{
|
|
134
161
|
displayName: "Tool Choice",
|
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.12",
|
|
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.12",
|
|
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",
|