n8n-nodes-github-copilot 3.3.0 → 3.5.0

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.
Files changed (37) hide show
  1. package/dist/credentials/GitHubApi.credentials.d.ts +8 -8
  2. package/dist/credentials/GitHubApi.credentials.js +50 -50
  3. package/dist/credentials/GitHubApiManual.credentials.d.ts +7 -7
  4. package/dist/credentials/GitHubApiManual.credentials.js +33 -33
  5. package/dist/nodes/GitHubCopilot/GitHubCopilot.node.d.ts +5 -5
  6. package/dist/nodes/GitHubCopilot/GitHubCopilot.node.js +324 -324
  7. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.d.ts +5 -5
  8. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.js +141 -146
  9. package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.d.ts +2 -2
  10. package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.js +172 -202
  11. package/dist/nodes/GitHubCopilotChatAPI/utils/helpers.d.ts +19 -21
  12. package/dist/nodes/GitHubCopilotChatAPI/utils/helpers.js +130 -131
  13. package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.d.ts +8 -8
  14. package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.js +100 -101
  15. package/dist/nodes/GitHubCopilotChatAPI/utils/index.d.ts +3 -3
  16. package/dist/nodes/GitHubCopilotChatAPI/utils/index.js +19 -19
  17. package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.d.ts +14 -14
  18. package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.js +70 -71
  19. package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.d.ts +5 -5
  20. package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.js +113 -113
  21. package/dist/nodes/GitHubCopilotChatAPI/utils/types.d.ts +57 -57
  22. package/dist/nodes/GitHubCopilotChatAPI/utils/types.js +2 -2
  23. package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.d.ts +5 -0
  24. package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.js +140 -0
  25. package/dist/nodes/GitHubCopilotChatModel/copilot.svg +34 -0
  26. package/dist/shared/models/GitHubCopilotModels.d.ts +43 -0
  27. package/dist/shared/models/GitHubCopilotModels.js +218 -0
  28. package/package.json +7 -6
  29. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.backup.d.ts +0 -5
  30. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.backup.js +0 -651
  31. package/dist/nodes/GitHubCopilotChatAPI/utils/audioProcessor.d.ts +0 -11
  32. package/dist/nodes/GitHubCopilotChatAPI/utils/audioProcessor.js +0 -86
  33. package/dist/nodes/N8nAiAgent/N8nAiAgent.node.d.ts +0 -5
  34. package/dist/nodes/N8nAiAgent/N8nAiAgent.node.js +0 -214
  35. package/dist/nodes/N8nAiAgent/n8n-ai.svg +0 -35
  36. package/dist/nodes/N8nAiAgent/nodeProperties.d.ts +0 -2
  37. package/dist/nodes/N8nAiAgent/nodeProperties.js +0 -432
