Allow filerting backticks in AI code completion#14777
Merged
JonasHelming merged 2 commits intomasterfrom Jan 29, 2025
Merged
Conversation
fixed #14461 Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
eneufeld
reviewed
Jan 29, 2025
| if (text.startsWith('```')) { | ||
| // Remove the first backticks and any language identifier | ||
| const startRemoved = text.slice(3).replace(/^\w*\n/, ''); | ||
| const secondBacktickIndex = startRemoved.indexOf('```'); |
Contributor
There was a problem hiding this comment.
shouldn't we use lastIndexOf ?
This would better catch this case:
```\nFoo```Bar```FooBar```
I would expect the result to be: Foo```Bar```FooBar
but in your code I assume it would be: Foo
eneufeld
reviewed
Jan 29, 2025
Contributor
eneufeld
left a comment
There was a problem hiding this comment.
Looks good and works well.
I left a remark about the algorithm though
Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
sdirix
approved these changes
Jan 29, 2025
laemmleint
pushed a commit
to mvtecsoftware/theia
that referenced
this pull request
Aug 18, 2025
* Allow filerting backticks in AI code completion fixed eclipse-theia#14461 Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixed #14461
What it does
How to test
Use the next variant for code completion (report if it performs better)
Check that backticks are removed (compare with history view where backicks are not removed)
Follow-ups
Breaking changes
Attribution
Review checklist
Reminder for reviewers