Gemini failing to respond or make edits? Try this

We’ve been looking into an issue where some users experience an issue with Gemini either not responding to a prompt, or Gemini claims it makes an edit but doesn’t actually change the code. This has been hard to reproduce but we think we might have narrowed it down to cases where the source code file in question is long (~500 lines). A workaround to try is increasing the max tokens in the IDE settings config.

If you don’t already have a folder called .vscode with a settings.json file in it, create one and add the following. If the file already exists, you can merge the property into the existing list.

.vscode/settings.json

{
    "IDX.aI.actionsInChatMaxOutputTokens": 32000
}

If you’ve experienced this problem and can consistently reproduce it, let us know if this workaround works for you.

5 Likes

Can you give me some detailed instruction on how to do this please, I’m not a techie person. I have tried to impliment this code, but I have no idea how to actually do it.

image

I’m not sure if you need to refresh your browser window after saving the setting or not.

2 Likes

@jamesor Thank you very much for doing that!
I added the code to the settings.json file - to the end of it. So far it looks good!

3 Likes

Terrific, glad to it!

2 Likes

@jamesor Hey James,
I’m still having issues with this, All I’m getting now is ither a “Wait” message or the Firebase Logo - but nothing else.
I have my billing attached and have an amount in there owing on the next cycle, but this app seems to be pretty imposible to complete a build out, unless it’s a one-page webform type app.

I’m looking at my options, but honistly, this doesnt seem to be very good at all.
Any help or comments would be appreciated :slight_smile:

1 Like

Can you send a screenshot of what you are seeing, careful to hide any private information. I’d like to see where the Firebase logo is appearing for you in the UI. Is this when you try to open the workspace, or during a chat conversation, or perhaps the agent hasn’t finished loading in the agent panel?

1 Like

Sure can, here it is.
I have a “conversation” where I asked it to impliment a change & this occured 6 times in a row.

Not a bad idea to ask Gemini to refactor your code either. Ask it to breakup long js files into smaller more manageable and task specific chunks. You can even take it outside of Firebase Studio and put it directly into gemini.google.com, ask it to use ‘best practices” to make smaller task specific chunks, then take the resultant code, and put it back into Firebase Studio and let it knw what you did and task it to review the modifications and update any other links to handle the newly changed and created file(s)

2 Likes

As an experiment, switch over to Code Mode and create a new chat session and see if you have the same token issue.

My preference, after using Prototyper to establish the prototype of the application, I switch over to Code Mode and use the internal chat (not Prototyper) for continued feature development. Each new feature I start a fresh new chat session. I keep old chat sessions around if I want to multitask across different conversations but usually I just delete the chats when I’m done with the feature.

Let me know if you try this and how it works out for you.

1 Like

thank you for the tips Jamesor, I have added the setting and will also try internal chats.

if we set 64000 is that even better?

I have seen again a few times where he claimed to have added elements but he actually didn’t.

1 Like

@Damon_Hoxworth Thnks very much! I’ll give that a try, hopefully, being a Google app, they will incorporate all these setting nativley at some point. Sort of reminds me of installing a computer game in the early 90’s, where we had to manually set up all the settings to make the game work!
I appreciate your help sir!

Thanks @jamesor I will try that approach also, hopfully, we can get it dialed in to work as it should. Your help is really appreciated!