-
Notifications
You must be signed in to change notification settings - Fork 274
feat(amazonq): support in editor chat #5004
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
Conversation
...-community/src/software/aws/toolkits/jetbrains/services/cwc/inline/InlineChatPopupFactory.kt
Show resolved
Hide resolved
plugins/core/sdk-codegen/codegen-resources/codewhispererruntime/service-2.json
Show resolved
Hide resolved
plugins/amazonq/chat/jetbrains-community/resources/META-INF/plugin-chat.xml
Show resolved
Hide resolved
...ns-community/src/software/aws/toolkits/jetbrains/services/cwc/inline/InlineChatPopupPanel.kt
Fixed
Show fixed
Hide fixed
...hared/jetbrains-community/resources/software/aws/toolkits/resources/AmazonQBundle.properties
Show resolved
Hide resolved
...ns-community/src/software/aws/toolkits/jetbrains/services/cwc/inline/InlineChatController.kt
Outdated
Show resolved
Hide resolved
...ns-community/src/software/aws/toolkits/jetbrains/services/cwc/inline/InlineChatController.kt
Outdated
Show resolved
Hide resolved
...ns-community/src/software/aws/toolkits/jetbrains/services/cwc/inline/InlineChatController.kt
Show resolved
Hide resolved
|
is there tracking item for tests |
Will and a SIM to track the tests |
...c/software/aws/toolkits/jetbrains/services/cwc/editor/context/file/util/LanguageExtractor.kt
Outdated
Show resolved
Hide resolved
| private val popupSubmitHandler: suspend (String, String, Int, Editor) -> String = { | ||
| prompt: String, selectedCode: String, selectedLineStart: Int, editor: Editor -> | ||
| runBlocking { | ||
| isInProgress.set(true) | ||
| val message = handleChat(prompt, selectedCode, editor, selectedLineStart) | ||
| message | ||
| } | ||
| } |
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.
| private val popupSubmitHandler: suspend (String, String, Int, Editor) -> String = { | |
| prompt: String, selectedCode: String, selectedLineStart: Int, editor: Editor -> | |
| runBlocking { | |
| isInProgress.set(true) | |
| val message = handleChat(prompt, selectedCode, editor, selectedLineStart) | |
| message | |
| } | |
| } | |
| private val popupSubmitHandler: suspend (String, String, Int, Editor) -> String = { | |
| prompt, selectedCode, selectedLineStart, editor -> | |
| isInProgress.set(true) | |
| val message = handleChat(prompt, selectedCode, editor, selectedLineStart) | |
| message | |
| } |
or
| private val popupSubmitHandler: suspend (String, String, Int, Editor) -> String = { | |
| prompt: String, selectedCode: String, selectedLineStart: Int, editor: Editor -> | |
| runBlocking { | |
| isInProgress.set(true) | |
| val message = handleChat(prompt, selectedCode, editor, selectedLineStart) | |
| message | |
| } | |
| } | |
| private suspend fun popupSubmitHandler(prompt: String, selectedCode: String, selectedLineStart: Int, editor: Editor): String { | |
| isInProgress.set(true) | |
| val message = handleChat(prompt, selectedCode, editor, selectedLineStart) | |
| return message | |
| } |
and then you should be able to do
InlineChatPopupFactory(
submitHandler = ::popupSubmitHandler,
)
rli
left a comment
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.
no major comments remaining
Types of changes
Description
users will be able to chat with Q in editor by using command/ctrl + I to bring up chat popup, get code diff in editor and accept/reject diff
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.