Skip to content

Commit 21ee864

Browse files
committed
Merge branch 'dev'
2 parents a3990cb + ecd456a commit 21ee864

20 files changed

Lines changed: 552 additions & 555 deletions

File tree

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import OpenRouter from '../../../../assets/icons/openrouter.svg'
2424
import OpenWebUI from '../../../../assets/icons/open-webui.svg'
2525
import Perplexity from '../../../../assets/icons/perplexity.svg'
2626
import Qwen from '../../../../assets/icons/qwen.svg'
27-
import Reddit from '../../../../assets/icons/reddit.svg'
2827
import Together from '../../../../assets/icons/together.svg'
2928
import X from '../../../../assets/icons/x.svg'
3029
import Yuanbao from '../../../../assets/icons/yuanbao.svg'
@@ -58,7 +57,6 @@ export namespace Icon {
5857
| 'OPEN_WEBUI'
5958
| 'PERPLEXITY'
6059
| 'QWEN'
61-
| 'REDDIT'
6260
| 'TOGETHER'
6361
| 'X'
6462
| 'YUANBAO'
@@ -151,9 +149,6 @@ export const Icon: React.FC<Icon.Props> = ({ variant }) => {
151149
case 'QWEN':
152150
icon = <Qwen />
153151
break
154-
case 'REDDIT':
155-
icon = <Reddit />
156-
break
157152
case 'TOGETHER':
158153
icon = <Together />
159154
break

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
display: flex;
33
flex-direction: column;
44
align-items: flex-start;
5-
gap: var(--padding-2px);
6-
padding: var(--padding-6px) var(--padding-8px)
7-
calc(var(--padding-6px) + var(--padding-5px)) var(--padding-8px);
5+
padding: var(--padding-6px) var(--padding-8px) var(--padding-8px)
6+
var(--padding-8px);
87
margin-bottom: calc(var(--padding-5px) * -1);
98
background: linear-gradient(
109
135deg,
@@ -15,10 +14,10 @@
1514
--border-radius: var(--border-radius-8px);
1615
border-top-left-radius: var(--border-radius);
1716
border-top-right-radius: var(--border-radius);
17+
}
1818

19-
> span {
20-
font-weight: 500;
21-
}
19+
.heading {
20+
font-weight: 500;
2221
}
2322

2423
.links {

‎packages/ui/src/components/editor/panel/BrowserExtensionMessage/BrowserExtensionMessage.tsx‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
import { FC } from 'react'
21
import styles from './BrowserExtensionMessage.module.scss'
32

4-
export const BrowserExtensionMessage: FC = () => {
3+
export const BrowserExtensionMessage: React.FC = () => {
54
return (
65
<div className={styles.container}>
7-
<span>Install Connector for chat initializations</span>
6+
<div className={styles.heading}>
7+
Install Connector for chat initializations
8+
</div>
89
<div className={styles.links}>
910
<a href="https://chromewebstore.google.com/detail/code-web-chat-connector/ljookipcanaglfaocjbgdicfbdhhjffp">
10-
<span>Chrome Web Store</span>
11+
Chrome Web Store
1112
</a>
1213
<a href="https://addons.mozilla.org/en-US/firefox/addon/code-web-chat-connector/">
13-
<span>Firefox Add-ons</span>
14+
Firefox Add-ons
1415
</a>
1516
</div>
1617
</div>

‎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",
44
"description": "Blazing fast AI pair programming for production-grade code. Select context as you go for pro accuracy and game-changing speed. (CWC)",
5-
"version": "1.499.0",
5+
"version": "1.500.0",
66
"scripts": {
77
"build": "npx vsce package --no-dependencies",
88
"vscode:prepublish": "rimraf out && npm run compile",

‎packages/vscode/src/context/providers/workspace-provider.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,13 @@ export class WorkspaceProvider
578578
}
579579

580580
private async _get_workspace_folder_items(
581-
contextView = false
581+
context_view = false
582582
): Promise<FileItem[]> {
583583
const items: FileItem[] = []
584584
for (let i = 0; i < this.workspace_roots.length; i++) {
585585
const root = this.workspace_roots[i]
586586

587-
if (contextView) {
587+
if (context_view) {
588588
const state = this.checked_items.get(root)
589589
const is_partially_checked = this.partially_checked_dirs.has(root)
590590
if (
@@ -619,7 +619,7 @@ export class WorkspaceProvider
619619
true // Is workspace root
620620
)
621621
)
622-
if (contextView) {
622+
if (context_view) {
623623
const last_item = items[items.length - 1]
624624
last_item.contextValue = 'contextWorkspaceRoot'
625625
}

‎packages/vscode/src/views/panel/frontend/Home/Home.module.scss‎

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
.container {
2-
position: relative;
3-
display: flex;
4-
flex-direction: column;
5-
height: 100%;
6-
}
7-
81
.header {
92
display: flex;
103
align-items: center;
@@ -116,53 +109,3 @@
116109
text-decoration: underline;
117110
}
118111
}
119-
120-
.footer {
121-
display: flex;
122-
justify-content: space-between;
123-
align-items: center;
124-
gap: var(--padding-4px);
125-
padding: var(--padding-8px) var(--padding-12px);
126-
border-top: 1px solid var(--vscode-sideBarSectionHeader-border);
127-
128-
&__social {
129-
display: flex;
130-
justify-content: flex-start;
131-
align-items: center;
132-
gap: var(--padding-8px);
133-
134-
&__icon {
135-
display: flex;
136-
align-items: center;
137-
justify-content: center;
138-
--size: 24px;
139-
width: var(--size);
140-
height: var(--size);
141-
border-radius: var(--border-radius-4px);
142-
143-
> svg {
144-
fill: white;
145-
width: 15px;
146-
}
147-
148-
&--x {
149-
background-color: black;
150-
}
151-
152-
&--reddit {
153-
background-color: #ff6314;
154-
}
155-
156-
&--discord {
157-
background-color: #7289da;
158-
}
159-
}
160-
}
161-
162-
&__version {
163-
flex: 1;
164-
text-align: right;
165-
user-select: text;
166-
color: var(--vscode-descriptionForeground);
167-
}
168-
}

‎packages/vscode/src/views/panel/frontend/Home/Home.tsx‎

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Scrollable } from '@ui/components/editor/panel/Scrollable'
33
import { Enter } from '@ui/components/editor/panel/Enter'
44
import { HomeLinkButton } from '@ui/components/editor/panel/HomeLinkButton'
55
import { Donations } from '@ui/components/editor/panel/Donations'
6-
import { Icon } from '@ui/components/editor/common/Icon'
76
import { use_latest_donations } from './hooks/latest-donations-hook'
87
import cn from 'classnames'
98
import { post_message } from '../utils/post_message'
@@ -37,7 +36,7 @@ export const Home: React.FC<Props> = (props) => {
3736
}
3837

3938
return (
40-
<div className={styles.container}>
39+
<>
4140
<div className={styles['header']}>
4241
<div className={styles['header__left']}>
4342
<div className={styles['header__home']}>
@@ -106,6 +105,7 @@ export const Home: React.FC<Props> = (props) => {
106105

107106
<div className={styles.bottom}>
108107
<div className={styles.bottom__links}>
108+
<div>{props.version}</div>
109109
<div>
110110
Released under the{' '}
111111
<a href="https://github.com/robertpiosik/CodeWebChat/blob/dev/LICENSE">
@@ -120,33 +120,6 @@ export const Home: React.FC<Props> = (props) => {
120120
</div>
121121
</div>
122122
</Scrollable>
123-
124-
<div className={styles.footer}>
125-
<div className={styles.footer__social}>
126-
<a
127-
href="https://x.com/CodeWebChat"
128-
title="Follow on X"
129-
className={cn(
130-
styles.footer__social__icon,
131-
styles['footer__social__icon--x']
132-
)}
133-
>
134-
<Icon variant="X" />
135-
</a>
136-
<a
137-
href="https://discord.gg/KJySXsrSX5"
138-
title="Join Discord server"
139-
className={cn(
140-
styles.footer__social__icon,
141-
styles['footer__social__icon--discord']
142-
)}
143-
>
144-
<Icon variant="DISCORD" />
145-
</a>
146-
</div>
147-
148-
<div className={styles.footer__version}>{props.version}</div>
149-
</div>
150-
</div>
123+
</>
151124
)
152125
}

‎packages/vscode/src/views/panel/frontend/Main/Main.tsx‎

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ type Props = {
5252
has_active_selection: boolean
5353
chat_input_focus_and_select_key: number
5454
chat_input_focus_key: number
55-
commit_button_enabling_trigger_count: number
5655
context_size_warning_threshold: number
5756
}
5857

@@ -84,9 +83,6 @@ export const Main: React.FC<Props> = (props) => {
8483
const [caret_position_to_set, set_caret_position_to_set] = useState<
8584
number | undefined
8685
>()
87-
const [has_changes_to_commit, set_has_changes_to_commit] =
88-
useState<boolean>(false)
89-
const [can_undo, set_can_undo] = useState<boolean>(false)
9086

9187
const is_in_code_completions_mode =
9288
(props.home_view_type == HOME_VIEW_TYPES.WEB &&
@@ -146,12 +142,6 @@ export const Main: React.FC<Props> = (props) => {
146142
case 'EDIT_FORMAT_INSTRUCTIONS':
147143
set_edit_format_instructions(message.instructions)
148144
break
149-
case 'GIT_STATE_CHANGED':
150-
set_has_changes_to_commit(message.has_changes_to_commit)
151-
break
152-
case 'CAN_UNDO_CHANGED':
153-
set_can_undo(message.can_undo)
154-
break
155145
case 'SELECTED_PRESET_OR_GROUP_CHANGED':
156146
set_selected_preset_or_group_name_by_mode((prev) => ({
157147
...prev,
@@ -179,8 +169,7 @@ export const Main: React.FC<Props> = (props) => {
179169
{ command: 'GET_INSTRUCTIONS' },
180170
{ command: 'GET_EDIT_FORMAT' },
181171
{ command: 'GET_EDIT_FORMAT_INSTRUCTIONS' },
182-
{ command: 'GET_API_TOOL_CONFIGURATIONS' },
183-
{ command: 'REQUEST_GIT_STATE' }
172+
{ command: 'GET_API_TOOL_CONFIGURATIONS' }
184173
]
185174
initial_messages.forEach((message) => post_message(props.vscode, message))
186175

@@ -556,12 +545,6 @@ export const Main: React.FC<Props> = (props) => {
556545
})
557546
}
558547

559-
const handle_commit_click = () => {
560-
post_message(props.vscode, {
561-
command: 'COMMIT_CHANGES'
562-
})
563-
}
564-
565548
const handle_response_history_item_click = (item: {
566549
response: string
567550
raw_instructions?: string
@@ -575,12 +558,6 @@ export const Main: React.FC<Props> = (props) => {
575558
})
576559
}
577560

578-
const handle_undo_click = () => {
579-
post_message(props.vscode, {
580-
command: 'UNDO'
581-
})
582-
}
583-
584561
const instructions =
585562
current_mode == 'ask'
586563
? props.ask_instructions
@@ -651,12 +628,8 @@ export const Main: React.FC<Props> = (props) => {
651628
presets={presets_for_current_mode}
652629
on_create_preset={handle_create_preset}
653630
on_quick_action_click={handle_quick_action_click}
654-
on_commit_click={handle_commit_click}
655-
on_undo_click={handle_undo_click}
656631
has_active_editor={props.has_active_editor}
657632
has_active_selection={props.has_active_selection}
658-
has_changes_to_commit={has_changes_to_commit}
659-
can_undo={can_undo}
660633
chat_history={current_history || []}
661634
token_count={token_count}
662635
web_mode={props.web_mode}
@@ -696,9 +669,6 @@ export const Main: React.FC<Props> = (props) => {
696669
on_caret_position_set={() => set_caret_position_to_set(undefined)}
697670
chat_input_focus_and_select_key={props.chat_input_focus_and_select_key}
698671
chat_input_focus_key={props.chat_input_focus_key}
699-
commit_button_enabling_trigger_count={
700-
props.commit_button_enabling_trigger_count
701-
}
702672
response_history={props.response_history}
703673
on_response_history_item_click={handle_response_history_item_click}
704674
selected_history_item_created_at={props.selected_history_item_created_at}

‎packages/vscode/src/views/panel/frontend/Main/MainView/MainView.module.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
border-top-right-radius: var(--border-radius-5px);
2525
border: 1px solid var(--vscode-commandCenter-inactiveBorder);
2626
border-bottom: 0px;
27-
padding-bottom: 5px;
28-
margin-bottom: -5px;
27+
padding-bottom: var(--padding-5px);
28+
margin-bottom: calc(var(--padding-5px) * -1);
2929
overflow: hidden;
3030

3131
&__item {

‎packages/vscode/src/views/panel/frontend/Main/MainView/MainView.tsx‎

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { use_cycle_mode } from './hooks/use-cycle-mode'
2020
import { use_re_render_on_interval } from './hooks/use-re-render-on-interval'
2121
import { ContextUtilisation as UiContextUtilisation } from '@ui/components/editor/panel/ContextUtilisation'
2222
import { WEB_MODES, API_MODES } from './modes'
23-
import { Footer } from './components/Footer'
2423
import { Header } from './components/Header'
2524
import cn from 'classnames'
2625
import { FileInPreview } from '@shared/types/file-in-preview'
@@ -43,8 +42,6 @@ type Props = {
4342
on_hash_sign_click: () => void
4443
on_curly_braces_click: () => void
4544
on_quick_action_click: (command: string) => void
46-
on_commit_click: () => void
47-
on_undo_click: () => void
4845
is_connected: boolean
4946
presets: Preset[]
5047
configurations: ApiToolConfiguration[]
@@ -55,8 +52,6 @@ type Props = {
5552
on_manage_configurations: () => void
5653
has_active_editor: boolean
5754
has_active_selection: boolean
58-
has_changes_to_commit: boolean
59-
can_undo: boolean
6055
chat_history: string[]
6156
token_count: number
6257
context_size_warning_threshold: number
@@ -105,7 +100,6 @@ type Props = {
105100
}) => void
106101
selected_history_item_created_at?: number
107102
on_selected_history_item_change: (created_at: number) => void
108-
commit_button_enabling_trigger_count: number // Incremented when commit changes operation is cancelled
109103
}
110104

111105
export const MainView: React.FC<Props> = (props) => {
@@ -180,7 +174,7 @@ export const MainView: React.FC<Props> = (props) => {
180174
}`
181175

182176
return (
183-
<div className={styles.container}>
177+
<>
184178
<Header
185179
home_view_type={props.home_view_type}
186180
on_home_view_type_change={props.on_home_view_type_change}
@@ -350,18 +344,6 @@ export const MainView: React.FC<Props> = (props) => {
350344
)}
351345
</div>
352346
</Scrollable>
353-
354-
<Footer
355-
home_view_type={props.home_view_type}
356-
on_quick_action_click={props.on_quick_action_click}
357-
on_undo_click={props.on_undo_click}
358-
can_undo={props.can_undo}
359-
on_commit_click={props.on_commit_click}
360-
has_changes_to_commit={props.has_changes_to_commit}
361-
commit_button_enabling_trigger_count={
362-
props.commit_button_enabling_trigger_count
363-
}
364-
/>
365-
</div>
347+
</>
366348
)
367349
}

0 commit comments

Comments
 (0)