continue icon indicating copy to clipboard operation
continue copied to clipboard

idea @files choose not work

Open mosinnik opened this issue 1 year ago • 24 comments

Before submitting your bug report

Relevant environment info

- OS:win 10
- Continue version: 1.0.15
- IDE version: 2024.3.5
- Model:
- config:
  

  
  OR link to assistant in Continue hub:

Description

When I try to use @Files and choose file to add to chat something going wrong with IDEA notification error "Error handling message of type showToast: java.lang.UnsupportedOperationException: JsonObject " Nothing in logs and nothing in dev tools console

To reproduce

No response

Log output

nothing in idea logs

mosinnik avatar May 04 '25 13:05 mosinnik

Facing same issue, nothing in logs just jetbrains notification, some files cannot be added to context while some files can. @codebase works fine. RHEL 9.4, continue 1.0.16, PyCharm 2025.1

drrros avatar May 06 '25 20:05 drrros

same issue here

unrealbato avatar May 08 '25 08:05 unrealbato

same issue here

Wanda-Wang avatar May 09 '25 03:05 Wanda-Wang

Android Studio IDE:

Android Studio Meerkat Feature Drop | 2024.3.2 Build #AI-243.25659.59.2432.13423653, built on April 29, 2025 Linux Mint 21.3 kernel liquorix 6.11.*

I'm encountering the same issue when attempting to select a file; "@Files" displays the following:

Error handling message of type showToast: java.lang.UnsupportedOperationException: JsonObject

jesustejerina avatar May 10 '25 18:05 jesustejerina

UPDATE to 1.0.16 same issue to files with name "screen", for example: PermissionScreen.kt, LoginScreen.kt, etc.

please help us... URGENT!!!

jesustejerina avatar May 15 '25 23:05 jesustejerina

@mosinnik @jesustejerina @Wanda-Wang @unrealbato @drrros @denlogv Trying to fix it, but I could not find any way to reproduce it. is there any way I can reproduce the same error ?

Iamshankhadeep avatar May 17 '25 17:05 Iamshankhadeep

+1 to @Iamshankhadeep , I tried to reproduce this on both IntelliJ and WebStorm without success.

Some context on current user reports however:

  • Happening on macOS, Windows, and Linux
  • Only IDEs reported are PyCharm and Android Studio
  • Seems to be not persistent, sometimes it works sometimes it doesn't
  • Started on 1.0.15

For folks experiencing the issue, a few things you could try to help us pin down the problem:

  • Downgrade to 1.0.15
  • Try out IntelliJ or a different IDE
  • See if it's only happening on particular filenames like @jesustejerina reported

Additionally, please make sure to include your IDE name.

Once we're able to repro we can get it fixed ASAP 👍

Patrick-Erichsen avatar May 19 '25 03:05 Patrick-Erichsen

I am having the same issue.

OS: Ubuntu 24.04.2 LTS PyCharm 2025.1.1.1 (Build #PY-251.25410.159, built on May 14, 2025) Continue Plugin Versions affected: 1.0.16, 1.0.15, 1.0.13

Downgrading to 1.0.8 solves the issue. This is the latest unaffected version that is available at https://plugins.jetbrains.com/plugin/22707-continue/versions/stable.

min0ru avatar May 19 '25 04:05 min0ru

same issue here

liangbe avatar May 19 '25 06:05 liangbe

I am having the same issue.

OS: Windows 11.0

IntelliJ IDEA 2025.1.1 (Community Edition) Build #IC-251.25410.109, built on May 7, 2025

Continue Plugin Versions affected: 1.0.16, 1.0.15 I did not test other versions

ex-daniel-graupner avatar May 19 '25 06:05 ex-daniel-graupner

I met the same issue. But the issue was gone after i set contextLength in the models config.

Before:

{
  "model": "AUTODETECT",
  "title": "Autodetect",
  "provider": "ollama"
}

After:

{
  "model": "AUTODETECT",
  "title": "Autodetect",
  "contextLength": 32768,
  "provider": "ollama"
}

OS: Windows 11.0 IntelliJ IDEA 2025.1 (Community Edition) Continue Plugin Version: 1.0.16

waltyou avatar May 21 '25 06:05 waltyou

Here is what I added to get it to work:


  - name: codellama:13b
    provider: ollama
    model: codellama:13b
    roles:
      - chat
      - edit
      - apply
    defaultCompletionOptions:
      contextLength: 32768

ericgregg11 avatar May 21 '25 16:05 ericgregg11

Can other folks confirm if downgrading to 1.0.8 solves the issue? That would help us pin down the problematic code.

Patrick-Erichsen avatar May 22 '25 00:05 Patrick-Erichsen

Can other folks confirm if downgrading to 1.0.8 solves the issue? That would help us pin down the problematic code.

@Patrick-Erichsen I tried 1.0.8 in IntelliJ IDEA 2025.1 (Community Edition), the issue was gone.

waltyou avatar May 22 '25 05:05 waltyou

Installed 1.0.16, got error Error handling message of type showToast: java.lang.UnsupportedOperationException: JsonObject. Uninstalled 1.0.16, installed 1.0.8 from the zip file and now I can't select any model at all and I can't select my old local model either (user/.continue/config.json file is still there). Image

What to do? Sequoia 15.5 PHPStorm 2024.3.5

Sogl avatar May 27 '25 16:05 Sogl

I was facing similar issue, I might be wrong but it seems like bigger files just don't fit into the context window, that's why it works in some cases but not others, it seems like solution of extending ~/.continue/config.yaml proposed above helped:

    defaultCompletionOptions:
      contextLength: YOUR_MODEL_MAX_WINDOW_LENGTH

MaxNevermind avatar Jun 02 '25 17:06 MaxNevermind

same issue。hope for fix

a-flying-crow avatar Jun 30 '25 09:06 a-flying-crow

I can confirm that the issue disappears after updateing contextLength in v1.0.21. However, the error could be more explicit about this being a problem of the context window size and not something else.

ivanlen avatar Jul 01 '25 00:07 ivanlen

Since "ollama show" reports the context length of the model, I would expect that the plugin should not require any special configuration parameter to acquire the same info.

tcfurrer avatar Jul 21 '25 03:07 tcfurrer

Hm that is a good point @tcfurrer , I definitely think that would be possible. We could also do the same thing for the Capabilities

👾 ❯ ollama show llama3.1:8b
  Model
    architecture        llama     
    parameters          8.0B      
    context length      131072    
    embedding length    4096      
    quantization        Q4_K_M    

  Capabilities
    completion    
    tools         

  Parameters
    stop    "<|start_header_id|>"    
    stop    "<|end_header_id|>"      
    stop    "<|eot_id|>"             

  License
    LLAMA 3.1 COMMUNITY LICENSE AGREEMENT            
    Llama 3.1 Version Release Date: July 23, 2024 

Patrick-Erichsen avatar Jul 22 '25 17:07 Patrick-Erichsen