Skip to content

Commit 0ea7bc3

Browse files
Merge main into feature/remote-chat-lsp
2 parents eb1ff0c + 4b41495 commit 0ea7bc3

File tree

10 files changed

+108
-21
lines changed

10 files changed

+108
-21
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "change to use promptStickyCard to for image verification notification"
4+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Qodana - Duplicated Code
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main, feature/** ]
7+
pull_request:
8+
branches: [ '**' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
qodana:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
# PR check
20+
checks: write
21+
# PR comments
22+
pull-requests: write
23+
# SARIF upload
24+
security-events: write
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
ref: ${{ github.event.pull_request.head.sha }}
29+
fetch-depth: 0
30+
- name: Maximize Build Space
31+
if: runner.os == 'Linux'
32+
uses: jlumbroso/free-disk-space@main
33+
with:
34+
tool-cache: false
35+
large-packages: false
36+
- name: 'Qodana Scan'
37+
uses: JetBrains/[email protected]
38+
env:
39+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
40+
with:
41+
# --config points to the DuplicatedCode-only Qodana config
42+
args:
43+
--config,qodana-configs/duplicated-code/qodana.yaml
44+
cache-default-branch-only: true
45+
# pr-mode off means that the whole repo should be checked for duplicate code, instead of just copy/pastes within the PR
46+
pr-mode: false
47+
- uses: github/codeql-action/upload-sarif@v3
48+
with:
49+
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json

.github/workflows/qodana-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
tool-cache: false
3535
large-packages: false
3636
- name: 'Qodana Scan'
37-
uses: JetBrains/qodana-action@v2024.2.3
37+
uses: JetBrains/qodana-action@v2025.1.1
3838
env:
3939
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
4040
with:

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/toolwindow/AmazonQPanel.kt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,15 @@ class AmazonQPanel(val project: Project, private val scope: CoroutineScope) : Di
181181
0
182182
)
183183

184-
val errorJson = OBJECT_MAPPER.writeValueAsString(errorMessages)
185-
browserInstance.jcefBrowser.cefBrowser.executeJavaScript(
186-
"window.handleNativeNotify('$errorJson')",
187-
browserInstance.jcefBrowser.cefBrowser.url,
188-
0
189-
)
184+
if (errorMessages.isNotEmpty()) {
185+
val errorJson = OBJECT_MAPPER.writeValueAsString(errorMessages)
186+
browserInstance.jcefBrowser.cefBrowser.executeJavaScript(
187+
"window.handleNativeNotify('$errorJson')",
188+
browserInstance.jcefBrowser.cefBrowser.url,
189+
0
190+
)
191+
}
192+
190193
dtde.dropComplete(true)
191194
} else {
192195
dtde.dropComplete(false)

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/Browser.kt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,19 @@ class Browser(parent: Disposable, private val mynahAsset: Path, val project: Pro
182182
183183
window.handleNativeNotify = function(errorMessages) {
184184
const messages = JSON.parse(errorMessages);
185-
messages.forEach(msg => {
186-
qChat.notify({
187-
content: msg
188-
})
189-
});
185+
let message = messages.join('\n');
186+
qChat.updateStore(qChat.getSelectedTabId(), {
187+
promptInputStickyCard: {
188+
messageId: 'image-verification-banner',
189+
header: {
190+
icon: 'warning',
191+
iconStatus: 'warning',
192+
body: '### Invalid Image',
193+
},
194+
body: message,
195+
canBeDismissed: true,
196+
},
197+
})
190198
};
191199
}
192200
</script>

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspService.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ private class AmazonQServerInstance(private val project: Project, private val cs
463463

464464
val node = if (SystemInfo.isWindows) "node.exe" else "node"
465465
val nodePath = getNodeRuntimePath(artifact.resolve(node))
466+
val emptyFile = Files.createTempFile("empty", null).toAbsolutePath().toString()
466467

467468
val cmd = NodeExePatcher.patch(nodePath)
468469
.withParameters(
@@ -476,6 +477,9 @@ private class AmazonQServerInstance(private val project: Project, private val cs
476477
put("NODE_EXTRA_CA_CERTS", it)
477478
}
478479

480+
put("AWS_CONFIG_FILE", emptyFile)
481+
put("AWS_SHARED_CREDENTIALS_FILE", emptyFile)
482+
479483
// assume default endpoint will pick correct proxy if needed
480484
val qUri = URI(QDefaultServiceConfig.ENDPOINT)
481485
val proxy = JdkProxyProvider.getInstance().proxySelector.select(qUri)

plugins/amazonq/src/main/resources/META-INF/plugin.xml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,39 @@
77
<description><![CDATA[
88
<p>The most capable generative AI-powered assistant for building, operating, and transforming software, with advanced capabilities for managing data and AI</p>
99
10-
<h2>Agent capabilities</h2>
10+
<h2>Agentic coding experience</h2>
11+
<p>Amazon Q Developer uses information across native and MCP server-based tools to intelligently perform actions beyond code suggestions, such as reading files, generating code diffs, and running commands based on your natural language instruction. Simply type your prompt in your preferred language and Q Developer will provide continuous status updates and iteratively apply changes based on your feedback, helping you accomplish tasks faster.</p>
12+
1113
<h3>Implement new features</h3>
12-
<p><code>/dev</code> to task Amazon Q with generating new code across your entire project and implement features.</p>
14+
<p>Generate new code across your entire project and implement features.</p>
1315
1416
<h3>Generate documentation</h3>
15-
<p><code>/doc</code> to task Amazon Q with writing API, technical design, and onboarding documentation.</p>
17+
<p>Write API, technical design, and onboarding documentation.</p>
1618
1719
<h3>Automate code reviews</h3>
18-
<p><code>/review</code> to ask Amazon Q to perform code reviews, flagging suspicious code patterns and assessing deployment risk.</p>
20+
<p>Perform code reviews, flagging suspicious code patterns and assessing deployment risk.</p>
1921
2022
<h3>Generate unit tests</h3>
21-
<p><code>/test</code> to ask Amazon Q to generate unit tests and add them to your project, helping you improve code quality, fast.</p>
23+
<p>Generate unit tests and add them to your project, helping you improve code quality, fast.</p>
2224
2325
<h3>Transform workloads</h3>
2426
<p><code>/transform</code> to upgrade your Java applications in minutes, not weeks.</p>
2527
2628
<h2>Core features</h2>
2729
30+
<h3>MCP support</h3>
31+
<p>Add Model Context Protocol (MCP) servers to give Amazon Q Developer access to important context.</p>
32+
33+
<h3>Inline suggestions</h3>
34+
<p>Receive real-time code suggestions ranging from snippets to full functions based on your comments and existing code.</p>
35+
<p><i><a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-language-ide-support.html">15+ languages supported including Python, TypeScript, Rust, Terraform, AWS Cloudformation, and more</a></i></p>
36+
2837
<h3>Inline chat</h3>
2938
<p>Seamlessly initial chat within the inline coding experience. Select a section of code that you need assistance with and initiate chat within the editor to request actions such as "Optimize this code", "Add comments", or "Write tests".</p>
3039
3140
<h3>Chat</h3>
3241
<p>Generate code, explain code, and get answers about software development.</p>
3342
34-
<h3>Inline suggestions</h3>
35-
<p><Receive real-time code suggestions ranging from snippets to full functions based on your comments and existing code.</p>
36-
<p><i><a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-language-ide-support.html">15+ languages supported including Python, TypeScript, Rust, Terraform, AWS Cloudformation, and more</a></i></p>
37-
3843
<h3>Code reference log</h3>
3944
<p>Attribute code from Amazon Q that is similar to training data. When code suggestions similar to training data are accepted, they will be added to the code reference log.</p>
4045
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Duplicated Code Check
2+
3+
This check only runs the Qodana DuplicatedCode check and should post duplicated code to [Github PRs](../../.github/workflows/qodana-check-duplicatedcode.yml).
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 1.0
2+
linter: jetbrains/qodana-jvm-community:latest
3+
projectJDK: "21"
4+
bootstrap: ./gradlew :plugin-core:sdk-codegen:generateSdks :plugin-core:jetbrains-community:generateTelemetry :plugin-toolkit:jetbrains-rider:generateModels
5+
exclude:
6+
- name: All
7+
dot-net:
8+
solution: ReSharper.AWS.sln
9+
include:
10+
- name: DuplicatedCode

qodana.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ include:
6161
- name: SimplifiableServiceRetrieving
6262
- name: QuickFixGetFamilyNameViolation
6363
- name: TokenSetInParserDefinition
64+
- name: DuplicatedCode

0 commit comments

Comments
 (0)