n8n-nodes-github-copilot 1.1.2 → 1.1.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.
@@ -255,10 +255,12 @@ class GitHubCopilot {
255
255
  if (language !== 'other') {
256
256
  fullPrompt = `[${language}] ${fullPrompt}`;
257
257
  }
258
- command = `/usr/bin/gh copilot suggest "${fullPrompt}"`;
258
+ const escapedSuggestPrompt = fullPrompt.replace(/'/g, `'"'"'`);
259
+ command = `/usr/bin/gh copilot suggest '${escapedSuggestPrompt}'`;
259
260
  break;
260
261
  case 'explain':
261
- command = `/usr/bin/gh copilot explain "${fullPrompt}"`;
262
+ const escapedExplainPrompt = fullPrompt.replace(/'/g, `'"'"'`);
263
+ command = `/usr/bin/gh copilot explain '${escapedExplainPrompt}'`;
262
264
  break;
263
265
  case 'shell':
264
266
  const commandType = this.getNodeParameter('commandType', i);
@@ -279,11 +281,15 @@ class GitHubCopilot {
279
281
  default:
280
282
  shellPrompt = fullPrompt;
281
283
  }
282
- command = `/usr/bin/gh copilot suggest "${shellPrompt}" --type shell`;
284
+ const escapedShellPrompt = shellPrompt.replace(/'/g, `'"'"'`);
285
+ command = `/usr/bin/gh copilot suggest '${escapedShellPrompt}' --type shell`;
283
286
  break;
284
287
  default:
285
288
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation: ${operation}`);
286
289
  }
290
+ console.log('Executing command:', command);
291
+ console.log('Token prefix:', accessToken ? accessToken.substring(0, 8) + '...' : 'none');
292
+ console.log('Token type:', accessToken ? (accessToken.startsWith('gho_') ? 'OAuth' : accessToken.startsWith('ghp_') ? 'Classic' : 'Unknown') : 'none');
287
293
  let stdout = '';
288
294
  let stderr = '';
289
295
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "n8n community node for GitHub Copilot CLI integration",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",