Skip to content

Conversation

colin-grant-work
Copy link
Contributor

@colin-grant-work colin-grant-work commented Apr 8, 2025

What it does

This PR adds a number of capabilities to the AI chat system discussed in #15094:

  • The ability for particular agents to contribute suggestions to the chat, which are rendered above the input.

At the moment, these are a static part of the agent's declaration. They could be implemented as a push system (agent fires event when suggestions changed) or pull system (agent can implement a method that is passed, e.g. a ChatSession and returns suggestions).

  • A new context variable type: session summaries, along with facilities to generate summaries, resolve summary variables, and resolve a set of summaries as part of the system prompt of a given agent.
  • The ability to open editors to view the values of context variables.

I'm not 100% sold on this feature. For one thing, it's a bit redundant for files. For another, at the moment, the content would be basically static and reflect the value of the variable at the time that it was resolved (the time at which the editor was opened). It might be possible to use the resolution context to provide updates when the variable service resolves a variable - e.g. if the same session is involved - but the way things are declared at the moment, it's hard to use the resolution context in a generic way.

Closes #15094

To do:

  • 2.1: I would introduce this in the default renderer, i.e. actions in the text plus optionally additional actions that are shown under "more" in a popup. Follow-up created: Theia AI - Epic - next #15068
  • show progress when creating the summary (or create it earlier).
  • I think I'm watching for file changes but not doing anything when they happen - implement updates if files are deleted / modified on disk.
  • Maybe hook up response rendering system instead of current (almost) direct markdown?

How to test

  1. Have a conversation with an agent.
  2. Start a new chat.

If your first chat was with Coder, it should give you two suggestions about starting a new chat, or starting a new chat with a summary of the current chat. If you choose the latter, it should automatically add a context variable.

  1. You can add a summary of the first chat to the current chat in a couple of ways:
  • it can be added to the context using the + in the bottom left of the input. Choose 'Session Summary' and then the session you're interested in.
  • it can be added to a message using #session-summary:<id> - you should get auto-completion.
  1. If you add a session summary, it should be included in the message to the LLM - check the history.

There's bit of a UX hiccup here. It takes several seconds to get the AI-generated summary for the first time (or to generate a new one if the session to be summarized adds messages). Only once that interaction is complete do we initiate the request that required the summary. Perhaps we should show the user message in the UI before we've parsed all of its variables, and then show the progress message until we start getting content back for the main request?

  1. Separately, if you add any kind of variable to the context, you should be able to click on the element in the context display and see the resolved value of that variable, e.g. the summary it provides of a given chat session.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Apr 8, 2025
@colin-grant-work colin-grant-work force-pushed the feature/agent-suggestions branch 4 times, most recently from d58e8c2 to b249a03 Compare April 8, 2025 21:13
@eneufeld
Copy link
Contributor

eneufeld commented Apr 9, 2025

I tested this. The ui looks nice and I think this is a great improvement.

This was my test:

  • initial prompt: @Coder suggets improvement for #currentRelativeFilePath
  • After the answer (which contained reading the file and a changeset) I then started a new chat with a summary (the load took a bit without a progress what was concerning)
  • Looking at the context, it did not contain any of the file references
  • Then I prompted: how do we continue? and it searched the workspace to find the file from the first prompt but only based on the class name it had in the summary.

Based on this I would suggest:

  • resolve variables in the summary
  • show progress when creating the summary

@JonasHelming
Copy link
Contributor

Quick tested this, looks cool, but i want to dig into it more. We should collect all feedback before iterating on it, but thanks Colin for preparing this!

@planger planger self-requested a review April 14, 2025 16:12
Copy link
Contributor

@planger planger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, I just want to say how much I like these powerful features added here—really great work!

A couple of thoughts from my side:

Suggestions Handling: I feel the suggestions are conceptually quite close to the chat session’s change set in their lifecycle, how they are created and updated, and also how they are shown to the user (as a dedicated area near the input, in reference to a chat session). So I feel like it might be better to manage these suggestions in a similar manner, i.e. directly within the chat session itself. That way, the agent or tools could update them dynamically based on the current context—like proposing follow-up questions or suggesting the user start a new task once the session only after it reached a certain length. That flexibility could really open up a lot of additional use cases.

UI Representation: I agree with Jonas—it’d be great to support going beyond markdown and support richer UI in suggestions area. That said, this raises some interesting questions. If we keep suggestions with the chat session and have them filled by agents or tools, it might feel awkward to directly create React nodes. So far, agents rather produce chat response nodes, and those are transferred to the UI using dedicated renderers. Should we stick with that model or would that be a misuse of the chat response infrastructure we already have?

TaskContextService: I also like the idea of pulling out the chat task management logic and persistence into a separate service and the summarization into a specific agent. That abstraction would make creating summaries and managing task contexts accessible not only through variables but also through a more direct API to agents and potentially other consumers. This feels like a good move for configurability of the summarization (LLMs and prompts) and reusability of reading or creating tasks.

Thanks again for the great work!

@colin-grant-work
Copy link
Contributor Author

Should we stick with that model or would that be a misuse of the chat response infrastructure we already have?

I think that that is the closest analogue we have if we decide we want to allow LLM's to contribute suggestions of their own, rather than hardcoding them on specific agents. Then it wouldn't be an abuse of the system, but just the system: if the LLM is generating them, then they are just responses :-). For now, though, I haven't provided a mechanism for the LLM's to suggest things, but only for agents to provide suggestions. How they get them is left open, though.

@JonasHelming
Copy link
Contributor

You can click now on any context variable, e.g. also instances of the file variable. However, for the file variable, it opens an empty read only editor for me. This is unexpected, it should open the underlying file instead.
As this behavior is not really part of this feature, I am also perfectly fine with restricting the click to the new taskContext variable, only.

@JonasHelming
Copy link
Contributor

Is there a reason why we make the editor for tastContexts read only for the case that there is no underlying file? Could we easily allow the user to modify it in memory instead? This can for sure be a follow-up, but we should capture it.

@JonasHelming
Copy link
Contributor

