Repository navigation
Description
Before submitting your bug report
- I believe this is a bug. I'll try to join the Continue Discord for questions
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
No response
Description
When I select a piece of code and use the CTRL+I shortcut key, as shown in the screenshot, you can see that the model name is not displayed, only show a null ,But pressing the Enter key to send the question can call the API successful, so I think it has get the data in config.json, but it just can't display it

And at the same time, the log in the Run Extension window:
Error handling message: {"messageType":"config/getSerializedProfileInfo","data":{"result":{"config":{"allowAnonymousTelemetry":false,"models":[{"provider":"anthropic","model":"Gosu Model","title":"Gosu Model"... ....(After here, it's my config. json content)
java.lang.NullPointerException: null cannot be cast to non-null type kotlin.collections.Map<kotlin.String, kotlin.Any>
Registered handler for editor

I recorded a demo video:
https://github.com/user-attachments/assets/d33e7f10-45c7-4443-8440-6cd7158eaf73
To reproduce
No response
Log output
Error handling message: {"messageType":"config/getSerializedProfileInfo","data":{"result":{"config":{"allowAnonymousTelemetry":false,"models":[{"provider":"anthropic","model":"Gosu Model","title":"Gosu Model"...
....(After here, it's my config. json content)
java.lang.NullPointerException: null cannot be cast to non-null type kotlin.collections.Map<kotlin.String, kotlin.Any>`
`Registered handler for editor
Activity
[-][Ctrl+I] bubble can‘t display model name[/-][+][Ctrl+I] intellij Edit bubble can‘t display model name[/+]Patrick-Erichsen commentedon Jan 15, 2025
@AfterStories can you share your config.json and the version of Continue you are on?
AfterStories commentedon Jan 16, 2025
@Patrick-Erichsen
I just pulled the latest code from the main branch (latest commit 6c3bbd5). I think the current version is 0.0.85
The only thing I changed in config.json is model ,And based on my custom deve requirements, I need to display the model name as something like Gosu instead of claude, even though I use anthropic model
"Gosu" can be displayed under the input box of the chat webview, but it is displayed as null in the Edit bubble. is it can't display a custom string here?
Patrick-Erichsen commentedon Jan 16, 2025
Ah - I wonder if the space is causing issues? Can you trim the trailing space in your
title?e.g.
"title": "Gosu ",->"title": "Gosu",AfterStories commentedon Jan 17, 2025
@Patrick-Erichsen
I accidentally entered a space in that commit,so sorry caused a misunderstanding.
In fact, there is no space in my config.json, and I thinkI found out what caused this problem:
InlineEditAction.kt : Line 130
This is your source code, directly use the response as config :
But the config data is in responese.$$\color{red}{\textbf{result}}$$ .config$$\color{red}{\textbf{result}}$$ $$\color{red}{\textbf{result}}$$ , and then the config is obtained from the $$\color{red}{\textbf{result}}$$
After modifying it like this,print some logs,then I can get the config data from the
in the response obtained contains a layer of
And I can successfully get the value of the modelTitles ,and it can be displayed successfully

I don't understand kotlin code, I think maybe my changes are not accurate, so it still need you team as experts to fix the code, thanks~
AfterStories commentedon Jan 17, 2025
And I also found same problem in CoreMessengerManager.kt: Line 63
there is a result layer of in data, so profileInfo cannot directly get config here
Maybe there are similar problems in other files, please check
Patrick-Erichsen commentedon Jan 17, 2025
@AfterStories excellent work getting to the bottom of this! Made the fix here: https://github.com/continuedev/continue/pull/3754/files
This will be available in the EAP/pre-release for 0.0.86 we'll be releasing today. Thanks for your help!
lamcodes commentedon Jan 19, 2025
@Patrick-Erichsen
Hi, just wanted to check if the release has been completed? I don't see the 0.0.86 version available in the EAP/pre-release yet. Thanks for the update!
AfterStories commentedon Jan 21, 2025
@Patrick-Erichsen
I think your recent other issues fix caused the data structure change again here , so the function is unavailable again
branch: main
InlineEditAction.kt Line 132
Compared to before, there is one more layer of content
maybe continue could try building more sophisticated auto tests script for IntelliJ , so that avoid new fixes affecting old fixes
Patrick-Erichsen commentedon Jan 21, 2025
Thanks for your patience here @AfterStories , your comment above is accurate and fixed here: #3809
Also took your advice and added some end-to-end tests for the inline edit feature in that PR 👍
AfterStories commentedon Feb 17, 2025
@Patrick-Erichsen
Reopen this issue, this problem reappeared, today I tried to pull the latest main branch code to get the latest update, and found that the model name is not displayed.
The current problem seems to be caused by async data request, because when I set a breakpoint in the code and execute it step by step, the model name is displayed normally, but when I cancel the breakpoint and press CTRL+I, it shows null. It seems after getting the model data with async request, the interface is not updated? It seems that due to the breakpoint, the async process updates the UI
InlineEditAction.kt

I print the log here and see that the model name is right by request
then print log in JPanel(MigLayout("insets 0, fillx")).apply
But after getting the model name, I don't know why the UI is not updated to display it.
AfterStories commentedon Feb 18, 2025
@Patrick-Erichsen
When I set maxWaitTime to 1000, I found that the effect was correct. But only correct in local debug, when I build it as an install package zip, after install plugin ,There is a certain probability that null will still be displayed, and it seems that there is still an asynchronous probleml
It is likely related to the asynchronous execution order. When the request is initiated to get modelTitles, the UI rendering may have been performed before the data is ready, so show the null . However, when using breakpoint debugging, the execution speed is slowed down, and the data has enough time to be returned and filled into modelTitles, so the UI can be displayed correctly.
Maybe my computer has poor performance? 200ms doesn't seem to be enough to return data, Maybe it is safer to set this to 1000ms for users ?However, I think the best way is not to rely on waiting time to solve the asynchronous problem. There is still a chance that null will be displayed.
RomneyDa commentedon Feb 20, 2025
@AfterStories thanks for looking into this, I'll take a look today!
RomneyDa commentedon Feb 20, 2025
@AfterStories thanks for digging into this.
After looking into it I agree with your solution as the simplest bandaid for now.
Implemented here
#4263