chatgpt-helper icon indicating copy to clipboard operation
chatgpt-helper copied to clipboard

Asking ChatGPT to explain code returns blank page

Open Ross-Murphy opened this issue 2 years ago • 2 comments

I just installed this 4.1.0

Asking a general question seems to work however right clicking code and asking for an explanation returns Querying ChatGPT. This may take some time... and then just a blank page.

The following errors are displayed for the extension host log.

`2023-04-13 12:54:49.579 [error] SyntaxError: Unexpected end of JSON input at JSON.parse () at IncomingMessage. (c:\Users\rmurphy.vscode\extensions\kiranshah.chatgpt-helper-4.1.0\dist\extension.js:1:959) at IncomingMessage.emit (node:events:526:28) at Readable.read (node:internal/streams/readable:527:10) at flow (node:internal/streams/readable:1011:34) at resume_ (node:internal/streams/readable:992:3) at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

2023-04-13 12:54:49.580 [error] SyntaxError: Unexpected token h in JSON at position 2 at JSON.parse () at IncomingMessage. (c:\Users\rmurphy.vscode\extensions\kiranshah.chatgpt-helper-4.1.0\dist\extension.js:1:959) at IncomingMessage.emit (node:events:526:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Readable.push (node:internal/streams/readable:228:10) at HTTPParser.parserOnBody (node:_http_common:141:24) at TLSSocket.socketOnData (node:_http_client:482:22) at TLSSocket.emit (node:events:526:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Readable.push (node:internal/streams/readable:228:10) at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)`

My vscode setup...

Version: 1.77.1 (user setup) Commit: b7886d7461186a5eac768481578c1d7ca80e2d21 Date: 2023-04-04T23:21:11.906Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19045 Sandboxed: Yes

Ross-Murphy avatar Apr 13 '23 18:04 Ross-Murphy

Same here, actually struggling to find any ChatGPT extension that works.

NickSutton avatar Feb 17 '24 13:02 NickSutton

Same here, actually struggling to find any ChatGPT extension that works.

For that reason I wrote a PowerShell module that could run in the terminal and use that in vscode. There are several improvements I'd like to make but it works for now. Check out my profile if you'd like to try it.

Ross-Murphy avatar Feb 17 '24 15:02 Ross-Murphy