-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render Chat response in the webview (#28)
- Loading branch information
Showing
5 changed files
with
87 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
14 changes: 14 additions & 0 deletions
14
plugin/src/software/aws/toolkits/eclipse/amazonq/chat/models/ChatUIInboundCommand.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
package software.aws.toolkits.eclipse.amazonq.chat.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Represents a command that is being sent to Q Chat UI. | ||
*/ | ||
public record ChatUIInboundCommand( | ||
@JsonProperty("command") String command, | ||
@JsonProperty("tabId") String tabId, | ||
@JsonProperty("params") Object params, | ||
@JsonProperty("isPartialResult") Boolean isPartialResult | ||
) { }; |
23 changes: 23 additions & 0 deletions
23
plugin/src/software/aws/toolkits/eclipse/amazonq/chat/models/ChatUIInboundCommandName.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
||
package software.aws.toolkits.eclipse.amazonq.chat.models; | ||
|
||
public enum ChatUIInboundCommandName { | ||
ChatPrompt("aws/chat/sendChatPrompt"), // This is the odd one out, it follows the same message name as the request. | ||
|
||
SendToPrompt("sendToPrompt"), | ||
ErrorMessage("errorMessage"), | ||
InsertToCursorPosition("insertToCursorPosition"), | ||
AuthFollowUpClicked("authFollowUpClicked"), | ||
GenericCommand("genericCommand"); | ||
|
||
private final String commandString; | ||
|
||
ChatUIInboundCommandName(final String commandString) { | ||
this.commandString = commandString; | ||
} | ||
|
||
public String toString() { | ||
return commandString; | ||
} | ||
} |
This file contains 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
This file contains 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