Skip to content

Commit 661195c

Browse files
committed
Merge branch 'master' into pTests/getFileSha384
2 parents ecbf647 + 3f80141 commit 661195c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1398
-254
lines changed

docs/vscode_behaviors.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# VS Code Behaviors
2+
3+
Many VS Code behavoirs for certain APIs or user interactions with the IDE are not clearly documented,
4+
or documented at all. Please add any findings to this document.
5+
6+
## `deactivate()` - extension shutdown
7+
8+
This method is defined as part of the VS Code extension API, and is run on a **graceful** shutdown
9+
for each extension.
10+
11+
- Our extension and its `deactivate()` function are in the Extension Host process [1]
12+
- The Extension Host process has at most 5 seconds to shut down, after which it will exit. [1]
13+
- The vscode API will be unreliable at deactivation time. So certain VSC APIs like the filesystem may not work. [1]
14+
- The VSC Filesystem API has been confirmed to not work
15+
- In `Run & Debug` mode, closing the Debug IDE instance behaves differently depending on how it is closed
16+
- The regular close button in the Debug IDE instance results in a graceful shutdown
17+
- The red square in the root IDE instance to stop the debugging session results on a non-graceful shutdown, meaning `deactivate()` is not run.
18+
- `Reload Window` triggers `deactivate()`
19+
20+
Sources:
21+
22+
- [[1]](https://github.com/Microsoft/vscode/issues/47881#issuecomment-381910587)
23+
- [[2]](https://github.com/microsoft/vscode/issues/122825#issuecomment-814218149)
24+
25+
## State (`globalState`, `Memento`)
26+
27+
TODO:
28+
- How it behaves between remote (ssh) and local
29+
- How it is not completely reliable. Reads/writes have no guarantee to work (though we are fine in most cases)
30+
- How it can break as observed with crash monitoring work. At a certain point writes were seemingly succeeding, but did not actually propagate to all IDE instances.
31+
32+

package-lock.json

Lines changed: 12 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"generateNonCodeFiles": "npm run generateNonCodeFiles -w packages/ --if-present"
4040
},
4141
"devDependencies": {
42-
"@aws-toolkits/telemetry": "^1.0.258",
42+
"@aws-toolkits/telemetry": "^1.0.267",
4343
"@playwright/browser-chromium": "^1.43.1",
4444
"@types/vscode": "^1.68.0",
4545
"@types/vscode-webview": "^1.57.1",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"date": "2024-10-03",
3+
"version": "1.28.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Amazon Q /dev: define first folder as a root path for LLM-created files when using workspaces"
8+
},
9+
{
10+
"type": "Feature",
11+
"description": "Amazon Q Code Transformation: allow users to skip running tests"
12+
},
13+
{
14+
"type": "Feature",
15+
"description": "Amazon Q Developer: Updated legal disclaimer text"
16+
}
17+
]
18+
}

packages/amazonq/.changes/next-release/Bug Fix-93a879d3-5fa1-47d3-a908-77fcbce9335d.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/.changes/next-release/Feature-cc8c85c0-3b9b-4a8c-b0fc-b69439f90d82.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.28.0 2024-10-03
2+
3+
- **Bug Fix** Amazon Q /dev: define first folder as a root path for LLM-created files when using workspaces
4+
- **Feature** Amazon Q Code Transformation: allow users to skip running tests
5+
- **Feature** Amazon Q Developer: Updated legal disclaimer text
6+
17
## 1.27.0 2024-09-27
28

39
- **Bug Fix** Security Scan: Fixes an issue that incorrectly removes hardcoded credentials detections from auto scans.

packages/amazonq/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "amazon-q-vscode",
33
"displayName": "Amazon Q",
44
"description": "Amazon Q is your generative AI-powered assistant across the software development lifecycle.",
5-
"version": "1.28.0-SNAPSHOT",
5+
"version": "1.29.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],

packages/amazonq/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
131131
registerCommands(context)
132132

133133
// Handle Amazon Q Extension un-installation.
134-
setupUninstallHandler(VSCODE_EXTENSION_ID.amazonq, context)
134+
setupUninstallHandler(VSCODE_EXTENSION_ID.amazonq, context.extension.packageJSON.version, context)
135135

136136
// Hide the Amazon Q tree in toolkit explorer
137137
await setContext('aws.toolkit.amazonq.dismissed', true)

packages/amazonq/src/extensionNode.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as vscode from 'vscode'
77
import { activateAmazonQCommon, amazonQContextPrefix, deactivateCommon } from './extension'
88
import { DefaultAmazonQAppInitContext } from 'aws-core-vscode/amazonq'
99
import { activate as activateQGumby } from 'aws-core-vscode/amazonqGumby'
10-
import { ExtContext, globals } from 'aws-core-vscode/shared'
10+
import { ExtContext, globals, CrashMonitoring } from 'aws-core-vscode/shared'
1111
import { filetypes, SchemaService } from 'aws-core-vscode/sharedNode'
1212
import { updateDevMode } from 'aws-core-vscode/dev'
1313
import { CommonAuthViewProvider } from 'aws-core-vscode/login'
@@ -32,6 +32,8 @@ export async function activate(context: vscode.ExtensionContext) {
3232
* the code compatible with web and move it to {@link activateAmazonQCommon}.
3333
*/
3434
async function activateAmazonQNode(context: vscode.ExtensionContext) {
35+
await (await CrashMonitoring.instance()).start()
36+
3537
const extContext = {
3638
extensionContext: context,
3739
}
@@ -77,6 +79,7 @@ async function setupDevMode(context: vscode.ExtensionContext) {
7779
'deleteSsoConnections',
7880
'expireSsoConnections',
7981
'editAuthConnections',
82+
'forceIdeCrash',
8083
],
8184
}
8285

@@ -92,5 +95,6 @@ async function setupDevMode(context: vscode.ExtensionContext) {
9295
}
9396

9497
export async function deactivate() {
95-
await deactivateCommon()
98+
// Run concurrently to speed up execution. stop() does not throw so it is safe
99+
await Promise.all([(await CrashMonitoring.instance()).stop(), deactivateCommon()])
96100
}

0 commit comments

Comments
 (0)