Skip to content

Commit ce525c2

Browse files
authored
Merge pull request #5203 - merge master into feature/separate-sessions
Merge master into feature/separate-sessions
2 parents 5be0fd9 + b5bf95f commit ce525c2

22 files changed

+244
-106
lines changed

package-lock.json

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Security Scan: Fixes an issue where project-scans time out for larger projects."
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Amazon Q /dev command: Fix file rejections for files outside of src/"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Feature Development: update /dev welcome message"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Amazon Q Chat: Fixed broken code blocks with typewriter text in list items."
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "UX: New style for the login window"
4+
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4098,7 +4098,7 @@
40984098
"@aws-sdk/property-provider": "3.46.0",
40994099
"@aws-sdk/smithy-client": "^3.46.0",
41004100
"@aws-sdk/util-arn-parser": "^3.46.0",
4101-
"@aws/mynah-ui": "^4.9.2",
4101+
"@aws/mynah-ui": "^4.13.0",
41024102
"@gerhobbelt/gitignore-parser": "^0.2.0-9",
41034103
"@iarna/toml": "^2.2.5",
41044104
"@smithy/middleware-retry": "^2.3.1",

packages/core/src/amazonq/activation.ts

Lines changed: 23 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ import { Commands, placeholder } from '../shared/vscode/commands2'
2323
import { focusAmazonQPanel, focusAmazonQPanelKeybinding } from '../codewhispererChat/commands/registerCommands'
2424
import { TryChatCodeLensProvider, tryChatCodeLensCommand } from '../codewhispererChat/editor/codelens'
2525
import { Auth } from '../auth'
26-
import { learnMoreUri } from '../codewhisperer/models/constants'
27-
import { openUrl } from '../shared/utilities/vsCodeUtils'
28-
import { AuthUtil } from '../codewhisperer'
29-
import { ConnectionStateChangeEvent } from '../auth/auth'
3026
import { telemetry } from '../shared/telemetry'
3127

3228
export async function activate(context: ExtensionContext) {
@@ -64,10 +60,7 @@ export async function activate(context: ExtensionContext) {
6460
})
6561

6662
await activateBadge()
67-
void setupAuthNotification(
68-
appInitContext.onDidChangeAmazonQVisibility.event,
69-
Auth.instance.onDidChangeConnectionState
70-
)
63+
void setupAuthNotification()
7164
}
7265

