@@ -54,6 +54,11 @@ import { getWorkspacePath } from "../../utils/path"
5454import { webviewMessageHandler } from "./webviewMessageHandler"
5555import { WebviewMessage } from "../../shared/WebviewMessage"
5656
57+ function getFontAliasingSetting ( ) : string | undefined {
58+ const fontAliasingSetting = vscode . workspace . getConfiguration ( "workbench" ) . get ( "fontAliasing" )
59+ return typeof fontAliasingSetting === "string" ? fontAliasingSetting : undefined
60+ }
61+
5762/**
5863 * https://github.com/microsoft/vscode-webview-ui-toolkit-samples/blob/main/default/weather-webview/src/providers/WeatherViewProvider.ts
5964 * https://github.com/KumarVariable/vscode-extension-sidebar-html/blob/master/src/customSidebarViewProvider.ts
@@ -448,18 +453,15 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
448453 await this . postMessageToWebview ( { type : "theme" , text : JSON . stringify ( await getTheme ( ) ) } )
449454 }
450455 if ( e . affectsConfiguration ( "workbench.fontAliasing" ) ) {
451- const fontAliasingSetting = vscode . workspace . getConfiguration ( "workbench" ) . get ( "fontAliasing" )
452- const fontAliasing = typeof fontAliasingSetting === "string" ? fontAliasingSetting : undefined
456+ const fontAliasing = getFontAliasingSetting ( )
453457 await this . postMessageToWebview ( { type : "fontAliasing" , value : fontAliasing } )
454458 }
455459 } ,
456460 null ,
457461 this . disposables ,
458462 )
459463
460- const initialFontAliasingSetting = vscode . workspace . getConfiguration ( "workbench" ) . get ( "fontAliasing" )
461- const initialFontAliasing =
462- typeof initialFontAliasingSetting === "string" ? initialFontAliasingSetting : undefined
464+ const initialFontAliasing = getFontAliasingSetting ( )
463465 await this . postMessageToWebview ( { type : "fontAliasing" , value : initialFontAliasing } )
464466
465467 // If the extension is starting a new session, clear previous task state.
0 commit comments