Skip to content

Commit 829d6a2

Browse files
authored
Merge pull request #3511 from Kilo-Org/christiaan/dismiss
Make it possible to dismiss native notification
2 parents 7feb3ff + 260009c commit 829d6a2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/core/kilocode/webview/webviewMessageHandlerUtils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,21 @@ export const fetchKilocodeNotificationsHandler = async (provider: ClineProvider)
125125
try {
126126
const message = `${notification.title}: ${notification.message}`
127127
const actionButton = notification.action?.actionText
128+
const dismissButton = "Do not show again"
128129
const selection = await vscode.window.showInformationMessage(
129130
message,
130-
...(actionButton ? [actionButton] : []),
131+
...(actionButton ? [actionButton, dismissButton] : [dismissButton]),
131132
)
132-
if (selection === actionButton) {
133+
if (selection) {
133134
const currentDismissedIds = dismissedNotificationIds || []
134135
if (!currentDismissedIds.includes(notification.id)) {
135136
await provider.contextProxy.setValue("dismissedNotificationIds", [
136137
...currentDismissedIds,
137138
notification.id,
138139
])
139140
}
140-
141+
}
142+
if (selection === actionButton) {
141143
if (notification.action?.actionURL) {
142144
await vscode.env.openExternal(vscode.Uri.parse(notification.action.actionURL))
143145
}

0 commit comments

Comments
 (0)