File tree Expand file tree Collapse file tree 9 files changed +12
-39
lines changed
Expand file tree Collapse file tree 9 files changed +12
-39
lines changed Original file line number Diff line number Diff line change 22< html lang ="en ">
33 < head >
44 < meta charset ="utf-8 " />
5- < link rel ="icon " href ="%PUBLIC_URL%/favicon.ico " />
65 < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
76 < 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 " />
138 < link rel ="manifest " href ="%PUBLIC_URL%/manifest.json " />
14- < title > Hello World </ title >
9+ < title > FireCoder </ title >
1510 </ head >
1611 < body >
1712 < noscript > You need to enable JavaScript to run this app.</ noscript >
Original file line number Diff line number Diff line change 11{
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" ,
214 "start_url" : " ." ,
225 "display" : " standalone" ,
236 "theme_color" : " #000000" ,
247 "background_color" : " #ffffff"
25- }
8+ }
Original file line number Diff line number Diff line change @@ -15,11 +15,9 @@ body {
1515 overflow : auto;
1616 display : flex;
1717 flex-direction : column;
18- /* max-height: 92vh; */
1918}
2019
2120.chat-input-block {
22- /* min-height: 8vh; */
2321 display : flex;
2422 flex-direction : row;
2523 width : calc (100% - 40px );
Original file line number Diff line number Diff line change 11import { 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" ;
83import "./App.css" ;
9- // import "./codicon.css";
104import { ChatMessage } from "./components/ChatMessage" ;
115import { useState } from "react" ;
126import { ChatHelloMessage } from "./components/ChatHelloMessage" ;
137import { useMessageListener } from "./hooks/messageListener" ;
148import { randomMessageId } from "./utilities/messageId" ;
159import TextArea from "./components/TextArea" ;
16- // import ProgressDivider from "./components/VsCodeDividerProgress";
1710
1811export const App = ( ) => {
1912 const [ input , setInput ] = useState ( "" ) ;
@@ -65,6 +58,10 @@ export const App = () => {
6558 if ( isLoading ) {
6659 return ;
6760 }
61+ if ( input === "" ) {
62+ return ;
63+ }
64+
6865 setChatHistory ( ( value ) => {
6966 const messageId = randomMessageId ( ) ;
7067
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ import { VSCodeDivider } from "@vscode/webview-ui-toolkit/react";
22import Markdown from "react-markdown" ;
33import { Prism as SyntaxHighlighter } from "react-syntax-highlighter" ;
44import { vscDarkPlus as vscodeHighlightStyle } from "react-syntax-highlighter/dist/esm/styles/prism" ;
5- import "./Component .css" ;
5+ import styles from "./styles.module .css" ;
66
77export const ChatMessage = ( props : { role : string ; content : string } ) => {
88 const title = props . role === "ai" ? "FireCoder" : "You" ;
99 return (
1010 < >
11- < div className = "chat-message" >
11+ < div className = { styles [ "chat-message" ] } >
1212 < h4 > { title } </ h4 >
1313 < Markdown
1414 components = { {
File renamed without changes.
You can’t perform that action at this time.
0 commit comments