GoogleCloudPlatform / cloud-code-vscode

Cloud Code for Visual Studio Code: Issues, Documentation and more
Other
420 stars 112 forks source link

Plugin is not working correctly on Eclipse Theia #947

Open chbo123456 opened 1 month ago

chbo123456 commented 1 month ago

Environment: Ecplise Theia v 1.54.0

Version information

Cloud Code Extension version: 2.19.0

VSCode Eclipse Theia version: 1.54.0

OS:

Cloud SDK:

Skaffold:

Kubectl:

Description: I tested your cool plugin on eclipse theia (https://github.com/eclipse-theia/theia, a open clone of vscode). Connection/authentication to gcloud and chat is working, but "explain this" throws "there was a problem getting a response": image Are you planning to extend the support there? Would be awesome!

Repro step:

  1. Install the plugin on eclipse theia (https://theia-ide.org/#theiaide)
  2. install the plugin from "extensions menu"
  3. create connection to gcloud
  4. open a file -> select content -> right click -> "explain this"
maxrandolph commented 3 weeks ago

Hi @chbo123456, could you file feedback with logs attached through the extension? It would also be helpful to include some log data here if available.

Thanks.

chbo123456 commented 2 weeks ago

Hi @maxrandolph , thanks for the reply, sure I can, there are two main error messages from the logs that I could identify:

2024-11-05T07:26:45.729Z root ERROR [hosted-plugin: 78869] Promise rejection not handled in one second: NotAllowedError: Failed to execute 'readText' on 'Clipboard': Document is not focused. , reason: NotAllowedError: Failed to execute 'readText' on 'Clipboard': Document is not focused. 2024-11-05T07:26:45.729Z root ERROR [hosted-plugin: 78869] With stack trace: Error: Document is not focused. at c.readText (xxx/bundle.js:2:1772669) at async t.ClipboardMainImpl.$readText (xxx/bundle.js:2:7696497) at async l.handleRequest (xxx/bundle.js:2:2447494)

2024-11-05T07:26:26.861Z root ERROR [hosted-plugin: 78183] There was a problem getting chat suggestions: i [Error]: json: cannot unmarshal array into Go struct field ChatSuggestionsParams.selectedRange of type protocol.Range at xxx/googlecloudtools.cloudcode-2.20.0/extension/dist/extension.js:14:11423146 at oe (xxx/.theia/deployedPlugins/googlecloudtools.cloudcode-2.20.0/extension/dist/extension.js:14:11423440) at xxx/.theia/deployedPlugins/googlecloudtools.cloudcode-2.20.0/extension/dist/extension.js:14:11418224 at Immediate.<anonymous> (xxx/.theia/deployedPlugins/googlecloudtools.cloudcode-2.20.0/extension/dist/extension.js:14:11418244) at processImmediate (node:internal/timers:466:21) { code: -32700, data: null }

Hope this helps.

maxrandolph commented 2 weeks ago

Thanks for sharing @chbo123456, we will take a look and provide an update to this when possible.