-
Notifications
You must be signed in to change notification settings - Fork 251
fix(amazonq): /doc add suppoort for uploading infrastructure diagrams #5357
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 all commits
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,4 @@ | ||
{ | ||
"type" : "feature", | ||
"description" : "Amazon Q /doc: support making changes to architecture diagrams" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package software.aws.toolkits.jetbrains.services.amazonqDoc.session | ||
|
||
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.vfs.VirtualFile | ||
import software.aws.toolkits.jetbrains.services.amazonq.FeatureDevSessionContext | ||
import software.aws.toolkits.jetbrains.services.amazonqDoc.SUPPORTED_DIAGRAM_EXT_SET | ||
import software.aws.toolkits.jetbrains.services.amazonqDoc.SUPPORTED_DIAGRAM_FILE_NAME_SET | ||
|
||
class DocSessionContext(project: Project, maxProjectSizeBytes: Long? = null) : FeatureDevSessionContext(project, maxProjectSizeBytes) { | ||
|
||
/** | ||
* Ensure diagram files are not ignored | ||
*/ | ||
override fun getAdditionalGitIgnoreBinaryFilesRules(): Set<String> { | ||
val ignoreRules = super.getAdditionalGitIgnoreBinaryFilesRules() | ||
val diagramExtRulesInGitIgnoreFormatSet = SUPPORTED_DIAGRAM_EXT_SET.map { "*.$it" }.toSet() | ||
return ignoreRules - diagramExtRulesInGitIgnoreFormatSet | ||
} | ||
|
||
/** | ||
* Ensure diagram files are not filtered | ||
*/ | ||
override fun isFileExtensionAllowed(file: VirtualFile): Boolean { | ||
if (super.isFileExtensionAllowed(file)) { | ||
return true | ||
} | ||
|
||
return file.extension != null && SUPPORTED_DIAGRAM_FILE_NAME_SET.contains(file.name) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package software.aws.toolkits.jetbrains.services.amazonqDoc.ui | ||
|
||
import software.aws.toolkits.jetbrains.services.amazonqDoc.messages.FollowUp | ||
import software.aws.toolkits.jetbrains.services.amazonqDoc.messages.FollowUpStatusType | ||
import software.aws.toolkits.jetbrains.services.amazonqDoc.messages.FollowUpTypes | ||
import software.aws.toolkits.resources.message | ||
Check warningCode scanning / QDJVMC Usage of redundant or deprecated syntax or deprecated symbols
Remove deprecated symbol import
|
||
|
||
val NEW_SESSION_FOLLOWUPS: List<FollowUp> = listOf( | ||
FollowUp( | ||
pillText = message("amazonqDoc.prompt.reject.new_task"), | ||
Check warning on line 13 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/ui/UiContants.kt
|
||
Check warningCode scanning / QDJVMC Usage of redundant or deprecated syntax or deprecated symbols Warning
'message(String, vararg Any): String' is deprecated. Use extension-specific localization bundle instead
Check warningCode scanning / QDJVMC Usage of redundant or deprecated syntax or deprecated symbols
'message(String, vararg Any): String' is deprecated. Use extension-specific localization bundle instead
|
||
type = FollowUpTypes.NEW_TASK, | ||
status = FollowUpStatusType.Info | ||
), | ||
FollowUp( | ||
pillText = message("amazonqDoc.prompt.reject.close_session"), | ||
Check warning on line 18 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/ui/UiContants.kt
|
||
Check warningCode scanning / QDJVMC Usage of redundant or deprecated syntax or deprecated symbols Warning
'message(String, vararg Any): String' is deprecated. Use extension-specific localization bundle instead
Check warningCode scanning / QDJVMC Usage of redundant or deprecated syntax or deprecated symbols
'message(String, vararg Any): String' is deprecated. Use extension-specific localization bundle instead
|
||
type = FollowUpTypes.CLOSE_SESSION, | ||
status = FollowUpStatusType.Info | ||
) | ||
) |
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning
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 address
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.
AmazonQ bundle doesn't have those messages yet