7366
function registerApps(appInitContext: AmazonQAppInitContext) {
@@ -80,85 +73,38 @@ function registerApps(appInitContext: AmazonQAppInitContext) {
8073
* Display a notification to user for Log In.
8174
*
8275
* Authentication Notification is displayed when:
83-
* - The user closes the Amazon Q chat panel, and
84-
* - The user has not performed any authentication action.
85-
*
86-
* Error Notification is displayed when:
87-
* - The user closes the Amazon Q chat panel, and
88-
* - The user attempts an authentication action but is not logged in.
76+
* - User is not authenticated
77+
* - Once every session
8978
*
90-
* @param {Event} onAmazonQChatVisibility - Event indicating the visibility status of the Amazon Q chat.
91-
* @param {Event} onDidUpdateConnection - Event indicating the authentication connection update.
9279
*/
93-
async function setupAuthNotification(
94-
onAmazonQChatVisibility: vscode.Event<boolean>,
95-
onDidUpdateConnection: vscode.Event<ConnectionStateChangeEvent | undefined>
96-
) {
97-
let isAmazonQVisible = true // Assume Chat is open by default.
80+
async function setupAuthNotification() {
9881
let notificationDisplayed = false // Auth Notification should be displayed only once.
99-
let authConnection: ConnectionStateChangeEvent
100-
101-
// Updates the visibility state of the Amazon Q chat.
102-
const updateVisibility = async (visible: boolean) => {
103-
isAmazonQVisible = visible
104-
await tryShowNotification()
105-
}
82+
await tryShowNotification()
10683

107-
// Updates the source of the connection for Amazon Q sign in.
108-
const updateConnection = async (connection: ConnectionStateChangeEvent | undefined) => {
109-
if (connection) {
110-
authConnection = connection
111-
await tryShowNotification()
84+
async function tryShowNotification() {
85+
// Do not show the notification if the IDE starts and user is already authenticated.
86+
if (Auth.instance.activeConnection) {
87+
notificationDisplayed = true
11288
}
113-
}
114-
115-
const disposables: vscode.Disposable[] = [
116-
onAmazonQChatVisibility(updateVisibility),
117-
onDidUpdateConnection(updateConnection),
118-
]
11989

120-
async function tryShowNotification() {
121-
if (notificationDisplayed || Auth.instance.activeConnection) {
90+
if (notificationDisplayed) {
12291
return
12392
}
12493

12594
const source = 'authNotification'
126-
127-
if (!isAmazonQVisible && !authConnection && !AuthUtil.instance.isConnectionExpired()) {
128-
const buttonAction = 'Sign In'
129-
notificationDisplayed = true
130-
disposables.forEach(item => item.dispose())
131-
132-
telemetry.toolkit_showNotification.emit({
133-
component: 'editor',
134-
id: source,
135-
reason: 'notLoggedIn',
136-
result: 'Succeeded',
137-
})
138-
const selection = await vscode.window.showWarningMessage('Start using Amazon Q', buttonAction)
139-
140-
if (selection === buttonAction) {
141-
void focusAmazonQPanel.execute(placeholder, source)
142-
}
143-
} else if (!isAmazonQVisible && authConnection.state === 'authenticating') {
144-
const buttonAction = 'Open documentation'
145-
notificationDisplayed = true
146-
disposables.forEach(item => item.dispose())
147-
148-
telemetry.toolkit_showNotification.emit({
149-
component: 'editor',
150-
id: source,
151-
reason: 'authenticating',
152-
result: 'Succeeded',
153-
})
154-
const selection = await vscode.window.showWarningMessage(
155-
'See Amazon Q documentation for help on signing in',
156-
buttonAction
157-
)
158-
159-
if (selection === buttonAction) {
160-
void openUrl(vscode.Uri.parse(`${learnMoreUri}#q-in-IDE-setup-bid`), source)
161-
}
95+
const buttonAction = 'Sign In'
96+
notificationDisplayed = true
97+
98+
telemetry.toolkit_showNotification.emit({
99+
component: 'editor',
100+
id: source,
101+
reason: 'notLoggedIn',
102+
result: 'Succeeded',
103+
})
104+
const selection = await vscode.window.showWarningMessage('Start using Amazon Q', buttonAction)
105+
106+
if (selection === buttonAction) {
107+
void focusAmazonQPanel.execute(placeholder, source)
162108
}
163109
}
164110
}

packages/core/src/amazonq/webview/ui/tabs/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class TabDataGenerator {
4646
],
4747
[
4848
'featuredev',
49-
`Welcome to feature development.
49+
`Hi, I'm the Amazon Q Developer Agent for software development.
5050
5151
I can generate code to implement new functionality across your workspace. We'll start by discussing an implementation plan, and then we can review and regenerate code based on your feedback.
5252

packages/core/src/amazonqFeatureDev/client/codewhispererruntime-2022-11-11.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,15 @@
10361036
},
10371037
"documentation": "<p>Represents the state of an Editor</p>"
10381038
},
1039+
"FeatureDevEvent": {
1040+
"type": "structure",
1041+
"required": ["conversationId"],
1042+
"members": {
1043+
"conversationId": {
1044+
"shape": "ConversationId"
1045+
}
1046+
}
1047+
},
10391048
"FeatureEvaluation": {
10401049
"type": "structure",
10411050
"required": ["feature", "variation", "value"],
@@ -1918,6 +1927,9 @@
19181927
},
19191928
"metricData": {
19201929
"shape": "MetricData"
1930+
},
1931+
"featureDevEvent": {
1932+
"shape": "FeatureDevEvent"
19211933
}
19221934
},
19231935
"union": true

0 commit comments

Comments
 (0)