Skip to content

Commit 6e75d73

Browse files
committed
fix: overriding background/foreground color for all elements except Tooltip-related & removed ToolCommand since it's no longer exposed
1 parent f415eb5 commit 6e75d73

File tree

2 files changed

+56
-54
lines changed

2 files changed

+56
-54
lines changed

assets/custom-theme.css

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
1-
:where(.vscode-light) {
2-
color-scheme: light;
3-
4-
}
5-
:where(.vscode-dark) {
6-
color-scheme: dark;
7-
}
8-
9-
.vscode-dark {
10-
color-scheme: dark;
11-
}
12-
13-
.radix-themes {
14-
/** TODO: there are more theme-able variables we can use */
15-
--default-font-family: var(--vscode-font-family);
16-
--code-font-family: var(--vscode-editor-font-family);
17-
--color-background: var(--vscode-sideBar-background);
18-
--color-panel: var(--vscode-panel-background);
19-
--color-surface: var(--vscode-panel-background);
20-
color: var(--vscode-sideBar-foreground);
21-
background-color: var(--color-background);
22-
}
23-
24-
.radix-themes code {
25-
color: unset;
26-
background-color: unset;
27-
}
28-
29-
:where([data-state-tabbed]) .radix-themes {
30-
--color-background: var(--vscode-editor-background);
31-
--color-panel: var(--vscode-input-background);
32-
color: var(--vscode-editor-foreground);
33-
}
34-
35-
body {
36-
padding: 0;
37-
background-color: transparent;
38-
}
39-
40-
41-
.hljs {
42-
background: var(--vscode-textPreformat-background);
43-
}
44-
45-
.hljs > code {
46-
background-color: transparent;
1+
:where(.vscode-light) {
2+
color-scheme: light;
3+
}
4+
5+
:where(.vscode-dark) {
6+
color-scheme: dark;
7+
}
8+
9+
.vscode-dark {
10+
color-scheme: dark;
11+
}
12+
13+
.radix-themes {
14+
/** TODO: there are more theme-able variables we can use */
15+
--default-font-family: var(--vscode-font-family);
16+
--code-font-family: var(--vscode-editor-font-family);
17+
--color-background: var(--vscode-sideBar-background);
18+
--color-panel: var(--vscode-panel-background);
19+
--color-surface: var(--vscode-panel-background);
20+
}
21+
22+
.radix-themes > *:not(.rt-TooltipContent):not(.rt-TooltipText) {
23+
color: var(--vscode-sideBar-foreground);
24+
background-color: var(--color-background);
25+
}
26+
27+
.radix-themes code {
28+
color: unset;
29+
background-color: unset;
30+
}
31+
32+
:where([data-state-tabbed]) .radix-themes {
33+
--color-background: var(--vscode-editor-background);
34+
--color-panel: var(--vscode-input-background);
35+
color: var(--vscode-editor-foreground);
36+
}
37+
38+
body {
39+
padding: 0;
40+
background-color: transparent;
41+
}
42+
43+
.hljs {
44+
background: var(--vscode-textPreformat-background);
45+
}
46+
47+
.hljs > code {
48+
background-color: transparent;
4749
}

src/chatTab.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
// type ChatMessage,
3434
// type SetChatModel,
3535
// RequestTools,
36-
ToolCommand,
36+
// ToolCommand,
3737
// RecieveTools,
3838
// QuestionFromChat
3939
} from "refact-chat-js/dist/events";
@@ -393,15 +393,15 @@ export class ChatTab {
393393
title,
394394
messages,
395395
attach_file,
396-
tools = null,
396+
// tools = null,
397397
}: {
398398
id: string;
399399
model: string;
400400
title?: string;
401401
// messages: [string, string][];
402402
messages: ChatMessages;
403403
attach_file?: boolean;
404-
tools?: ToolCommand[] | null;
404+
// tools?: ToolCommand[] | null;
405405
}): Promise<void> {
406406
// // this.web_panel.webview.postMessage({type: EVENT_NAMES_TO_CHAT.SET_DISABLE_CHAT, payload: { id, disable: true }});
407407
// // const file = attach_file && this.getActiveFileInfo();
@@ -899,14 +899,14 @@ export class ChatTab {
899899
const scriptUri = webview.asWebviewUri(
900900
vscode.Uri.joinPath(extensionUri, "node_modules", "refact-chat-js", "dist", "chat", "index.umd.cjs")
901901
);
902-
903-
const styleMainUri = webview.asWebviewUri(
904-
vscode.Uri.joinPath(extensionUri, "node_modules", "refact-chat-js", "dist", "chat", "style.css")
905-
);
906-
902+
907903
const styleOverride = webview.asWebviewUri(
908904
vscode.Uri.joinPath(extensionUri, "assets", "custom-theme.css")
909905
);
906+
907+
const styleMainUri = webview.asWebviewUri(
908+
vscode.Uri.joinPath(extensionUri, "node_modules", "refact-chat-js", "dist", "chat", "style.css")
909+
);
910910

911911
const fontSize = vscode.workspace.getConfiguration().get<number>("editor.fontSize") ?? 12;
912912
const scaling = fontSize < 14 ? "90%" : "100%";

0 commit comments

Comments
 (0)