Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve integration between VariableRegistry and AI VariableService #14827

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CamilleLetavernier
Copy link
Contributor

@CamilleLetavernier CamilleLetavernier commented Feb 4, 2025

  • make TheiaVariableContribution more easily to customize/override

fixes #14817

What it does

  • Bind TheiaVariableContribution to self, to make it easier to override

Note: the ticket was about integrating the AI Variable Service with the Theia VariableRegistry (ideally reusing the VariableRegistry directly for AI). However, there are some key differences between the two:

  • AI Variable Service is part of Common, whereas VariableRegistry only exists in the Frontend
  • AI Variable Service is slightly more customizable, as Variable Resolvers are separate from the Variable Definition, and can be overridden more easily
  • VariableRegistry supports more types (including structured arrays/objects); AI Variable Service only supports strings

Moreover, the AI Variable Service already includes a Contribution that delegates to the VariableRegistry in the browser, so no additional work is required here. I made the TheiaVariableContribution a bit easier to replaced (by binding it to self), but actual use cases for customization are unclear at this point, so I don't know how relevant this is.

How to test

  • Start Theia with AI Chat view, and check that Theia Variables still work as expected (e.g. #lineNumber should appear in auto-completion)

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

VariableService

- make TheiaVariableContribution more easily to customize/override

fixes eclipse-theia#14817

Signed-off-by: Camille Letavernier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs merge
Development

Successfully merging this pull request may close these issues.

Streamline AI Variable Service
2 participants