Skip to content

Commit f3e5ddf

Browse files
authored
Intro view (#360)
* Introduce an introductory view and refactor the main application layout to enable view switching * Refactor the component to and update option descriptions * Encapsulate the `extract-path-from-line-of-code` utility within its own module directory * Introduce an initial welcome screen to the VS Code extension, displaying product branding and version
1 parent d824e71 commit f3e5ddf

25 files changed

Lines changed: 250 additions & 98 deletions

File tree

packages/shared/src/utils/extract-path-from-line-of-code.spec.ts renamed to packages/shared/src/utils/extract-path-from-line-of-code/extract-path-from-line-of-code.spec.ts

File renamed without changes.

packages/shared/src/utils/extract-path-from-line-of-code.ts renamed to packages/shared/src/utils/extract-path-from-line-of-code/extract-path-from-line-of-code.ts

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './extract-path-from-line-of-code'
Lines changed: 34 additions & 0 deletions
Loading

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
text-align: center;
99
padding: var(--padding-3px) var(--padding-8px);
1010
cursor: pointer;
11-
font-size: var(--font-size-11px);
11+
font-size: var(--font-size-12px);
1212
user-select: none;
1313
color: var(--vscode-foreground);
1414
background-color: var(--vscode-list-hoverBackground);

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

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

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

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

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
align-items: center;
1313
justify-content: space-between;
1414
padding: var(--padding-8px) var(--padding-12px) var(--padding-6px)
15-
var(--padding-14px);
15+
var(--padding-12px);
1616
border-bottom: 1px solid var(--vscode-sideBarSectionHeader-border);
1717
position: relative;
1818

@@ -24,18 +24,6 @@
2424
font-size: var(--font-size-14px);
2525
}
2626

27-
&__back {
28-
display: flex;
29-
align-items: center;
30-
gap: var(--padding-2px);
31-
32-
> span {
33-
font-size: var(--font-size-13px);
34-
font-weight: 500;
35-
color: var(--vscode-editor-foreground);
36-
}
37-
}
38-
3927
&__right {
4028
display: flex;
4129

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

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,13 @@ export const Page: React.FC<Props> = (props) => {
1717
{props.title && (
1818
<div className={styles.header__title}>{props.title}</div>
1919
)}
20-
<div className={styles.header__back}>
21-
{props.on_back_click && (
22-
<>
23-
<IconButton
24-
codicon_icon="chevron-left"
25-
on_click={props.on_back_click}
26-
title="Return to previous screen"
27-
/>
28-
<span>Back</span>
29-
</>
30-
)}
31-
</div>
20+
{props.on_back_click && (
21+
<IconButton
22+
codicon_icon="chevron-left"
23+
on_click={props.on_back_click}
24+
title="Return to previous screen"
25+
/>
26+
)}
3227
<div className={styles.header__right}>
3328
<div className={styles.header__right__slot}>{props.header_slot}</div>
3429
{props.on_close_click && (

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,8 @@
1616
margin-bottom: var(--padding-2px);
1717

1818
&__left {
19-
display: flex;
20-
align-items: center;
21-
gap: var(--padding-4px);
2219
opacity: 0.7;
23-
24-
> span {
25-
color: var(--vscode-foreground);
26-
}
20+
color: var(--vscode-foreground);
2721
}
2822
}
2923

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,7 @@ export const Presets: React.FC<Presets.Props> = (props) => {
7676
})}
7777
>
7878
<div className={styles['my-presets']}>
79-
<div className={styles['my-presets__left']}>
80-
<span>MY CHAT PRESETS</span>
81-
82-
<IconButton
83-
codicon_icon="info"
84-
href="https://codeweb.chat/chatbot-initialization/#presets"
85-
/>
86-
</div>
79+
<div className={styles['my-presets__left']}>MY PRESETS</div>
8780

8881
<TextButton
8982
on_click={props.on_set_default_presets}

0 commit comments

Comments
 (0)