fix: quick input hover initialization #15064
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
Makes sure the global Monaco BaseLayerHoverDelegate is properly initialized with Monaco's HoverService.
This fixes rendering issues caused by uncaught errors when opening a quick input, for example the command palette, before any Monaco editor was initialized. This scenario was easily reproducible in minimal Theia applications, not leveraging all offered Theia extensions.
fixes #15042
How to test
all AI packages
all plugin packages
You can use this list for convenience:
Ctrl + Shift + P
Without the fix, the palette's rendering will be broken and errors thrown in the console
As an alternative reproducer you can use the Theia generator, there the problem immediately appears.
Follow-ups
This fixes the issue for the quick input. Previously I discussed with @tsmaeder to move this code tomoved tomonaco-init
. However as this change is less invasive, I put it into the quick input for now.monaco-init
Breaking changes
Attribution
Review checklist
Reminder for reviewers