@@ -5,9 +5,10 @@ import SettingsView from "./components/settings/SettingsView"
55import WelcomeView from "./components/welcome/WelcomeView"
66import AccountView from "./components/account/AccountView"
77import { useExtensionState } from "./context/ExtensionStateContext"
8- import { vscode } from "./utils/vscode "
8+ import { UiServiceClient } from "./services/grpc-client "
99import McpView from "./components/mcp/configuration/McpConfigurationView"
1010import { Providers } from "./Providers"
11+ import { Boolean , EmptyRequest } from "@shared/proto/common"
1112
1213const AppContent = ( ) => {
1314 const {
@@ -21,6 +22,7 @@ const AppContent = () => {
2122 showAccount,
2223 showAnnouncement,
2324 setShowAnnouncement,
25+ setShouldShowAnnouncement,
2426 closeMcpView,
2527 navigateToHistory,
2628 hideSettings,
@@ -32,7 +34,15 @@ const AppContent = () => {
3234 useEffect ( ( ) => {
3335 if ( shouldShowAnnouncement ) {
3436 setShowAnnouncement ( true )
35- vscode . postMessage ( { type : "didShowAnnouncement" } )
37+
38+ // Use the gRPC client instead of direct WebviewMessage
39+ UiServiceClient . onDidShowAnnouncement ( { } as EmptyRequest )
40+ . then ( ( response : Boolean ) => {
41+ setShouldShowAnnouncement ( response . value )
42+ } )
43+ . catch ( ( error ) => {
44+ console . error ( "Failed to acknowledge announcement:" , error )
45+ } )
3646 }
3747 } , [ shouldShowAnnouncement ] )
3848
0 commit comments