-
Notifications
You must be signed in to change notification settings - Fork 250
Add cursor position to chat request #5562
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
base: feature/q-lsp-chat
Are you sure you want to change the base?
Conversation
…Flare' into manodnyb/setupChatComponentsWithFlare
…Flare' into manodnyb/setupChatComponentsWithFlare
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at [email protected]
|
|
||
fun getCursorState(project: Project): CursorState? { | ||
return runReadAction { | ||
val editor = FileEditorManager.getInstance(project).selectedTextEditor ?: return@runReadAction null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make this a util because i think we might need a slightly different implementation for remote
val endLine = document.getLineNumber(endOffset) | ||
val endColumn = endOffset - document.getLineStartOffset(endLine) | ||
|
||
return@runReadAction CursorState( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see FocusAreaContextExtractor and determine if we need to port the logic or if the cursor state is sufficient
Description
Add selected character position to chat request
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.