Skip to content

Commit ac9eca8

Browse files
committed
wip
1 parent 3ca78ba commit ac9eca8

File tree

9 files changed

+393
-30
lines changed

9 files changed

+393
-30
lines changed

aws-toolkit-vscode.code-workspace

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
{
2-
"folders": [
3-
{
4-
"path": "."
5-
},
6-
{
7-
"path": "packages/toolkit"
8-
},
9-
{
10-
"path": "packages/core"
11-
},
12-
{
13-
"path": "packages/amazonq"
14-
}
15-
],
16-
"settings": {
17-
"typescript.tsdk": "node_modules/typescript/lib"
18-
}
19-
}
2+
"folders": [
3+
{
4+
"path": ".",
5+
},
6+
{
7+
"path": "packages/toolkit",
8+
},
9+
{
10+
"path": "packages/core",
11+
},
12+
{
13+
"path": "packages/amazonq",
14+
},
15+
],
16+
"settings": {
17+
"typescript.tsdk": "node_modules/typescript/lib",
18+
"workbench.colorCustomizations": {
19+
"activityBar.background": "#0E350E",
20+
"titleBar.activeBackground": "#134A14",
21+
"titleBar.activeForeground": "#F3FCF3",
22+
},
23+
},
24+
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amazonq/package.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,48 @@
425425
"category": "%AWS.amazonq.title%",
426426
"enablement": "aws.codewhisperer.connected"
427427
},
428+
{
429+
"command": "aws.amazonq.notifications.clear",
430+
"title": "DEBUG Notifications: Clear notifications",
431+
"category": "%AWS.amazonq.title%",
432+
"enablement": "aws.amazonq.notifications.debug"
433+
},
434+
{
435+
"command": "aws.amazonq.notifications.reset",
436+
"title": "DEBUG Notifications: Reset notifications",
437+
"category": "%AWS.amazonq.title%",
438+
"enablement": "aws.amazonq.notifications"
439+
},
440+
{
441+
"command": "aws.amazonq.notifications.startup1",
442+
"title": "DEBUG Notifications: Send text changelog startup",
443+
"category": "%AWS.amazonq.title%",
444+
"enablement": "aws.amazonq.notifications.debug"
445+
},
446+
{
447+
"command": "aws.amazonq.notifications.startup2",
448+
"title": "DEBUG Notifications: Send direct link startup",
449+
"category": "%AWS.amazonq.title%",
450+
"enablement": "aws.amazonq.notifications.debug"
451+
},
452+
{
453+
"command": "aws.amazonq.notifications.emergency1",
454+
"title": "DEBUG Notifications: Send workaround emergency",
455+
"category": "%AWS.amazonq.title%",
456+
"enablement": "aws.amazonq.notifications.debug"
457+
},
458+
{
459+
"command": "aws.amazonq.notifications.emergency2",
460+
"title": "DEBUG Notifications: Send update and reload emergency",
461+
"category": "%AWS.amazonq.title%",
462+
"enablement": "aws.amazonq.notifications.debug"
463+
},
464+
{
465+
"command": "aws.amazonq.notifications.emergency3",
466+
"title": "DEBUG Notifications: Send critical emergency",
467+
"category": "%AWS.amazonq.title%",
468+
"enablement": "aws.amazonq.notifications.debug"
469+
},
428470
{
429471
"command": "aws.amazonq.security.scan",
430472
"title": "%AWS.command.amazonq.security.scan%",

packages/core/src/notifications/activation.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
*/
55

66
import * as vscode from 'vscode'
7-
import { DevSettings } from '../shared/settings'
87
import { NotificationsController } from './controller'
98
import { NotificationsNode } from './panelNode'
109
import { RuleEngine, getRuleContext } from './rules'
1110
import globals from '../shared/extensionGlobals'
1211
import { AuthState } from './types'
12+
import { setContext } from '../shared/vscode/setContext'
13+
import { isAmazonQ } from '../shared/extensionUtilities'
1314
import { getLogger } from '../shared/logger/logger'
1415

1516
/** Time in MS to poll for emergency notifications */
16-
const emergencyPollTime = 1000 * 10 * 60
17+
const emergencyPollTime = 1000 * 6
1718

1819
/**
1920
* Activate the in-IDE notifications module and begin receiving notifications.
@@ -28,13 +29,14 @@ export async function activate(
2829
authStateFn: () => Promise<AuthState>
2930
) {
3031
// TODO: Currently gated behind feature-flag.
31-
if (!DevSettings.instance.get('notifications', false)) {
32-
return
33-
}
32+
// if (!DevSettings.instance.get('notifications', false)) {
33+
// return
34+
// }
3435

3536
const panelNode = NotificationsNode.instance
3637
panelNode.registerView(context)
3738

39+
await setContext(isAmazonQ() ? 'aws.amazonq.notifications' : 'aws.toolkit.notifications', true)
3840
const controller = new NotificationsController(panelNode)
3941
const engine = new RuleEngine(await getRuleContext(context, initialState))
4042

0 commit comments

Comments
 (0)