Skip to content

Commit 970f76e

Browse files
committed
Integrate the new Z.AI icon and chatbot preset
1 parent 64090f4 commit 970f76e

6 files changed

Lines changed: 28 additions & 12 deletions

File tree

Lines changed: 9 additions & 0 deletions
Loading

packages/ui/src/components/editor/BrowserExtensionMessage/BrowserExtensionMessage.module.scss

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
flex-direction: column;
44
align-items: flex-start;
55
gap: var(--padding-4px);
6-
padding: var(--padding-6px) var(--padding-10px) var(--padding-10px)
7-
var(--padding-10px);
8-
background-color: var(--vscode-inputOption-activeBackground);
6+
padding: var(--padding-6px) var(--padding-8px) var(--padding-10px)
7+
var(--padding-8px);
8+
background: linear-gradient(
9+
90deg,
10+
var(--vscode-inputOption-activeBackground),
11+
var(--vscode-sideBar-background)
12+
);
913
color: var(--vscode-inputOption-activeForeground);
10-
--border-radius: var(--border-radius-5px);
14+
--border-radius: var(--border-radius-8px);
1115
border-top-left-radius: var(--border-radius);
12-
border-top-right-radius: var(--border-radius);
1316

1417
> span {
1518
font-weight: 500;

packages/ui/src/components/editor/Icon/Icon.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import Perplexity from '../../../assets/icons/perplexity.svg'
1818
import Reddit from '../../../assets/icons/reddit.svg'
1919
import X from '../../../assets/icons/x.svg'
2020
import CodeWebChat from '../../../assets/icons/code-web-chat.svg'
21+
import ZAI from '../../../assets/icons/z-ai.svg'
2122

2223
export namespace Icon {
2324
export type Variant =
@@ -41,6 +42,7 @@ export namespace Icon {
4142
| 'REDDIT'
4243
| 'X'
4344
| 'CODE_WEB_CHAT'
45+
| 'Z_AI'
4446

4547
export type Props = {
4648
variant: Variant
@@ -111,9 +113,10 @@ export const Icon: React.FC<Icon.Props> = ({ variant }) => {
111113
case 'CODE_WEB_CHAT':
112114
icon = <CodeWebChat />
113115
break
116+
case 'Z_AI':
117+
icon = <ZAI />
118+
break
114119
default:
115-
// Handle cases where variant might not match any known icon
116-
// This could be an empty fragment, a default icon, or throw an error
117120
icon = <></>
118121
break
119122
}

packages/ui/src/components/editor/Presets/Presets.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useState } from 'react'
88
import { CHATBOTS } from '@shared/constants/chatbots'
99
import { TextButton } from '../TextButton'
1010

11-
export const chatbot_to_icon = {
11+
export const chatbot_to_icon: Record<keyof typeof CHATBOTS, Icon.Variant> = {
1212
'AI Studio': 'AI_STUDIO',
1313
Gemini: 'GEMINI',
1414
'Open WebUI': 'OPEN_WEBUI',
@@ -22,8 +22,9 @@ export const chatbot_to_icon = {
2222
Yuanbao: 'YUANBAO',
2323
Kimi: 'KIMI',
2424
Doubao: 'DOUBAO',
25-
Perplexity: 'PERPLEXITY'
26-
} as Record<string, Icon.Variant>
25+
Perplexity: 'PERPLEXITY',
26+
'Z.AI': 'Z_AI'
27+
}
2728

2829
export namespace Presets {
2930
export type Preset = {

packages/vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gemini-coder",
33
"displayName": "Code Web Chat (CWC)",
44
"description": "Free AI coding for the rest of us",
5-
"version": "1.202.0",
5+
"version": "1.203.0",
66
"scripts": {
77
"build": "npx vsce package --no-dependencies",
88
"vscode:prepublish": "rimraf out && npm run compile",

packages/vscode/src/view/frontend/home/HomeView/HomeView.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
}
169169

170170
.browser-extension-message {
171-
padding: 0 var(--padding-12px);
171+
padding: 0 var(--padding-16px);
172172
margin-bottom: -4px;
173173
position: relative;
174174
}

0 commit comments

Comments
 (0)