Skip to content

Commit 0ab9eaa

Browse files
committed
Adds promos context to AppBase
1 parent cb9b565 commit 0ab9eaa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/webviews/apps/shared/appBase.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import type {
1414
import { DidChangeWebviewFocusNotification, WebviewFocusChangedCommand, WebviewReadyCommand } from '../../protocol';
1515
import { ipcContext } from './contexts/ipc';
1616
import { loggerContext, LoggerContext } from './contexts/logger';
17+
import { PromosContext, promosContext } from './contexts/promos';
1718
import { telemetryContext, TelemetryContext } from './contexts/telemetry';
1819
import { DOM } from './dom';
1920
import type { Disposable } from './events';
@@ -32,6 +33,7 @@ export abstract class App<
3233
private readonly _api: HostIpcApi;
3334
private readonly _hostIpc: HostIpc;
3435
private readonly _logger: LoggerContext;
36+
private readonly _promos: PromosContext;
3537
protected readonly _telemetry: TelemetryContext;
3638

3739
protected state: State;
@@ -58,6 +60,9 @@ export abstract class App<
5860
this._hostIpc = new HostIpc(this.appName);
5961
disposables.push(this._hostIpc);
6062

63+
this._promos = new PromosContext(this._hostIpc);
64+
disposables.push(this._promos);
65+
6166
this._telemetry = new TelemetryContext(this._hostIpc);
6267
disposables.push(this._telemetry);
6368

@@ -66,6 +71,10 @@ export abstract class App<
6671
context: loggerContext,
6772
initialValue: this._logger,
6873
});
74+
new ContextProvider(document.body, {
75+
context: promosContext,
76+
initialValue: this._promos,
77+
});
6978
new ContextProvider(document.body, {
7079
context: telemetryContext,
7180
initialValue: this._telemetry,

0 commit comments

Comments
 (0)