-
Notifications
You must be signed in to change notification settings - Fork 273
deps(amazonq): client handles openTab requests from server #5630
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
Changes from 2 commits
08627c1
51ee404
f3fdda9
dcab88d
74f5e09
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| // Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat | ||
|
|
||
| data class ChatMessage( | ||
| val type: MessageType? = MessageType.ANSWER, | ||
| val header: MessageHeader? = null, | ||
| val buttons: List<Button>? = null, | ||
| val body: String? = null, | ||
| val messageId: String? = null, | ||
| val canBeVoted: Boolean? = null, | ||
| val relatedContent: RelatedContent? = null, | ||
| val followUp: FollowUp? = null, | ||
| val codeReference: List<ReferenceTrackerInformation>? = null, | ||
| val fileList: FileList? = null, | ||
| val contextList: FileList? = null, | ||
| ) | ||
|
|
||
| data class MessageHeader( | ||
| val type: MessageType? = MessageType.ANSWER, | ||
| val buttons: List<Button>? = null, | ||
| val body: String? = null, | ||
| val messageId: String? = null, | ||
| val canBeVoted: Boolean? = null, | ||
| val relatedContent: RelatedContent? = null, | ||
| val followUp: FollowUp? = null, | ||
| val codeReference: List<ReferenceTrackerInformation>? = null, | ||
| val fileList: FileList? = null, | ||
| val contextList: FileList? = null, | ||
| val icon: IconType? = null, | ||
| val status: MessageStatus? = null, | ||
| ) | ||
|
|
||
| data class MessageStatus( | ||
| val status: Status? = null, | ||
| val icon: IconType? = null, | ||
| val text: String? = null, | ||
| ) | ||
|
|
||
| data class Button( | ||
| val id: String, | ||
| val text: String? = null, | ||
| val description: String? = null, | ||
| val icon: IconType? = null, | ||
| val disabled: Boolean? = null, | ||
| val keepCardAfterClick: Boolean? = null, | ||
| val status: ButtonStatus? = null, | ||
| ) | ||
|
|
||
| data class FileList( | ||
| val rootFolderTitle: String? = null, | ||
| val filePaths: List<String>? = null, | ||
| val deletedFiles: List<String>? = null, | ||
| val details: Map<String, FileDetails>? = null, | ||
| ) | ||
|
|
||
| data class FileDetails( | ||
| val description: String? = null, | ||
| val lineRanges: List<Pair<Int, Int>>? = null, | ||
| val changes: Changes? = null, | ||
| ) | ||
|
|
||
| data class Changes( | ||
| val added: Int? = null, | ||
| val deleted: Int? = null, | ||
| val total: Int? = null, | ||
| ) | ||
|
|
||
| enum class IconType { | ||
| FILE, | ||
| FOLDER, | ||
| CODE_BLOCK, | ||
| LIST_ADD, | ||
| MAGIC, | ||
| HELP, | ||
| TRASH, | ||
| SEARCH, | ||
| CALENDAR, | ||
| ; | ||
|
|
||
| val value: String | ||
| get() = name.lowercase().replace('_', '-') | ||
|
|
||
| companion object { | ||
| private val stringToEnum: Map<String, IconType> = entries.associateBy { it.name.lowercase() } | ||
|
|
||
| fun fromString(value: String): IconType = stringToEnum[value] ?: throw IllegalArgumentException("Unknown IconType: $value") | ||
| } | ||
| } | ||
|
|
||
| enum class Status { | ||
| INFO, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "INFO" is never used
|
||
| SUCCESS, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "SUCCESS" is never used
|
||
| WARNING, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "WARNING" is never used
|
||
| ERROR, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "ERROR" is never used
|
||
| ; | ||
|
|
||
| val value: String | ||
| get() = name.lowercase() | ||
| } | ||
|
|
||
| enum class ButtonStatus { | ||
| MAIN, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "MAIN" is never used
|
||
| PRIMARY, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "PRIMARY" is never used
|
||
| CLEAR, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "CLEAR" is never used
|
||
| INFO, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "INFO" is never used
|
||
| SUCCESS, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "SUCCESS" is never used
|
||
| WARNING, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "WARNING" is never used
|
||
| ERROR, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "ERROR" is never used
|
||
| ; | ||
|
|
||
| val value: String | ||
| get() = name.lowercase() | ||
| } | ||
|
|
||
| enum class MessageType { | ||
| ANSWER, | ||
| PROMPT, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "PROMPT" is never used
|
||
| SYSTEM_PROMPT, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "SYSTEM_PROMPT" is never used
|
||
| DIRECTIVE, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "DIRECTIVE" is never used
|
||
| TOOL, | ||
Check warningCode scanning / QDJVMC Unused symbol Warning
Class "TOOL" is never used
|
||
| ; | ||
|
|
||
| val value: String | ||
| get() = name.lowercase().replace('_', '-') | ||
| } | ||
Check warning
Code scanning / QDJVMC
Unused symbol Warning