Make announcement close on show

This commit is contained in:
Saoud Rizwan
2024-08-27 21:45:51 -04:00
parent 843ef29a07
commit 083005ecef
3 changed files with 3 additions and 3 deletions

View File

@@ -354,7 +354,7 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
await this.clearTask()
await this.postStateToWebview()
break
case "didCloseAnnouncement":
case "didShowAnnouncement":
await this.updateGlobalState("lastShownAnnouncementId", this.latestAnnouncementId)
await this.postStateToWebview()
break

View File

@@ -10,7 +10,7 @@ export interface WebviewMessage {
| "newTask"
| "askResponse"
| "clearTask"
| "didCloseAnnouncement"
| "didShowAnnouncement"
| "selectImages"
| "exportCurrentTask"
| "showTaskWithId"

View File

@@ -28,6 +28,7 @@ const AppContent = () => {
// don't update showAnnouncement to false if shouldShowAnnouncement is false
if (message.state!.shouldShowAnnouncement) {
setShowAnnouncement(true)
vscode.postMessage({ type: "didShowAnnouncement" })
}
break
case "action":
@@ -75,7 +76,6 @@ const AppContent = () => {
selectedModelSupportsImages={selectedModelInfo.supportsImages}
selectedModelSupportsPromptCache={selectedModelInfo.supportsPromptCache}
hideAnnouncement={() => {
vscode.postMessage({ type: "didCloseAnnouncement" })
setShowAnnouncement(false)
}}
/>