Skip to content

feat: add ide category to auto-trigger threshold computation #1104

New issue

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

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

Already on GitHub? # to your account

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

Conversation

andrewyuq
Copy link

@andrewyuq andrewyuq commented Apr 24, 2025

JB and VSC need different IDE cofficients for auto trigger threshold

Problem

JB and VSC need different IDE cofficients for auto trigger threshold

Solution

Pass IDE category as the parameter and get different coefficient based on this info

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

JB and VSC need different IDE cofficients for auto trigger threshold
@andrewyuq andrewyuq requested a review from a team as a code owner April 24, 2025 00:00
const autoTriggerResult = autoTrigger({
fileContext, // The left/right file context and programming language
lineNum: params.position.line, // the line number of the invocation, this is the line of the cursor
char: triggerCharacter, // Add the character just inserted, if any, before the invication position
ide: '', // TODO: Fetch the IDE in a platform-agnostic way (from the initialize request?)
ide: ideCategory ?? "VSCODE",
Copy link
Contributor

Choose a reason for hiding this comment

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

should we be defaulting to vscode here? or reject if the ideCategory isn't defined?

Copy link
Author

Choose a reason for hiding this comment

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

so when this feature was developed we were only supporting JB and VSC, and for all other IDEs, there isn't a coefficient for them, I think the current logic for other IDEs is that they will use VSC coefficient and this change is remaining this behavior.

Copy link
Author

Choose a reason for hiding this comment

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

acutally for VSC we will have a negative shift, for all other IDEs they will be 0.

other IDE's value should be 0
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants