n8n-nodes-github-copilot 4.4.6 → 4.4.8

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.
@@ -114,7 +114,7 @@ class GitHubCopilotOpenAI {
114
114
  content: msg.content,
115
115
  };
116
116
  const msgType = msg.type || 'text';
117
- if (msgType === 'file') {
117
+ if (msgType === 'file_binary') {
118
118
  const binaryKeyData = items[i].binary;
119
119
  const keyToUse = msg.binaryPropertyName || 'data';
120
120
  if (binaryKeyData && binaryKeyData[keyToUse]) {
@@ -125,7 +125,14 @@ class GitHubCopilotOpenAI {
125
125
  const base64 = buffer.toString('base64');
126
126
  const dataUrl = `data:${mimeType};base64,${base64}`;
127
127
  const contentArray = [];
128
- if (message.content && message.content.trim() !== '') {
128
+ const caption = msg.caption;
129
+ if (caption && caption.trim() !== '') {
130
+ contentArray.push({
131
+ type: 'text',
132
+ text: caption,
133
+ });
134
+ }
135
+ else if (message.content && message.content.trim() !== '' && message.content !== '[object Object]') {
129
136
  contentArray.push({
130
137
  type: 'text',
131
138
  text: message.content,
@@ -150,6 +157,9 @@ class GitHubCopilotOpenAI {
150
157
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Binary property '${keyToUse}' not found. Available binary properties: ${available}`, { itemIndex: i });
151
158
  }
152
159
  }
160
+ else if (msgType === 'file') {
161
+ message.type = 'file';
162
+ }
153
163
  else if (msg.type && (msg.type === 'text' || msg.type === 'image_url')) {
154
164
  message.type = msg.type;
155
165
  }
@@ -104,6 +104,27 @@ exports.nodeProperties = [
104
104
  default: '',
105
105
  placeholder: 'Enter message content...',
106
106
  description: 'The content of the message',
107
+ displayOptions: {
108
+ show: {
109
+ type: ['text', 'file'],
110
+ },
111
+ },
112
+ },
113
+ {
114
+ displayName: 'Caption',
115
+ name: 'caption',
116
+ type: 'string',
117
+ typeOptions: {
118
+ rows: 2,
119
+ },
120
+ default: '',
121
+ placeholder: 'Optional prompt for the image...',
122
+ description: 'Text to accompany the image (optional)',
123
+ displayOptions: {
124
+ show: {
125
+ type: ['file_binary'],
126
+ },
127
+ },
107
128
  },
108
129
  {
109
130
  displayName: 'Type',
@@ -116,13 +137,18 @@ exports.nodeProperties = [
116
137
  description: 'Regular text message',
117
138
  },
118
139
  {
119
- name: 'File',
140
+ name: 'File (URL / Base64)',
120
141
  value: 'file',
142
+ description: 'File attachment using URL or Base64 string',
143
+ },
144
+ {
145
+ name: 'File (Binary)',
146
+ value: 'file_binary',
121
147
  description: 'File attachment from binary input',
122
148
  },
123
149
  ],
124
150
  default: 'text',
125
- description: 'The type of message content (optional)',
151
+ description: 'The type of message content',
126
152
  },
127
153
  {
128
154
  displayName: 'Input Binary Field',
@@ -132,7 +158,7 @@ exports.nodeProperties = [
132
158
  required: true,
133
159
  displayOptions: {
134
160
  show: {
135
- type: ['file'],
161
+ type: ['file_binary'],
136
162
  },
137
163
  },
138
164
  description: 'The name of the binary property that contains the file to upload',
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "4.4.6",
3
+ "version": "4.4.8",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "4.4.6",
3
+ "version": "4.4.8",
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",