@@ -1,202 +1,172 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nodeProperties = void 0;
4
- exports.nodeProperties = [
5
- {
6
- displayName: 'Operation',
7
- name: 'operation',
8
- type: 'options',
9
- noDataExpression: true,
10
- options: [
11
- {
12
- name: 'Chat Completion',
13
- value: 'chat',
14
- description: 'Send messages to GitHub Copilot Chat API',
15
- },
16
- ],
17
- default: 'chat',
18
- },
19
- {
20
- displayName: 'Model',
21
- name: 'model',
22
- type: 'options',
23
- options: [
24
- {
25
- name: 'GPT-5',
26
- value: 'gpt-5',
27
- description: 'OpenAI GPT-5 (Latest and most capable) ✓ Images',
28
- },
29
- {
30
- name: 'GPT-5 Mini',
31
- value: 'gpt-5-mini',
32
- description: 'OpenAI GPT-5 Mini (Faster, cost-effective) ✓ Images',
33
- },
34
- {
35
- name: 'Claude Opus 4.1',
36
- value: 'claude-opus-4.1',
37
- description: 'Anthropic Claude Opus 4.1 (Advanced reasoning) Text only',
38
- },
39
- {
40
- name: 'Gemini 2.5 Pro',
41
- value: 'gemini-2.5-pro',
42
- description: 'Google Gemini 2.5 Pro (Multimodal capabilities) ✓ Images',
43
- },
44
- {
45
- name: 'Grok Code Fast 1',
46
- value: 'grok-code-fast-1',
47
- description: 'xAI Grok Code Fast 1 (Optimized for coding) ✗ Text only',
48
- },
49
- {
50
- name: 'GPT-4.1 Copilot',
51
- value: 'gpt-4.1-copilot',
52
- description: 'OpenAI GPT-4.1 specialized for coding assistance ✓ Images',
53
- },
54
- ],
55
- default: 'gpt-5-mini',
56
- description: 'Select AI model to use',
57
- },
58
- {
59
- displayName: 'Message',
60
- name: 'message',
61
- type: 'string',
62
- typeOptions: {
63
- rows: 4,
64
- },
65
- default: '',
66
- placeholder: 'What can I help you with?',
67
- description: 'The message to send to the AI model',
68
- },
69
- {
70
- displayName: 'System Message',
71
- name: 'systemMessage',
72
- type: 'string',
73
- typeOptions: {
74
- rows: 3,
75
- },
76
- default: '',
77
- placeholder: 'You are a helpful assistant...',
78
- description: 'System message to set the behavior of the AI model',
79
- },
80
- {
81
- displayName: 'Include Image',
82
- name: 'includeMedia',
83
- type: 'boolean',
84
- default: false,
85
- description: 'Whether to include an image file in the message. Supported formats: PNG, JPEG, GIF, WebP.',
86
- },
87
- {
88
- displayName: 'Image Source',
89
- name: 'mediaSource',
90
- type: 'options',
91
- displayOptions: {
92
- show: {
93
- includeMedia: [true],
94
- },
95
- },
96
- options: [
97
- {
98
- name: 'Manual Input',
99
- value: 'manual',
100
- description: 'Provide image as base64 string or file path',
101
- },
102
- {
103
- name: 'URL',
104
- value: 'url',
105
- description: 'Download image from URL',
106
- },
107
- {
108
- name: 'Binary Data',
109
- value: 'binary',
110
- description: 'Use binary data from previous node',
111
- },
112
- ],
113
- default: 'manual',
114
- description: 'Source of the image data',
115
- },
116
- {
117
- displayName: 'Image File',
118
- name: 'mediaFile',
119
- type: 'string',
120
- displayOptions: {
121
- show: {
122
- includeMedia: [true],
123
- mediaSource: ['manual'],
124
- },
125
- },
126
- default: '',
127
- placeholder: 'Paste base64 string or file path',
128
- description: 'Image file as base64 string or file path. Supported formats: PNG, JPEG, GIF, WebP.',
129
- },
130
- {
131
- displayName: 'Image URL',
132
- name: 'mediaUrl',
133
- type: 'string',
134
- displayOptions: {
135
- show: {
136
- includeMedia: [true],
137
- mediaSource: ['url'],
138
- },
139
- },
140
- default: '',
141
- placeholder: 'https://example.com/image.jpg',
142
- description: 'URL of the image file to download. Supported formats: PNG, JPEG, GIF, WebP.',
143
- },
144
- {
145
- displayName: 'Image Binary Property',
146
- name: 'mediaBinaryProperty',
147
- type: 'string',
148
- displayOptions: {
149
- show: {
150
- includeMedia: [true],
151
- mediaSource: ['binary'],
152
- },
153
- },
154
- default: 'data',
155
- placeholder: 'data',
156
- description: 'Name of the binary property containing the image file',
157
- },
158
- {
159
- displayName: 'Advanced Options',
160
- name: 'advancedOptions',
161
- type: 'collection',
162
- placeholder: 'Add Field',
163
- default: {},
164
- options: [
165
- {
166
- displayName: 'Temperature',
167
- name: 'temperature',
168
- type: 'number',
169
- typeOptions: {
170
- minValue: 0,
171
- maxValue: 2,
172
- numberPrecision: 2,
173
- },
174
- default: 1,
175
- description: 'Controls randomness of the response. Higher values make output more random.',
176
- },
177
- {
178
- displayName: 'Max Tokens',
179
- name: 'max_tokens',
180
- type: 'number',
181
- typeOptions: {
182
- minValue: 1,
183
- maxValue: 128000,
184
- },
185
- default: 4096,
186
- description: 'Maximum number of tokens to generate in the response',
187
- },
188
- {
189
- displayName: 'Top P',
190
- name: 'top_p',
191
- type: 'number',
192
- typeOptions: {
193
- minValue: 0,
194
- maxValue: 1,
195
- numberPrecision: 2,
196
- },
197
- default: 1,
198
- description: 'Alternative to temperature, controls diversity via nucleus sampling',
199
- },
200
- ],
201
- },
202
- ];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nodeProperties = void 0;
4
+ const GitHubCopilotModels_1 = require("../../shared/models/GitHubCopilotModels");
5
+ exports.nodeProperties = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ options: [
12
+ {
13
+ name: 'Chat Completion',
14
+ value: 'chat',
15
+ description: 'Send messages to GitHub Copilot Chat API',
16
+ },
17
+ ],
18
+ default: 'chat',
19
+ },
20
+ {
21
+ displayName: 'Model',
22
+ name: 'model',
23
+ type: 'options',
24
+ options: GitHubCopilotModels_1.GitHubCopilotModelsManager.toN8nOptions(),
25
+ default: GitHubCopilotModels_1.DEFAULT_MODELS.GENERAL,
26
+ description: 'Select the GitHub Copilot model to use',
27
+ },
28
+ {
29
+ displayName: 'Message',
30
+ name: 'message',
31
+ type: 'string',
32
+ typeOptions: {
33
+ rows: 4,
34
+ },
35
+ default: '',
36
+ placeholder: 'What can I help you with?',
37
+ description: 'The message to send to the AI model',
38
+ },
39
+ {
40
+ displayName: 'System Message',
41
+ name: 'systemMessage',
42
+ type: 'string',
43
+ typeOptions: {
44
+ rows: 3,
45
+ },
46
+ default: '',
47
+ placeholder: 'You are a helpful assistant...',
48
+ description: 'System message to set the behavior of the AI model',
49
+ },
50
+ {
51
+ displayName: 'Include Image',
52
+ name: 'includeMedia',
53
+ type: 'boolean',
54
+ default: false,
55
+ description: 'Whether to include an image file in the message. Supported formats: PNG, JPEG, GIF, WebP.',
56
+ },
57
+ {
58
+ displayName: 'Image Source',
59
+ name: 'mediaSource',
60
+ type: 'options',
61
+ displayOptions: {
62
+ show: {
63
+ includeMedia: [true],
64
+ },
65
+ },
66
+ options: [
67
+ {
68
+ name: 'Manual Input',
69
+ value: 'manual',
70
+ description: 'Provide image as base64 string or file path',
71
+ },
72
+ {
73
+ name: 'URL',
74
+ value: 'url',
75
+ description: 'Download image from URL',
76
+ },
77
+ {
78
+ name: 'Binary Data',
79
+ value: 'binary',
80
+ description: 'Use binary data from previous node',
81
+ },
82
+ ],
83
+ default: 'manual',
84
+ description: 'Source of the image data',
85
+ },
86
+ {
87
+ displayName: 'Image File',
88
+ name: 'mediaFile',
89
+ type: 'string',
90
+ displayOptions: {
91
+ show: {
92
+ includeMedia: [true],
93
+ mediaSource: ['manual'],
94
+ },
95
+ },
96
+ default: '',
97
+ placeholder: 'Paste base64 string or file path',
98
+ description: 'Image file as base64 string or file path. Supported formats: PNG, JPEG, GIF, WebP.',
99
+ },
100
+ {
101
+ displayName: 'Image URL',
102
+ name: 'mediaUrl',
103
+ type: 'string',
104
+ displayOptions: {
105
+ show: {
106
+ includeMedia: [true],
107
+ mediaSource: ['url'],
108
+ },
109
+ },
110
+ default: '',
111
+ placeholder: 'https://example.com/image.jpg',
112
+ description: 'URL of the image file to download. Supported formats: PNG, JPEG, GIF, WebP.',
113
+ },
114
+ {
115
+ displayName: 'Image Binary Property',
116
+ name: 'mediaBinaryProperty',
117
+ type: 'string',
118
+ displayOptions: {
119
+ show: {
120
+ includeMedia: [true],
121
+ mediaSource: ['binary'],
122
+ },
123
+ },
124
+ default: 'data',
125
+ placeholder: 'data',
126
+ description: 'Name of the binary property containing the image file',
127
+ },
128
+ {
129
+ displayName: 'Advanced Options',
130
+ name: 'advancedOptions',
131
+ type: 'collection',
132
+ placeholder: 'Add Field',
133
+ default: {},
134
+ options: [
135
+ {
136
+ displayName: 'Temperature',
137
+ name: 'temperature',
138
+ type: 'number',
139
+ typeOptions: {
140
+ minValue: 0,
141
+ maxValue: 2,
142
+ numberPrecision: 2,
143
+ },
144
+ default: 1,
145
+ description: 'Controls randomness of the response. Higher values make output more random.',
146
+ },
147
+ {
148
+ displayName: 'Max Tokens',
149
+ name: 'max_tokens',
150
+ type: 'number',
151
+ typeOptions: {
152
+ minValue: 1,
153
+ maxValue: 128000,
154
+ },
155
+ default: 4096,
156
+ description: 'Maximum number of tokens to generate in the response',
157
+ },
158
+ {
159
+ displayName: 'Top P',
160
+ name: 'top_p',
161
+ type: 'number',
162
+ typeOptions: {
163
+ minValue: 0,
164
+ maxValue: 1,
165
+ numberPrecision: 2,
166
+ },
167
+ default: 1,
168
+ description: 'Alternative to temperature, controls diversity via nucleus sampling',
169
+ },
170
+ ],
171
+ },
172
+ ];
@@ -1,21 +1,19 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { IExecuteFunctions } from 'n8n-workflow';
4
- import { CopilotResponse } from './types';
5
- export declare function makeApiRequest(context: IExecuteFunctions, endpoint: string, body: Record<string, unknown>, hasMedia?: boolean): Promise<CopilotResponse>;
6
- export declare function downloadFileFromUrl(url: string): Promise<Buffer>;
7
- export declare function getFileFromBinary(context: IExecuteFunctions, itemIndex: number, propertyName: string): Promise<Buffer>;
8
- export declare function getImageMimeType(filename: string): string;
9
- export declare function getAudioMimeType(filename: string): string;
10
- export declare function validateFileSize(buffer: Buffer, maxSizeKB?: number): void;
11
- export declare function estimateTokens(base64String: string): number;
12
- export declare function validateTokenLimit(estimatedTokens: number, maxTokens?: number): {
13
- valid: boolean;
14
- message?: string;
15
- };
16
- export declare function truncateToTokenLimit(content: string, maxTokens?: number): {
17
- content: string;
18
- truncated: boolean;
19
- originalTokens: number;
20
- finalTokens: number;
21
- };
1
+ import { IExecuteFunctions } from 'n8n-workflow';
2
+ import { CopilotResponse } from './types';
3
+ export declare function makeApiRequest(context: IExecuteFunctions, endpoint: string, body: Record<string, unknown>, hasMedia?: boolean): Promise<CopilotResponse>;
4
+ export declare function downloadFileFromUrl(url: string): Promise<Buffer>;
5
+ export declare function getFileFromBinary(context: IExecuteFunctions, itemIndex: number, propertyName: string): Promise<Buffer>;
6
+ export declare function getImageMimeType(filename: string): string;
7
+ export declare function getAudioMimeType(filename: string): string;
8
+ export declare function validateFileSize(buffer: Buffer, maxSizeKB?: number): void;
9
+ export declare function estimateTokens(base64String: string): number;
10
+ export declare function validateTokenLimit(estimatedTokens: number, maxTokens?: number): {
11
+ valid: boolean;
12
+ message?: string;
13
+ };
14
+ export declare function truncateToTokenLimit(content: string, maxTokens?: number): {
15
+ content: string;
16
+ truncated: boolean;
17
+ originalTokens: number;
18
+ finalTokens: number;
19
+ };