Skip to content
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

Feature/amazon q /doc: upload diagram files during doc generation #1

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

vikshe
Copy link
Owner

@vikshe vikshe commented Jan 24, 2025

Upload architecture diagram image files during documentation generation

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [ X ] New feature (non-breaking change which adds functionality)

Description

Upload architecture diagram image files during documentation generation

Checklist

  • [ X ] My code follows the code style of this project
  • I have added tests to cover my changes
  • [ X] A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vikshe vikshe force-pushed the bugfix/amazon-q-doc-upload-diagram branch from b339819 to 231c426 Compare January 24, 2025 17:56
// TODO: Need to correct this class location in the modules going further to support both amazonq and codescan.

// well known source files that do not have extensions
private val wellKnownSourceFiles = setOf(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change just moves wellKnownSourceFiles further up right? just wanted to make sure there's no actual change here to /dev's functionality

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this variable - yes, only move it up.

the whole file has same functionality as before, the only changes is to add support to extend this class so that our class can include diagrams in the zip archive

@vikshe vikshe force-pushed the bugfix/amazon-q-doc-upload-diagram branch from 231c426 to 47cc7e5 Compare January 24, 2025 22:27
@vikshe vikshe changed the title Bugfix/amazon q /doc: upload diagram files during doc generation Feature/amazon q /doc: upload diagram files during doc generation Jan 24, 2025
@vikshe vikshe force-pushed the bugfix/amazon-q-doc-upload-diagram branch from 47cc7e5 to d5fa9d8 Compare January 27, 2025 19:30
@vikshe vikshe force-pushed the bugfix/amazon-q-doc-upload-diagram branch from d5fa9d8 to 9e5289b Compare February 11, 2025 16:52
…lemetry and ad… (aws#5345)

* Filter out frequent client error from codegeneration telemetry and add errMsg to reasonDesc when desc is null

* refactor error messages into constnt

---------

Co-authored-by: Yuxin Lin <[email protected]>
@vikshe vikshe force-pushed the bugfix/amazon-q-doc-upload-diagram branch from 9e5289b to 9308cd1 Compare February 11, 2025 17:17
chungjac and others added 6 commits February 11, 2025 10:39
…ted unit tests (aws#5337)

* enable syntax highlighting when viewing diff for generated unit tests

changelog

remove unused import

* lint

* virtualFile always created and will not be null

* use session.testFileName instead of extension

* lint

* create temporary virtual file

* comment

* Update bugfix-3b7843b4-9673-4afa-90e8-7c4278f0d0fe.json
)

* Adding truncation logic to testGen user prompt
…s#5356)

* Show the source file path instead of test file path in short answer if user does /test on test file.
….addConnection (aws#5338)

* Updated AddConnection telemetry event in LoginBrowser.kt

* Updated AddConnection telemetry event

* Fixed issues using gradlew detekt
@vikshe vikshe force-pushed the bugfix/amazon-q-doc-upload-diagram branch from 9308cd1 to 0a24b17 Compare February 11, 2025 22:53
rli and others added 11 commits February 11, 2025 15:20
…cies (aws#5329)

ui-tests-starter attempts to resolve the IDE distribution and fails, but it should not actually be required to build/execute
…on (aws#5347)

config(amazonq): customization override should respect users' selection 

---------

Co-authored-by: Richard Li <[email protected]>
* Correcting auth checks for /test workflow
…s#5326)

* fix(amazonq): single click or select through arrow keys on review code issues does not focus code editor to line nor show issue details

* add change report

* add back modelzonemarket.cs file

* deleted irrelevant comment

---------

Co-authored-by: Tai Lai <[email protected]>
It is easy to forget to update all artifacts on a new MV, so consolidate all artifacts under same matrix
Attempt to enforce more consistency on commit messages
Copy link

github-actions bot commented Feb 14, 2025

Qodana Community for JVM

12 new problems were found

Inspection name Severity Problems
Usage of redundant or deprecated syntax or deprecated symbols 🔶 Warning 9
Unused symbol 🔶 Warning 1
Function or property has platform type ◽️ Notice 1
Join declaration and assignment ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

leigaol and others added 2 commits February 14, 2025 10:19
… client from AwsClientManager (aws#5331)

* No need to store a client as a state within this class, AwsClientManager already handle the connection change

resolving comments aws#5290 (comment)
dhasani23 and others added 9 commits February 14, 2025 21:32
…o user-selected region (aws#5365)

WARN - software.aws.toolkits.jetbrains.core.credentials.AwsConnectionManager - Using activeRegion when region is null, calling code needs to be migrated to handle null
java.lang.IllegalStateException
	at software.aws.toolkits.jetbrains.core.credentials.AwsConnectionManager.getActiveRegion(AwsConnectionManager.kt:224)
	at software.aws.toolkits.jetbrains.core.credentials.AwsConnectionManagerKt.activeRegion(AwsConnectionManager.kt:370)
	at migration.software.aws.toolkits.jetbrains.services.telemetry.TelemetryService.record(TelemetryService.kt:59)
	at software.aws.toolkits.telemetry.SessionTelemetry.start(SessionTelemetry.kt:287)
	at software.aws.toolkits.telemetry.SessionTelemetry.start$default(SessionTelemetry.kt:271)
	at software.aws.toolkits.jetbrains.services.telemetry.AwsToolkitStartupMetrics.execute$lambda$0(AwsToolkitStartupMetrics.kt:14)
	at com.intellij.ide.util.RunOnceUtilKt.doRunOnce(RunOnceUtil.kt:68)
	at com.intellij.ide.util.RunOnceUtilKt.access$doRunOnce(RunOnceUtil.kt:1)
)

Since 2.0, logs are isolated by platform/version pair
…s#5336)

Previously, UTG did not have telemetry to collect user feedback on generated unit tests. This PR introduces telemetry support to address that gap. Additionally, it enables users to submit comments, which will be routed to a private SIM folder.
…mework (aws#5385)

Force resolve 243.21565.192 -> 243.21565.193
```
org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find any version that matches com.jetbrains.intellij.java:java-test-framework:{strictly [243, 243.21565.192]; prefer 243.21565.192}.
Versions that do not match:
  - 243.24978.46
  - 243.23654.189
  - 243.23654.153
  - 243.23654.117
  - 243.22562.218
  - + 124 more
```
* Adding truncation logic to testGen user prompt

* Adding change log

* Updating telemetry error message to align VSC and JB

* Removing unwanted files
…ws#5360)

* fix(amazonq): update logic for converting gitignore pattern to regex

* fix(amazonq): update logic for converting gitignore pattern to regex

---------

Co-authored-by: Gaurav Gandhi <[email protected]>
Co-authored-by: Richard Li <[email protected]>
@vikshe vikshe force-pushed the bugfix/amazon-q-doc-upload-diagram branch from 77d5577 to fec3b27 Compare February 18, 2025 20:19
@vikshe vikshe force-pushed the bugfix/amazon-q-doc-upload-diagram branch from 16f8768 to beabdf1 Compare February 19, 2025 14:14
@@ -15,6 +16,8 @@
import software.aws.toolkits.jetbrains.services.amazonqCodeTest.session.Session
import software.aws.toolkits.jetbrains.services.amazonqCodeTest.storage.ChatSessionStorage
import software.aws.toolkits.jetbrains.services.cwc.messages.ChatMessageType
import software.aws.toolkits.jetbrains.services.cwc.messages.FollowUp
import software.aws.toolkits.resources.message

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

Remove deprecated symbol import

suspend fun sendChatInputEnabledMessage(isEnabled: Boolean) {
if (isInvalidSession()) return
messagePublisher.publish(ChatInputEnabledMessage(activeCodeTestTabId as String, enabled = isEnabled))

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

No cast needed
tabId = tabId,
messageId = messageId ?: UUID.randomUUID().toString(),
messageType = ChatMessageType.Answer,
message = message("amazonqFeatureDev.follow_instructions_for_authentication"),

Check warning

Code 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
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 warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

Remove deprecated symbol import

val NEW_SESSION_FOLLOWUPS: List<FollowUp> = listOf(
FollowUp(
pillText = message("amazonqDoc.prompt.reject.new_task"),

Check warning

Code 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
status = FollowUpStatusType.Info
),
FollowUp(
pillText = message("amazonqDoc.prompt.reject.close_session"),

Check warning

Code 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
package compat.com.intellij.lang.javascript

// probably not necessary, but inline to avoid loading this through core classpath
inline val JavascriptLanguage

Check notice

Code scanning / QDJVMC

Function or property has platform type Note

Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.