-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(amazonq): /doc add suppoort for uploading architecture diagrams (#…
…5357) Co-authored-by: Viktor Shesternyak <[email protected]>
- Loading branch information
Showing
8 changed files
with
127 additions
and
72 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
.changes/next-release/feature-bfb6687a-a302-4968-8e7e-8fa0d4ef6c53.json
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,4 @@ | ||
{ | ||
"type" : "feature", | ||
"description" : "Amazon Q /doc: support making changes to architecture diagrams" | ||
} |
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
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
33 changes: 33 additions & 0 deletions
33
...nity/src/software/aws/toolkits/jetbrains/services/amazonqDoc/session/DocSessionContext.kt
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,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) | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...brains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/ui/UiContants.kt
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,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 | ||
|
||
val NEW_SESSION_FOLLOWUPS: List<FollowUp> = listOf( | ||
FollowUp( | ||
pillText = message("amazonqDoc.prompt.reject.new_task"), | ||
type = FollowUpTypes.NEW_TASK, | ||
status = FollowUpStatusType.Info | ||
), | ||
FollowUp( | ||
pillText = message("amazonqDoc.prompt.reject.close_session"), | ||
type = FollowUpTypes.CLOSE_SESSION, | ||
status = FollowUpStatusType.Info | ||
) | ||
) |
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