If persistence for taskContexts is set-up, the in memory version is still kept, so you have two versions of the same taskContex then.

  • Create a task context (via Coder suggestion click)
  • Resolve it (e.g. via saying something in a new chat
  • type "#session-summary:" => You see two version of the tastContext, the file and the in-memory one

=> If persistence is active, we should fully get rid of the in memory ones I think

@JonasHelming
Copy link
Contributor

When I click on a taskContext variable in the chat which points to an underlying file, it opens a read only editor. This is unexpected, it should open the underlying file.

}
async suggest(context: ChatSession | ChatRequestModel): Promise<void> {
const model = ChatRequestModel.is(context) ? context.session : context.model;
const session = this.chatService.getSessions().find(candidate => candidate.model.id === model.id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@planger Is this the expected way to get sessions now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@planger Ping

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in this case we don't even need to retrieve the actual chat session, because model.id should always be equivalent to the ChatSession.id (see chat-serivce.ts:187).

In general, we do have a distinction there:

  • The ChatModel encompasses all information on a conversation (also referred to as session in the chat model, e.g. ChatRequestModel.session).
  • The Chat Service wraps each ChatModel into another object, called ChatSession, which also adds more UI-related state relevant for the chat service, such as whether the session is currently active in the chat view, the currently pinned agent, last interaction, etc.

But the IDs should always be the same.

Copy link
Contributor Author

@colin-grant-work colin-grant-work Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because model.id should always be equivalent to the ChatSession.id (see chat-serivce.ts:187).
... But the IDs should always be the same.

This is (currently) true (for our implementation of ChatSessions), but not guaranteed by the interfaces / API, so I'd prefer to keep the structure that matches ID's on elements that are supposed to be the same.

The alternative is the getSession API, which does the same iteration, so this isn't much less efficient:

getSession(id: string): ChatSessionInternal | undefined {
return this._sessions.find(session => session.id === id);
}

Alternatively, we could add a reference to the session on the model, or an API on the chat service to retrieve a session given a model?

@colin-grant-work
Copy link
Contributor Author

colin-grant-work commented Apr 18, 2025

When I click on a taskContext variable in the chat which points to an underlying file, it opens a read only editor. This is unexpected, it should open the underlying file.

We can do this, but it would require different services. At the moment, we create one kind of resource and then populate that using the variable resolution system, which returns text. The editor is readonly (and not hooked up to language services, etc.) because the variable resolution system doesn't know anything except that it can get a string. If we want to open the underlying file, then we have to add to the variable resolver interface the possibility of opening a variable so that resolver itself can decide whether to use a variable-specific resource or a standard URI. Would you like that as part of this PR?

Is there a reason why we make the editor for tastContexts read only for the case that there is no underlying file? Could we easily allow the user to modify it in memory instead? This can for sure be a follow-up, but we should capture it.

The answer is the same for this: we're not opening the file, we're retrieving the value of a variable.

@JonasHelming
Copy link
Contributor

When I click on a taskContext variable in the chat which points to an underlying file, it opens a read only editor. This is unexpected, it should open the underlying file.

We can do this, but it would require different services. At the moment, we create one kind of resource and then populate that using the variable resolution system, which returns text. The editor is readonly (and not hooked up to language services, etc.) because the variable resolution system doesn't know anything except that it can get a string. If we want to open the underlying file, then we have to add to the variable resolver interface the possibility of opening a variable so that resolver itself can decide whether to use a variable-specific resource or a standard URI. Would you like that as part of this PR?

Is there a reason why we make the editor for tastContexts read only for the case that there is no underlying file? Could we easily allow the user to modify it in memory instead? This can for sure be a follow-up, but we should capture it.

The answer is the same for this: we're not opening the file, we're retrieving the value of a variable.

I see! @planger WDYT about this? I think we will want this anyways, also for the file variable, right?

@JonasHelming JonasHelming mentioned this pull request Apr 19, 2025
61 tasks
@@ -224,29 +224,54 @@ export class DefaultResourceProvider {

}

export type ResourceInitializationOptions = Pick<Resource, 'autosaveable' | 'initiallyDirty' | 'readOnly'>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is hard to understand as opposed to a simple interface type.

Copy link
Contributor Author

@colin-grant-work colin-grant-work Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also guaranteed to maintain the correct type if anything changes in Resource. For example, readOnly had changed from boolean to boolean | MarkdownString since the original declaration was written, and the declaration hadn't kept up.

protected contents: string = '';
protected contents: string | Promise<string>;

constructor(readonly uri: URI, protected options?: ResourceInitializationOptions) { }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes all of the fields in this class effectively mutable.

Copy link
Contributor Author

@colin-grant-work colin-grant-work Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consider that an advantage, given that it does have Mutable in its name. You could consider these changes an answer to the objection that previously, the only thing 'mutable' about a MutableResource was its content and not any of the other fields on a Resource, when there are good UX grounds for wishing for an in-memory resource that can do whatever other resources can do. Why not be able to mark it readonly? Why not be able to say why it's readonly? Why not be able to say that it's initially dirty? Why not be able to customize its save behavior without having to create a new resource class (and so new resource resolver) for every particular use case?

@colin-grant-work colin-grant-work force-pushed the feature/agent-suggestions branch 2 times, most recently from a09abf6 to 393d311 Compare April 25, 2025 17:10
Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great work. All comments from mine besides the regression mentioned below could be handled in follow ups if the time until release runs out.


I had a quick look through the code however I did not check every line in detail. I tried breaking the functionality but was not able too.


Architecturally I understand that each agent can add own suggestions. However it's a bit weird to me that such a generic suggestion like we have now for the Coder is not handled generically too.

Could be a good follow up.


Blocker regression: The edit chat button UI is broken because the input is not shown anymore.
image

Minor: The pointer is shown over the whole text instead of only the actions:
image

import { CHAT_SESSION_SUMMARY_PROMPT } from './chat-session-summary-agent-prompt';

@injectable()
export class ChatSessionSummaryAgent extends AbstractStreamParsingChatAgent implements ChatAgent {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ChatSessionSummaryAgent should not be a chat agent as it is not intended to be addressed by the user within the chat. Instead it should just be a regular agent like the chat naming agent.

Screenshot from 2025-04-25 22-20-35

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed tag.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not even implement the ChatAgent interface

@colin-grant-work colin-grant-work force-pushed the feature/agent-suggestions branch from afa557a to 2980e72 Compare April 25, 2025 23:34
@colin-grant-work
Copy link
Contributor Author

Blocker regression: The edit chat button UI is broken because the input is not shown anymore.

Fixed the initialization of the new AIChatTreeInputWidget so that the error causing the apparent disappearance wouldn't occur.

Minor: The pointer is shown over the whole text instead of only the actions:

Tweaked the check here so that it wouldn't appear on non-callback suggestions.

@colin-grant-work colin-grant-work force-pushed the feature/agent-suggestions branch 2 times, most recently from da60c8d to cb9728b Compare April 25, 2025 23:41
Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me! Thanks for the work!

Potential follow up:
The agent can now be successfully disabled, however the UI does not react.

  • If the user tries to trigger a summary, they do not get an error shown, so they don't know what is going wrong (maybe they forgot that they disabled the agent)
  • In case the agent is disabled, we could hide the "start new chat with summary" text in case the summary does not exist yet (as it will not be creatable)
  • In case the agent is disabled, we could hide the "summary chat" action in the toolbar (but keep the "show summary one)

import { CHAT_SESSION_SUMMARY_PROMPT } from './chat-session-summary-agent-prompt';

@injectable()
export class ChatSessionSummaryAgent extends AbstractStreamParsingChatAgent implements ChatAgent {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not even implement the ChatAgent interface

@github-project-automation github-project-automation bot moved this from Waiting on reviewers to Needs merge in PR Backlog Apr 27, 2025
@colin-grant-work colin-grant-work force-pushed the feature/agent-suggestions branch from cb9728b to 3e0d58c Compare April 28, 2025 02:26
@colin-grant-work colin-grant-work force-pushed the feature/agent-suggestions branch from efacf04 to 140e4a3 Compare April 28, 2025 15:44
@colin-grant-work colin-grant-work force-pushed the feature/agent-suggestions branch from 140e4a3 to 05f022c Compare April 28, 2025 16:03
@colin-grant-work colin-grant-work merged commit 8366fff into master Apr 28, 2025
8 of 11 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Apr 28, 2025
@github-actions github-actions bot added this to the 1.61.0 milestone Apr 28, 2025
@colin-grant-work colin-grant-work deleted the feature/agent-suggestions branch April 28, 2025 22:53
@JonasHelming JonasHelming mentioned this pull request May 5, 2025
16 tasks
robertjndw added a commit to robertjndw/theia that referenced this pull request Jun 24, 2025
* fix: autocomplete content in chat view (#15240)

Fixes autocomplete content not showing up in inline editors like the
ChatInput.

With the Lumino migration we disabled 'fixedOverflowWidgets' in our
Monaco editors, as Lumino widget styles leverages 'contain',
influencing the position of autocomplete content.

This is now reverted, and instead the 'contain' of Lumino widgets is
forcefully disabled, fixing the autocomplete issue.

fixes #15237

Co-authored-by: Eugen Neufeld <eneufeld@eclipsesource.com>

* Limit the width of tab-bar rows to 100% of parent (#15260)

Fixes #15254

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Refine AI setting descriptions (#15250)

* Add shortcut for adding the current file to the AI chat context (#15252)

* fix: Pin node-abi version to 3.x due to Node.js 22+ requirement in 4.x (#15212)

* pins the node-abi version to resolve the compatibility issue where node-abi 4.x requires Node.js version 22 or higher

* remove unused package node-abi @types/node-abi

* update package-lock.json after delete node-abi

* Prevent plugin host localization errors (#15268)

* Allow to add all MCP functions via prompt fragment (#15270)

fixed #14952

* [vscode] Support keepWhitespace in SnippetTextEdit and insertSnippet (#15176)

fixes #15131

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* Workspace Symbols: Pass multiple classnames as array of strings (#15244)

* Dispose of child InstantiationServices in MonacoEditor (#15246)

* Add news section with AI to welcome page (#15269)

* Add news section with AI to welcome page

* chore: make parameters in ToolRequest mandatory (#15288)

Previously, parameters were optional, indicating that a tool request
doesn’t take any. However, most LLMs produce better output when
parameters are explicitly set to empty. This is now the default in
TheiaAI.

* chore: change private members to protected in ChatViewTreeWidget (#15297)

Enhance extensibility for adopters by converting private functions and
injections to protected in the ChatViewTreeWidget.

Signed-off-by: Roman Piper <roman.piper@mvtec.com>

* Add variable completion for {{}} syntax in prompttemplate (#15026)

The prompttemplate editor now supports autocompletion for variables using `{{` and `{{{` .

fixes: #15202

* Add MCP Server config view to AI Configuration (#15280)

Improve MCP services:
- Introduce notification mechanism to listen to MCP server changes.
- Created common interface for MCPFrontendService.
- Rename getStartedServers() to getRunningServers().
- Added status handling to MCPServer (NotRunning, Starting, Running, Errored):
- Add getServerDescription endpoint to retrieve information about the server.
- Add status, error message and tool information to MCPServerDescription.

- Add MCP Config view to AI Configuration:
- This view helps to see the state of MCP servers.
- Displays all the created settings. Obfuscates tokens (very basic support).
- Shows the status of a server (Running, Starting, Errored, Not Running).
- Shows all tools available. Let's the user easily copy the tools for chat and prompttemplate use.
- Offers a button to start/stop the view.

Fix autostart stopping for following servers if one fails:
- Before this the autostart would stop for all following servers if one failed.
- This was due to uncatched errors when trying to resolve the tools.
- To prevent this in the future, improved the handling of the getTools() on client side.
- Also adapted the Start Command to use the new status reporting instead of calling getTools() again.

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* Consolidate widget labels (#15304)

fixed #15303

* fix: getFileDiagnostics waits forever (#15305)

* Use fixed version 1.5.5 of perfect-scrollbar (#15279)

Fixes #15277, #15232

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* feat: thinking support, request settings and communication restructuring (#15092)

Support for Claude's thinking feature has been added by updating the
Anthropic SDK to v0.39.0, implementing ThinkingChatResponseContent,
adding a TextPartRenderer for displaying thinking content, and updating
the language model request handling throughout the code.

Centralizes all LLM communication via the new LanguageModelService.
Leveraging this service, adopters can easily customize LLM request
handling.

Greatly enhances the model request settings, allowing configuration of
default request settings for LLM providers, specific LLM models and
agents. The request settings are merged with the handed over request
settings via the new LanguageModelService.

Additionally, request settings can now be set per session via the Chat
UI, which is useful for quick experimentations, eliminating the need to
manually modify preferences.

Co-authored-by: Philip Langer planger@eclipsesource.com

* feat(chat): add customizable welcome message (#15316)

Extracts the disabled AI message and adds a welcome messages for the chat view. Both messages are provided by a customizable DI binding. The current messages are moved into the `ai-ide` package.

* Improve dirty diff & avoid instantiation service leakage (#15238)

* Ensures that a valid InstantiationService is available for
  hover delegate creation
* Improves dirty diff functionality to work when editor modified

* Hide overflow in view container headers (#15321)

Fixes #15274

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* fix: do not set anthropic tool choice without tools (#15329)

Makes sure to not hand over the 'tool_choice' parameter to the
anthropic SDK if there are no tools to choose from. The SDK will throw
an error otherwise.

fixes #15327

* fix: communication recording in Orchestrator (#15328)

Restores communication recording in Orchestrator chat agent. Makes sure
an own request id is used for history recording.

* Explicitly set scrolling element to avoid document scroll (#15315)

* Fixes document scroll on node selection in preferences view

* Prevent SiW overflow & scrollbar (#15287)

* feat(chat): introduce LLM-based chat naming and last interaction date (#15116)

Finding chat sessions is currently very difficult as we are recoding the last request as a name. It'd be better to use a language model to generate a name for the chat session and also record the last interaction date, to have proper sorting and a chronological relation to the chat sessions.

Moreover, this PR allows users to manually specify a name for the chat session, which will be used instead of the generated name.

Fixes https://github.com/eclipse-theia/theia/issues/15115

Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>

* Turn automatic inline code completion off by default (#15333)

fixed #15332

* [vscode] Rename AuthenticationForceNewSessionOptions (#15264)

fixes #15133

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* Allow project specific prompt additions (#15236)

* Allow project specific prompt additions

fixed #15200

* Bump VS Code API version (#15341)

Fixes #15138

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* Set selection upon editor navigation only after editor is fully visible (#15302)

This change required the introduction of "navigation transactions",
where a location is not remembered in the navigation location stack
while another navigation transaction is still active. This prevents
the navigation location service from recording intermediate locations
while navigating to an already open editor. Only the final location in
simultaneous transactions is recorded.

Fixes #15145, #15191

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Correctly set dirty state when current save is canceled (#15310)

* Normalize results of Path.join (#15331)

* Ensure all tool providers bound to self (#15330)

* Allows downstream application to override individual tool implementations

* chore: remove outline in the chat session settings editor

* Modify link in AI chat instructions to show AI settings directly (#15326)

* fix: add missing `editor` dependency to `console` (#15354)

Closes eclipse-theia/theia#15353

* Show context menu for editor minimap (#15220)

Fixes #15217 and #13070.

* Relayout dock panel when breadcrumbs become active (#15342)

Fixes #15273

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* [vsode] Support command workbench.extensions.command.installFromVSIX (#15179)

fixes #15169

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* chore: improve style of code blocks in modern theme

* [vscode] make DiagnosticCollection iterable (#15361)

fixes #15348

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* Do not re-export the configuration folder as env variable (#15376)

Before this the configurationFolder (which includes the user settings for example) was exported as a env variable THEIA_CONFIG_DIR.
This is problematic, as we also allow users to define a configurationFolder via this variable,
and use it whenever provided for a new session.
Therefore, if you debug another application from a Theia tool (e.g. the Theia IDE) you will always get the tools configurationFolder, which is probably not intended.
As this results in settings being changed in the started application to also be applied in the root too (e.g. colorTheme).

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* Minor Improvements MCP View (#15364)

* Minor Improvements MCP View
* Add third button for prompt fragment in prompt template
* Remove copy chat specific button for single functions

fixed #15363

* Use camelCase in React SVG (#15367)

* fix: fix response content in language model utility

I ran into cases where the getTextOfResponse() appended `false` to the returned string.

* Refine coder prompt (#15358)

fixed #15357

* Make icons right-aligned. (#15373)

fixes #15296

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* add native google ai-provider (#15334)


Co-authored-by: Jonas Helming <jhelming@eclipsesource.com>

* Translation update for version 1.60.0 (#15382)

* docs: split changelogs by year

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* docs: update changelog for 1.60.0

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* core: update re-exports for 1.60.0

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* v1.60.0

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* Wait for async creation of 15370_wait_for_debug_console_widget (#15388)

Fixes #15370

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* white label prompt templates (#15322)

* Remove Theia name from prompt template labels

Signed-off-by: Roman Piper <roman.piper@mvtec.com>

* feat(chat): enhance streaming content parsing for incomplete response content matches (#15387)

- Refactored `addStreamResponse` method to maintain a complete text buffer for streamed responses, improving handling of incomplete matches.
- Introduced `ProgressChatResponseContent` interface and its implementation to support progress updates in chat responses via incomplete matches
- Updated `parseContents` function to differentiate between complete and incomplete matches, allowing for better content management during streaming.
- Added unit tests for new functionality in `parse-contents-stream.spec.ts` and updated existing tests to utilize custom matchers for code content parsing.

Fixes https://github.com/eclipse-theia/theia/issues/15386

* Add initial support for tracking token usage

* [vscode] remove proposed API createFileSystemWatcher (#15265)

fixes #15135

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* Provide range to completion item to allow for correct inline display (#15398)

* Support `fix-path` in non-bundled environments (#14819)

* Revert #15331 to fix webviews (#15421)

Fixes #15416

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* fix cell editor and notebook output selection (#15384)


---------

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>

* Add DOCKER_HOST support to devcontainer (#15350)

---------

Signed-off-by: KnowZero <KnowZero@users.noreply.github.com>

* Add the ability to disable installed plugins (#15205)

Step 1 of #13901

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* fix: implement the registerDiffInformationCommand to resolve issue #14144 (#15406)

* Clarify replace function description (#15442)

fixed #15441

* Add project info prompt fragment (#15449)

fixed #15448

* docs: Fix broken links in documentation (#15454)

Signed-off-by: Per Tillisch <accounts@perglass.com>

* chore(polyfills) remove es6-promise & setImmediate (#15436)

Signed-off-by: Alexander Taran <a.taran@outlook.com>

* Correctly return tool input when creating the message 

For tool calls which had no arguments, the tool input was returned as empty string which
does not work for some models.

fixes #15455

* NPM upgrade

Removed version fix of `@types/express-serve-static-core` to `5.0.4`.

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* Resolve unresolved variables to empty string (#15463)

* Resolve unresolved variables to empty string

- Unresolved prompt fragments
- Empty changesets

fixed #15453

* Fixes switching the localization language back to the default

Fixes https://github.com/eclipse-theia/theia/issues/15444

* AI Chat UI: Minor presentation improvements (#15344)

* Collapse label in order & no explicit nbsp
* Also use the label provider system's details for context items
* Remove linebreaks from start and end of chat messages

* Only call resolve() on tasks that have no execution (#15480)

Fixes #15171

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Avoid double registration of sticky scroll toggle (#15366)

Removes registration of editor.action.toggleStickyScroll
command in monaco package in favor of editor package registration

* Clarify error for multiple occurences during replace (#15481)

* Clarify error for multiple occurences during replace

* Fix test

---------

Co-authored-by: Colin Grant <cgrant.ext@eclipsesource.com>

* fix: typo in code completion prompt (#15383)

fixes #15379

* add gpt-4.1 models to the list of default models (#15465)

* add gpt-4.1 models to the list of default models
* add o3 and o4-mini

* Add Gemini Flash 2.5 to default models (#15487)

* Fixes #15475 by properly calling the toOllamaXxx() methods

Signed-off-by: Stefan Winkler <stefan@winklerweb.net>

* Support version for installExtension, support uninstall cmd (#13795, #13796) (#14298)

* fix: use `ElectronConnectionHandler` to connect updater services (#15430)

Signed-off-by: Giacomo Cusinato <giacomo@cusinato.co>

* More legible history entries (#15483)

* fix(chat): ensure we keep space after variables and agent label in place

* Hide overflow on sidebar-toolbar (#15492)

Fixes #15468

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Remove @theia/git from release (#15471)

stop publishing deprecated extension

* Make preventTabbingOutsideDialog more easily overridable (#15460)

- Add comment about functionality
- Expose application shell classes for easier reference

Fixes #15417

* Introduce editable chat requests (#15479)

Closes https://github.com/eclipse-theia/theia/issues/15295

* Fix ScanOSS button/icon in chat ui (#15339)

Co-authored-by: Philip Langer <planger@eclipsesource.com>

* Allow workspace specific custom agents (#15457)

fixed #15456

* Add support for search in workspace

fixes #15467

* Add a new tools which allow to list and run tasks

fixes #15503

* Add next template for coder

Co-authored-by: Jonas Helming <jhelming@eclipsesource.com>

* Use SimpleMonacoEditor for most inline cases (#15389)

* Fix breakpoint editor shrinking in size (#15515)

Fixes #15241.

* Pass the original argv to the "second instance" handler (#15124)

Fixes #14747

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Update dirty diff when editor becomes visible. (#15505)

Fixes #15426

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Add Terminal via "+" in terminal tool bar (#15470)

* Add Terminal via "+" in terminal tool bar

fixed #15282

* Reacto to editor model changing. (#15509)

Fixes, #15498, #15497, #15496

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Basic ssh_config support (#15499)

 ---------

Signed-off-by: KnowZero <KnowZero@users.noreply.github.com>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Co-authored-by: Jonah Iden <jonah.iden@typefox.io>

* Use editor widget as key for debug editor models (#15516)

Fixes #15510

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Agent prompt suggestions & chat summary (#15427)

* Architect suggestion to summarize and continue with Coder (#15512)

* Update deprecated xterm dependency (#15523)

fixes #13896

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* Translation update for version 1.61.0 (#15530)

Co-authored-by: Simon Graband <sgraband@eclipsesource.com>

* Remove git deprecation from Publishing

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* docs: update changelog for 1.61.0

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* core: update re-exports for 1.61.0

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* v1.61.0

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* Use ubuntu 22.04 runner in package native dependencies step

Ubuntu 20.04 runner is deprecated.

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* Stub conpty.node import on linux and macos (#15443)

Signed-off-by: Parisa Betel Miri <parisa.betelmiri@microchip.com>

* Add test infor and code guidlines to project-info (#15537)

* Make monaco commands available through command palette for notebook cells (#15538)

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>

* Improve handling of proxy errors and logging (#15478)

* Add initial prompt for coder agent mode (#15569)

* Add initial prompt for coder agent mode

* Add default context resolution for custom agents (#15571)

* Add default context resolution for custom agents

* Refactor menu nodes (#14676)

Fixes #14217

Makes menu nodes active object that can decide on visibility,
enablement, etc. themselves.

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
Co-authored-by: Dennis Huebner <dennis.huebner@gmail.com>

* Improve playwright tests reliability (#15446)

* Improve playwright tests reliability

* Use monaco editor instead of its container internally

* Workaround a bug where a new cell doesn't contain monaco-editor

* Use proper locator for monaco editor. Added editor wrapper page object.

* More reliable execution counter retrieval

* Clean up handling of "toggle maximized". (#15547)

Fixes #15462, #15525

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* feat: add generic AI communication model (#15409)

Adds a new AI communication model for tracking raw LLM requests and
responses. Tracking is automated via the language-model-service.

This model serves as the foundation for:
- Extracting communication history from Theia AI, allowing LLM testing
  without running the full Theia-based application
- Replaying LLM communication without using an actual LLM, enabling
  deterministic integration tests
- Removing the clunky communication recording service, making the
  ai-history package optional

Resolves #15221

Contributed on behalf of STMicroelectronics

* Subscribe to decoration changes at initialization (#15573)

* When the DebugEditorModel attaches to the editor, it initially does not receive decorations updates. Only when changing the file, decorations are updated.

Fixes #15567

Signed-off-by: Florian Richter <florian.richter@mvtec.com>

* Use shouldAutoSave when closing widget (#15502)

* Respect editor associations when opening diff-editors (#15422)

Fixes #15401.

* [vscode] Support TerminalState shell property (#15514)

[vscode] Support TerminalState shell property

fixes #15433

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* Update tree upon becoming visible (#15595)

Fixes #15592

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* deps: Bump tar-fs to 3.0.8 (#15562)

tar-fs 3.0.8 fixes CVE-2024-12905
(https://security.snyk.io/vuln/SNYK-JS-TARFS-9535930)

Contributed by STMicroelectronics

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>

* deps: Bump dompurify to 3.2.4 (#15564)

dompurify 3.2.4 fixes CVE-2025-26791
(https://security.snyk.io/vuln/SNYK-JS-DOMPURIFY-8722251)

Contributed by STMicroelectronics

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>

* [vscode] Support CommentAuthorInformation in CommentThread canreply (#15598)

fixes #15558

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* Close secondary windows on reload (#15591)

Handle closing secondary windows on reload in the electron changes

Fixed #15533

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Implement "code actions on save" (#15555)

Fixes #14955

Contributed on behalf of STMicroelectronics

* feat(hover-service) make hover-service use platform showPopover() (#15452)

Signed-off-by: Alexander Taran <a.taran@outlook.com>

* Clarify resolution of context files for Coder an Architect (#15579)

* Clarify resolution of context files for Coder an Architect

* chore: hide suggestions from chat input for message editing

Fixes https://github.com/eclipse-theia/theia/issues/15616

* feat: introduce experimental generic LLM provider via Vercel AI

Adds OpenAI and Anthropic for testing.
For now everything is in one package, but we should eventually split that
into a generic vercel package and a package for each provider.

Tested tool calling, streaming and structured output.
Did not test custom OpenAI compatible and Azure models.

Co-authored-by: Eugen Neufeld <eneufeld@eclipsesource.com>

* chore: commit lock file changes (#15630)

Closes eclipse-theia/theia#15627

* fix: remove duplicate npm script (#15631)

Closes eclipse-theia/theia#15628

* Allow to see editor hovers while debugging (#15609)

Currently, when debugging, hovers provided by the LSP server are not displayed, because the are disabled at the start of debugging.
This change will disable these hovers only while showing a debug hover.
Thus during debugging, debug hovers have priority over editor hovers.

Fixes #15170

Signed-off-by: Florian Richter <florian.richter@mvtec.com>

* Update OCT integration to v0.3 (#15633)

Co-authored-by: Jonah Iden <jonah.iden@typefox.io>

* Clean up next coder prompt (#15634)

* Clean up next coder prompt

* Remove two more errors

* fix show all opened editors dropdown display by using correct icon class type (#15624)

Fixes #15623

- Fixes rendering issue in "Show all opened editors" quick pick dropdown caused by icon classes being passed as a string instead of a string array.
- Also refactors to reuse the existing constant for the quick input prefix when executing the command.

* fix: correctly handle empty text response (#15638)

The stream chat agent was not correctly checking text content
and thus contents was duplicated.

* Open AI configuration View at bottom (#15637)

* deps: Bump multer to 2.0.0 (#15614)

multer 2.0.0 fixes CVE-2025-47944
(https://nvd.nist.gov/vuln/detail/CVE-2025-47944)

Contributed by STMicroelectronics

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>

* Improve File Change Set Functions (#15642)

* Add Claude 4 Models (#15640)

* Add Claude 4 Models

* refactor: use communication model in AI history view (#15540)

Refactors the AI history view to use the new AI communication model as
data input. Removes the now obsolete communication recording service.

The history now supports two visual modes: "raw" and "compact" for
easier inspection. Also added an option to toggle newline rendering.

The ai-history package now depends on ai-chat-ui instead of the other
way around. Therefore the AI history is now optional.

Resolves #15539

Contributed on behalf of STMicroelectronics

* Fix a repetition in the coder prompt (#15650)

* fix: chat input field does not show a scroll bar (#15654)

Closes #15580

* Improve Mistral support using openAI provider

* add stream_options/include_usage only for openai models
* add workarounds to correctly handle optional fields for mistral

* fix: check for a valid LanguageModelStreamResponsePart (#15653)

OpenAI returns empty stream parts which create an empty
newContent object and is added as a markdown part in the section not expecting a text part. This breaks all the logic.

A new check is added that checks for known stream parts.
Unknown parts are logged as a warning.

fixes #15646

Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>

* Add next prompt for architect (#15649)

* Use pointer capture for split handle dragging (#15643)

Fixes #15589

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* fix: overload ChatToolRequest.handler (#15655)

Under TS `strictFunctionTypes`, `ChatToolRequest[]` was not assignable
to `ToolRequest[]` because its handler signature narrowed the `ctx`
parameter.

Adding a second overload matching the base `ToolRequest` signature
(`handler(arg_string: string, ctx?: unknown)`) restores assignability
in `strict` mode, while still exposing the stricter
`MutableChatRequestModel`-required overload for chat code.

Related to #15648

Also fixes typos in templates, symbols and consts

* WSL remote support (#15543)

---------

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>

* Render groups correctly in "more" tab bar menu (#15647)

Fixes #15636

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Introduce debounce for inline AI code completion

Closes #15399

- debounces inline AI code completion requests
- adds new preference `aiFeatures.codeCompletion.debounceDelay` (default 300 ms)
- explicit trigger bypasses the debounce entirely

* Prompt management refactoring and view (#15632)

Unified naming:
- Introduced clear separation between prompt templates (text) and prompt fragments (template + metadata)
- Added support for 0...1 built-in versions per fragment and unlimited custom versions
- Agents are now assigned prompts instead of prompt templates
- Agent prompts are a set of variant (1...n), which are prompt fragments, united under one id.
- Added selected & active variant logic for system prompts

The prompt service is now responsible for handling all requests regarding prompts.
This includes customization's (will be forwarded to the customization service, if one exists).
Also handles the newly introduced agent prompts.

Changed agents prompts declaration:
- Agent now provide the id of the system prompt they are using.
- Additionally they need to define the default variant, but can register many more variants.

Improved logic in prompt-service:
- Added listener when the prompts have changed
- Removed as much assumed information about the customization service as possible (e.g. file name)
- Added PromptVariantSets, selected & active variant maps to keep the state.
- Introduces types for BuiltInPromptFragment & CustomizedPromptFragment.

Introduces a new widget for configuring AI prompt fragments and PromptVariantSets.
Displays all PromptVariantSets, which agent they are used by, their variants and customizations.
Shows the active and selected variants as well as the active customization.
Offers buttons to revert to a certain customization or deleting it.
Allows the user to create a customization of built-in prompt fragents.
Displays the template text for each customization.
Shows prompt fragments that are not associated part of a variant set.

* [vscode] bump vscode API compatibility to 1.99.3 (#15658)

fix #15435

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* Translation update for version 1.62.0 (#15667)

Co-authored-by: jfaltermeier <jfaltermeier@eclipsesource.com>

* chore: clarify API key description for Vercel AI keys (#15665)

Extends the description of the API key preferences of Vercel AI to
clarify that the keys will be used by the Vercel AI SDK.

Co-authored-by: Philip Langer <planger@eclipsesource.com>

* Translation update for version 1.62.0 (#15673)

Co-authored-by: jfaltermeier <jfaltermeier@eclipsesource.com>

* Fix localization of files in `electron-browser` (#15677)

* Translation update for version 1.62.0 (#15678)

Co-authored-by: jfaltermeier <jfaltermeier@eclipsesource.com>

* docs: update changelog for 1.62.0

* core: update re-exports for 1.62.0

* v1.62.0

* fix: support more than 10 tool calls via OpenAI SDK (#15696)

We use the convenience "runTools" API of the OpenAI SDK to handle
requests with tool calls. By default, the SDK stops after 10 chat
completions, whereby each function call is counting as one. Thereby the
SDK just stops generating in use cases with many tool requests (e.g.
Coder with GPT4.1).

We raise the limit to 100 now by default. The option is also made
configurable for adopters.

Also updates to the latest OpenAI SDK major version 5 and adjusts the
code where necessary.

* Add (major) dependency update to Publishing (#15674)

To check with every release if (major) dependencies need to be updated.

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* fix: remove tool results from subsequential requests

During multiple tool requests, the anthropic provider was
passing all tool results over and over again. This resulted in
unreasonable high token usage due to repetetition.

* Make sure to add openai stream options only in streaming models (#15706)

* Add support for custom AI variables in code completion prompt (#15681)

Add unit tests and sample for manual testing

Signed-off-by: Vivien Jovet <vivien.jovet@torocloud.com>
Co-authored-by: Philip Langer <planger@eclipsesource.com>

* Add Widgets, Commands and Toolbar to project info. (#15697)

* Add Widgets, Commands and Toolbar to project info.

* Make workspace functions token efficient (#15703)

* Use relative path in search results in workspace function (#15704)

* feat(chat): preserve change sets across chat branch changes

Fixes https://github.com/eclipse-theia/theia/issues/15513

* Start Chat from Editor Context (#15712)

Fixes https://github.com/eclipsesource/theia/issues/195

Co-authored-by: Haydar Metin <hmetin@eclipsesource.com>
Co-authored-by: Philip Langer <planger@eclipsesource.com>
Co-authored-by: Nina Doschek <ndoschek@eclipsesource.com>

* Workspace search function allows specifying file extensions (#15699)

* AppTester Agent via Browser Automation (#15713)

- New AppTester for browser automation support
- Ask the user before starting and installing the Playwright MCP Server

Co-authored-by: Haydar Metin <hmetin@eclipsesource.com>

* fix: temporary scroll lock when user scrolls up in AI Chat (#15683)

- when user tries to scroll up in the Chat View, temporarily enable
scroll lock, even if it is originally disabled
- restore the previous scroll lock state when scrolling back to the
bottom

fixes #15049

Signed-off-by: Camille Letavernier <cletavernier@eclipsesource.com>

* fix: initial configuration of backend loggers (#15705)

Log levels can be set via the CLI. However some loggers are already
constructed before the CLI arguments are parsed. We now make sure that
any CLI configuration also reaches the initial loggers.

fixes #15695

* Add ai tool functions for write through file changes (#15717)

* Rename the existing change set tool functions and classes to align better with that they do
* Add new tool functions to directly write changes to disk
* Adapt Coder prompts to adapt to the renamed tool function classes
* Use write through functions in coder agent mode prompt

Co-authored-by: Thomas Mäder <t.s.maeder@gmail.com>

* Revert "fix: remove tool results from subsequential requests" (#15721)

This reverts commit ee5e882a7069e72e0ac84f3ca58cedd4e11096d3.

The commit is reverted as it breaks LLM behavior in many use cases, for
example when multiple tool results are required to continue.

* Move AI Configuration View to main (#15726)

* fix: filter out error messages from the messages send to the llm

The llm does not care why the previous run was halted.
So remove error messages from the list of messages
send to the llm.

* Show active chat in chat dropdown (if it has a title).

* Update project info with styling information

* feat: implement prompt caching for Anthropic (#15731)

Mark system prompts, tools and messages for caching in the Anthropic
LanguageModel. For typical agent workflows like "@Coder" this reduces
token costs by a large factor and reduces the pressure on the rate
limit.

Currently caching is enabled by default for all Anthropic models.

Also updates token tracking functionality to be aware of token caching
and updates the Anthropic SDK.

fixes #15729

* Fix chat input widget not tracking branches and pending state (#15727)

Update the ChatInput widget to

- track the currently active branch in the session tree
- listen for state changes in the model to show either the cancel
  button when a request is pending or else the send button

Co-authored-by: Christian W. Damus <give.a.damus@gmail.com>

* Tool Call Confirmation UI (#15714)

This PR introduces a flexible and user-configurable tool call confirmation system for agent interactions. Users can now control, on a per-tool basis, whether a tool call should be:

- **Disabled**: The tool cannot be executed.
- **Confirm**: The user is prompted for approval each time the tool is called.
- **YOLO**: The tool is executed immediately without confirmation.

**Features:**

- **Per-Tool Confirmation Settings:**  
  Users can configure the confirmation mode for each tool individually, either via the AI configuration view (dropdown per tool) or directly in `settings.json`.
- **Session and Persistent Preferences:**  
  When prompted, users can approve or deny a tool call once, for the entire chat session, or persist their preference (including disabling or enabling YOLO mode) in their settings.
- **Default Mode:**  
  The default mode is YOLO, but users can set their own global default.
- **Configuration UI:**  
  Added a dedicated view for managing tool confirmation settings, making it easy to adjust preferences per tool.

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
Co-authored-by: Simon Graband <sgraband@eclipsesource.com>
Co-authored-by: Eugen Neufeld <eneufeld@eclipsesource.com>
Co-authored-by: Nina Doschek <ndoschek@eclipsesource.com>

* Consolidate Coder Prompts (#15733)

* Consolidate Coder Prompts

* Don't steal global focus for widget activation (#15735)

* fix: avoid overflow of tabbar in AI config

Fixes https://github.com/eclipsesource/theia/issues/243

* chore: update the Google AI SDK (#15737)

Updates @google/genai from 0.7.0 to 1.3.0. Instead of 'latest' we now
use a proper version range.

Also updates the Gemini default models to the latest available ones.

* fix: difficult to scroll up when auto scroll is enabled (#15748)

- distinguish between "scroll up" and "scroll down"
- always enable tmp scroll lock when going up, regardless of distance
from bottom
- disable tmp scroll lock when scrolling down, if we reach the bottom
area

* Include the ai-ide stylesheet in the secondary window (#15752)

Fixes eclipsesource/theia/241

Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>
Co-authored-by: Olaf Lessenich <olessenich@eclipsesource.com>

* Fix existence check when contributing monaco menu items (#15746)

Fixes #15691

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Improve Ask AI feature (#15725)

* Improve Ask AI feature

Part of https://github.com/eclipsesource/theia/issues/222
Fixes https://github.com/eclipsesource/theia/issues/236

- Ensure that focus option for creating new chat session properly
activates and focuses the AI chat widget
(eclipsesource/theia/issues/236)

-Introduce a mechanism to contribute data to the editor context and add
a default contribution for diagnostic information

- Introduce AI code actions for error markers (Fix with AI, Explain with
AI)

Co-authored-by: Nina Doschek <ndoschek@eclipsesource.com>
Co-authored-by: Tobias Ortmayr <tortmayr@eclipsesource.com>

* Address review feedback

* Add README to ai-editor package

Fixes https://github.com/eclipsesource/theia/issues/255

---------

Co-authored-by: Nina Doschek <ndoschek@eclipsesource.com>

* Add initial support for images in the ai chat (#15410)

Initial implementation of #15407

---------

Co-authored-by: Martin Fleck <mfleck@eclipsesource.com>
Co-authored-by: Philip Langer <planger@eclipsesource.com>

* Fix Toolcall Spinner (#15757)

* Add support for the new vscode.lm.registerMcpServerDefinitionProvider API (#15755)

Co-authored-by: Philip Langer <planger@eclipsesource.com>

* Fix change set deletion (#15759)

* Allow to increase the number of retries before failing (#15730)

- Add a preference setting for setting the max retries
- use the preference in vercel, openai and anthropic

Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>

* Replace YOLO terminology with "Always Allow"  (#15756)

* Change YOLO terminology to Always Allow
  * In the Tool Confirmation Mode UI and settings schema, change usage of the term YOLO to "Always Allow".
* Remove colouring of tool options
  * The colouring is not necessary and can cause issues for persons with reduced vision.
* Change Approve terminology to Allow in toolcall renderer
  * Make the terminology used by the Tool Call Part Renderer consistent, in the UI and in the code, with the Allow terminology of the Tool Configuration UI.

Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>

* Work on improving code completion (#15715)

* Add next code-completion template
  * does not affect current default template
* Include project info in next prompt
* Add cache for code completions
  * currently only caching proposals for the same file, line, and surrounding context
  * we may improve this by checking if the user typed parts of a previously cached proposal before making a new request, which might require adjusting how we create the cache keys

* Start Chat from Task Context (#15700)

Add a new command to start a chat by selecting an agent and a context

---------

Co-authored-by: Christian W. Damus <give.a.damus@gmail.com>

* Don't focus window for reveal widget call (#15760)

* Make Workspace Search function more efficient / use less tokens (#15743)

* add preference to configure max search results
  * introduce `ai-features.workspaceFunctions.searchMaxResults` preference
  * respect preference in AI workspace search to avoid excessive token usage
  * return error message when result count reaches the configured limit
* restrict workspace search to subdirectories
  * add optional `subDirectoryPath` parameter to search arguments
  * validate and resolve subdirectory path relative to workspace root
  * perform scoped search if subdirectory is provided
* optimize result format for token efficiency
  * trim whitespace and format matches for concise output
  * group matches by relative file path and simplify structure
  * add unit tests to verify formatting logic and token reduction
* use 30 as new default

* Fix paste handling in chat input

* feat: Provide a Task Context Management / Agent (#15732)

* Add task-context agent
Add prompts for creating task context and updating this document
Ensure task contexts are properly saved and updated on content change
Add a way to propose changes as a change set to the summary on update and do not change directly

Signed-off-by: Alexandra Buzila <amuntean@eclipsesource.com>
Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>
Co-authored-by: Alexandra Muntean <abuzila@eclipsesource.com>
Co-authored-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
Co-authored-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>

* fix: remove obsolete menu workaround (#15753)

We previously used a workaround in the browser-menu-plugin to support
initially empty menus, which weren’t compatible with Lumino.

Since the menu refactoring in #14676, this workaround is no longer
needed. In fact, it now causes issues like empty submenus appearing in
context menus. Removing the workaround fixes this regression.

Fixes #15694

Contributed on behalf of STMicroelectronics

* Use Ctrl+Tab for tab navigation on Mac (#15763)

* enable Agent-to-Agent Delegation via Tool Calls (#15736)

* Add chat retry button

Add a retry button visible for cancelled or failed responses.

* Sanitize Task Context Labels (#15762)

* Add async initialization to ChangeSetFileElement (#15761)

* Fix revealTab (#15754)

Use the contentContainer for computations, because this is the DOM
element passed to PerfectScrollbar on creation

* Remove clear change from Coder prompt (#15774)

* Chat Variable for All Open Editors (#15775)

* Set Opus 4 to 32000 max tokens (#15788)

* Improve image support for tool calls (#15765)

- Introduce ToolCallResult type for better of known MCP result types
- Add visual playwright MCP server to AppTester (can use screenshots)
- Improve rendering for tool call results

* deps: Bump tar-fs to 3.0.9 (#15719)

tar-fs 3.0.9 fixes CVE-2025-48387
(https://security.snyk.io/vuln/SNYK-JS-TARFS-10293725

Contributed by STMicroelectronics

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>

* dep: bump multer version to 2.0.1 (#15806)

Contributed on behalf of STMicroelectronics

* Listen for model will save events directly (#15787)

Instead of registering a save participant.

Fixes #15770

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Support instant request for chat initialized with task context and agent (#15778)

When a new chat session is initialized with a pinned agent and a task,
context such as from the Initiate Chat command or agent hand-off, in the
Chat Input View show:

- a placeholder "Perform this task." instead of "Ask a question"
- let the user submit without typing anything, which sends that
  placeholder as the request message

Fixes eclipsesource/theia#233

Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>

* Return undefined instead of throwing when getting non-existent menu (#15792)

Fixes #15664

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* AI features accessible when AI is not enabled (#15780)

* hide AI-related (context) menu entries and toolbar actions when AI is not active
* ensure conditional rendering of ScanOSS UI based on AI activation
* added ai-editor to electron sample application 
* disable chat input widget and its actions when AI is inactive

* Allow adding variants via files (#15815)

* Allow adding variants via files

fixed #15794

* Avoid playwright tests depending on cwd

* Avoid playwright tests depending on the current working directory
* Instead use paths relative to __dirname for resources
* This fixes being able to run the tests from the VSCode playwright extension from Microsoft.

Signed-off-by: Florian Richter <florian.richter@mvtec.com>

* Update Ollama version and support newest features (#15795)

* Update Ollama version and support newest features

* Update ollama to 0.5.16
* Add support for streaming tool calling
* Add support for real thinking messages
* Add support for images
* Add support for Token Usage Counting

Signed-off-by: Stefan Winkler <stefan@winklerweb.net>

* Use chatInputWidget in AskAI Input and fix keyboard scrolling (#15781)

* fix: agent tree selection highlighting in AI configuration widget

* Fix bug that customizations are treated as variants (#15846)

* Amend enablement/visibility checks for dirty diff widget toolbar actions (#15851)

* Enact code actions when change set file created (#15724)

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
Co-authored-by: Simon Graband <sgraband@eclipsesource.com>
Co-authored-by: Colin Grant <cgrant.ext@eclipsesource.com>

* Add missing NLS item for format on save (#15813)

* Pin the last mentioned agent (#15777)

Modifies the pinning behavior so that new explicit agent mentions
result in the mentioned agent being pinned, even if another agent
is already pinned.

* Streamline Ask AI commands and fix Send to AI error (#15839)

- Remove `Send to AI Chat` command from the command palette
- Narrow enablement of `Ask AI` commands for editor and terminal
- Ensure the `AiTerminalChatWidget` is only shown for user created terminals

Fixes #15827
Fixes #15849

* Fix getMenuNode() for leaf nodes (#15845)

Fixes #15828

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Fix playwright tests on Windows (#15684)

Fixes #15447

### Also

Simplify waitForCellStatus: The previous implementation did not wait at all. Furthermore only waiting for success and error together was used until now.

Signed-off-by: Florian Richter <florian.richter@mvtec.com>

* fix: sync selection if props change (#15784)

Class components do not re-run constructors on prop changes. This
meant that `defaultValue` and `options` were only evaluated once
during the initial mount. As a result, dynamic updates to the
selected channel did not reflect in the SelectComponent UI.

This change extracts the selected index logic into a helper method
and calls it from both the constructor and `componentDidUpdate`
to keep state in sync with prop changes, mimicking behavior of
function components using hooks.

Closes: eclipse-theia/theia#15769

* Remind coder to use file change functions (#15848)

* Cancel hover preview on right/middle mouse click (#15826)

This prevent overlap with e.g. menus.
Cancels the hover preview when a right or middle mouse button is pressed.
Left-clicks are not handled, as the event does not propagate, but this is not critical since left-clicking typically changes the UI and dismisses the hover naturally.

Fixes # 15825

Signed-off-by: Simon Graband <sgraband@eclipsesource.com>

* Fix problems with menu item 15828_menu_visibility (#15856)

- Don't check uniqueness of menu items. Plugins contribute the same
  menu item multiple times with different visibility conditions
- Don't show the 'inline' group in context 15828_menu_visibility

Fixes #15828

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>

* Enable multiSelect for the DebugBreakpointsWidget (#15749)

- Enable multiSelect for breakpoints in the DebugBreakpointsWidget
- Add commands to remove/enable/disable the selected breakpoints

Signed-off-by: Stefan Winkler <stefan@winklerweb.net>

* Option to put close icons at the start of the tab label on macOS (#15103)

Add a new window.tabCloseIconPlacement preference for whether to present
the Close (X) icon in tab titles on the left or the right of the tab
in conformity with the OS's native tab controls.
Render the tab title with the icon on the left or right accordingly.
Show the new preference in the Settings UI on macOS platform only.
Default to the right as on other platforms to maintain current appearance.

Fixes eclipse-theia/theia-ide#460

Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>

* Implement missing methods for plugin management in FrontendPluginServer

---------

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>
Signed-off-by: Roman Piper <roman.piper@mvtec.com>
Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Signed-off-by: KnowZero <KnowZero@users.noreply.github.com>
Signed-off-by: Per Tillisch <accounts@perglass.com>
Signed-off-by: Alexander Taran <a.taran@outlook.com>
Signed-off-by: Stefan Winkler <stefan@winklerweb.net>
Signed-off-by: Giacomo Cusinato <giacomo@cusinato.co>
Signed-off-by: Parisa Betel Miri <parisa.betelmiri@microchip.com>
Signed-off-by: Florian Richter <florian.richter@mvtec.com>
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Signed-off-by: Vivien Jovet <vivien.jovet@torocloud.com>
Signed-off-by: Camille Letavernier <cletavernier@eclipsesource.com>
Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>
Signed-off-by: Alexandra Buzila <amuntean@eclipsesource.com>
Signed-off-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
Co-authored-by: Eugen Neufeld <eneufeld@eclipsesource.com>
Co-authored-by: Thomas Mäder <tsmaeder@users.noreply.github.com>
Co-authored-by: Jonas Helming <jhelming@eclipsesource.com>
Co-authored-by: fanyipin <570524947@qq.com>
Co-authored-by: Mark Sujew <mark.sujew@typefox.io>
Co-authored-by: Remi Schnekenburger <rschnekenbu@users.noreply.github.com>
Co-authored-by: colin-grant-work <cgrant.ext@eclipsesource.com>
Co-authored-by: RomanPiperMVTec <roman.piper@mvtec.com>
Co-authored-by: Simon Graband <sgraband@eclipsesource.com>
Co-authored-by: Philip Langer <planger@eclipsesource.com>
Co-authored-by: lessmost <i@lessmost.me>
Co-authored-by: Akos Kitta <1405703+kittaakos@users.noreply.github.com>
Co-authored-by: Vladimir Piskarev <pisv@1c.ru>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonah Iden <jonah.iden@typefox.io>
Co-authored-by: KnowZero <KnowZero@users.noreply.github.com>
Co-authored-by: Per Tillisch <accounts@perglass.com>
Co-authored-by: Alexander Taran <Alexander-Taran@users.noreply.github.com>
Co-authored-by: Zebsterpasha <77332790+Zebsterpasha@users.noreply.github.com>
Co-authored-by: Stefan Winkler <stefan@winklerweb.net>
Co-authored-by: Dennis Huebner <dennis.huebner@gmail.com>
Co-authored-by: Giacomo Cusinato <7659518+giacomocusinato@users.noreply.github.com>
Co-authored-by: Johannes Faltermeier <jfaltermeier@eclipsesource.com>
Co-authored-by: Martin Fleck <mfleck@eclipsesource.com>
Co-authored-by: Haydar Metin <hmetin@eclipsesource.com>
Co-authored-by: parisa-mchp <127134562+parisa-mchp@users.noreply.github.com>
Co-authored-by: Florian Richter <77792630+mvtec-richter@users.noreply.github.com>
Co-authored-by: Torbjorn-Svensson <torbjorn.svensson@foss.st.com>
Co-authored-by: Nina Doschek <ndoschek@eclipsesource.com>
Co-authored-by: Hanksha <vivien.jovet@gmail.com>
Co-authored-by: Camille Letavernier <cletavernier@eclipsesource.com>
Co-authored-by: Lucas Koehler <lkoehler@eclipsesource.com>
Co-authored-by: Thomas Mäder <t.s.maeder@gmail.com>
Co-authored-by: Christian W. Damus <give.a.damus@gmail.com>
Co-authored-by: Olaf Lessenich <olessenich@eclipsesource.com>
Co-authored-by: Tobias Ortmayr <tortmayr@eclipsesource.com>
Co-authored-by: Alexandra Muntean <abuzila@eclipsesource.com>
Co-authored-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>
Co-authored-by: Alexandra Muntean <amuntean@eclipsesource.com>
Co-authored-by: Florian Richter <florian.richter@mvtec.com>
Co-authored-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
laemmleint pushed a commit to mvtecsoftware/theia that referenced this pull request Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants