refactor(vscode/chat): remove unused getTheme function and related code (#3107)

This commit is contained in:
Meng Zhang 2024-09-09 22:01:56 -07:00 committed by GitHub
parent 4ec042128f
commit 8d83f30332
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -348,10 +348,6 @@ export class ChatViewProvider implements WebviewViewProvider {
<script defer>
const vscode = acquireVsCodeApi();
function getTheme () {
return document.body.className === 'vscode-dark' ? 'dark' : 'light'
}
function getCssVariableValue(variableName) {
const root = document.documentElement;
return getComputedStyle(root).getPropertyValue(variableName).trim();
@ -378,7 +374,6 @@ export class ChatViewProvider implements WebviewViewProvider {
if (chatIframe) {
const fontSize = getCssVariableValue('--vscode-font-size');
const foreground = getCssVariableValue('--vscode-editor-foreground');
const theme = getTheme()
chatIframe.addEventListener('load', function() {
setTimeout(() => {