eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.98k stars 2.5k forks source link

AI Workspace agent freezes #14285

Open dannaf opened 6 days ago

dannaf commented 6 days ago

Bug Description:

The Workspace AI agent 'generates' without displaying any response, perhaps only when querying the workspace.

As the screenshot below shows, my AI api key etc. is set up correctly and the AI agent is connected in the chat, given that the test message went through and a response was quickly provided. But when I asked even a simple question about the workspace, it got stuck and never displayed any result. (I eventually gave up and pressed the stop button — also to make sure it is not billing me for an infinite loop that it is not even displaying the results of, just in case.)

Steps to Reproduce:

  1. Enable the experimental AI features in 1.54.0 and connect an OpenAI API key in the settings.
  2. I then disabled all the agents except the Workspace agent in the AI configuration (maybe I still had the code-completion and terminal agents, but definitely disabled the other ones like command and universal).
  3. Type a simple test message that does not query regarding anything about the workspace ("Test" as shown below, or "can you hear me", etc.). Observe response from the AI agent to confirm that the API key is connected.
  4. Then query something about the actual workspace and observe the AI agent get stuck, supposedly 'generating'.

image

Additional Information

The Theia log showed the following message:

2024-10-10T11:35:53.610Z root ERROR [hosted-plugin: 263] There is no document for untitled:/Untitled-1aichatviewlanguage
JonasHelming commented 6 days ago

@dannaf : Thank you for the report. Was this a rather big workspace by any chance?

dannaf commented 6 days ago

Not at all

JonasHelming commented 6 days ago

Just to make sure, you can reproduce this all the time?

JonasHelming commented 6 days ago

I just tried the exact same query, it works for me. However, the question "How many lines of code" will probably force it to send every file, which might take a while. However, it is is doing this, you should see this already:

image