File tree 9 files changed +12
-39
lines changed
9 files changed +12
-39
lines changed Original file line number Diff line number Diff line change 2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="utf-8 " />
5
- < link rel ="icon " href ="%PUBLIC_URL%/favicon.ico " />
6
5
< meta name ="viewport " content ="width=device-width, initial-scale=1 " />
7
6
< meta name ="theme-color " content ="#000000 " />
8
- < meta
9
- name ="description "
10
- content ="Web site created using create-react-app "
11
- />
12
- < link rel ="apple-touch-icon " href ="%PUBLIC_URL%/logo192.png " />
7
+ < meta name ="description " content ="Webviews for FireCoder " />
13
8
< link rel ="manifest " href ="%PUBLIC_URL%/manifest.json " />
14
- < title > Hello World </ title >
9
+ < title > FireCoder </ title >
15
10
</ head >
16
11
< body >
17
12
< noscript > You need to enable JavaScript to run this app.</ noscript >
Original file line number Diff line number Diff line change 1
1
{
2
- "short_name" : " React App" ,
3
- "name" : " Create React App Sample" ,
4
- "icons" : [
5
- {
6
- "src" : " favicon.ico" ,
7
- "sizes" : " 64x64 32x32 24x24 16x16" ,
8
- "type" : " image/x-icon"
9
- },
10
- {
11
- "src" : " logo192.png" ,
12
- "type" : " image/png" ,
13
- "sizes" : " 192x192"
14
- },
15
- {
16
- "src" : " logo512.png" ,
17
- "type" : " image/png" ,
18
- "sizes" : " 512x512"
19
- }
20
- ],
2
+ "short_name" : " FireCoder" ,
3
+ "name" : " Webviews for FireCoder" ,
21
4
"start_url" : " ." ,
22
5
"display" : " standalone" ,
23
6
"theme_color" : " #000000" ,
24
7
"background_color" : " #ffffff"
25
- }
8
+ }
Original file line number Diff line number Diff line change @@ -15,11 +15,9 @@ body {
15
15
overflow : auto;
16
16
display : flex;
17
17
flex-direction : column;
18
- /* max-height: 92vh; */
19
18
}
20
19
21
20
.chat-input-block {
22
- /* min-height: 8vh; */
23
21
display : flex;
24
22
flex-direction : row;
25
23
width : calc (100% - 40px );
Original file line number Diff line number Diff line change 1
1
import { vscode } from "./utilities/vscode" ;
2
- import {
3
- VSCodeButton ,
4
- VSCodeProgressRing ,
5
- VSCodeTextArea ,
6
- VSCodeTextField ,
7
- } from "@vscode/webview-ui-toolkit/react" ;
2
+ import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" ;
8
3
import "./App.css" ;
9
- // import "./codicon.css";
10
4
import { ChatMessage } from "./components/ChatMessage" ;
11
5
import { useState } from "react" ;
12
6
import { ChatHelloMessage } from "./components/ChatHelloMessage" ;
13
7
import { useMessageListener } from "./hooks/messageListener" ;
14
8
import { randomMessageId } from "./utilities/messageId" ;
15
9
import TextArea from "./components/TextArea" ;
16
- // import ProgressDivider from "./components/VsCodeDividerProgress";
17
10
18
11
export const App = ( ) => {
19
12
const [ input , setInput ] = useState ( "" ) ;
@@ -65,6 +58,10 @@ export const App = () => {
65
58
if ( isLoading ) {
66
59
return ;
67
60
}
61
+ if ( input === "" ) {
62
+ return ;
63
+ }
64
+
68
65
setChatHistory ( ( value ) => {
69
66
const messageId = randomMessageId ( ) ;
70
67
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ import { VSCodeDivider } from "@vscode/webview-ui-toolkit/react";
2
2
import Markdown from "react-markdown" ;
3
3
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter" ;
4
4
import { vscDarkPlus as vscodeHighlightStyle } from "react-syntax-highlighter/dist/esm/styles/prism" ;
5
- import "./Component .css" ;
5
+ import styles from "./styles.module .css" ;
6
6
7
7
export const ChatMessage = ( props : { role : string ; content : string } ) => {
8
8
const title = props . role === "ai" ? "FireCoder" : "You" ;
9
9
return (
10
10
< >
11
- < div className = "chat-message" >
11
+ < div className = { styles [ "chat-message" ] } >
12
12
< h4 > { title } </ h4 >
13
13
< Markdown
14
14
components = { {
File renamed without changes.
You can’t perform that action at this time.
0 commit comments