Make react build task; add react-textarea-autosize; add settings button; add settings page; get basic chat interface working

This commit is contained in:
Saoud Rizwan
2024-07-07 05:05:28 -04:00
parent b0f93bffe9
commit 08effc4799
10 changed files with 247 additions and 93 deletions

View File

@@ -1,8 +1,7 @@
import React from "react"
import React, { useState } from "react"
import logo from "./logo.svg"
import "./App.css"
import { vscode } from "./utilities/vscode"
import {
VSCodeBadge,
@@ -26,8 +25,12 @@ import {
VSCodeTextField,
} from "@vscode/webview-ui-toolkit/react"
import ChatSidebar from "./components/ChatSidebar"
import Demo from "./components/Demo"
import SettingsView from "./components/SettingsView"
const App: React.FC = () => {
const [showSettings, setShowSettings] = useState(true)
const handleHowdyClick = () => {
vscode.postMessage({
command: "hello",
@@ -35,12 +38,7 @@ const App: React.FC = () => {
})
}
return (
// REMOVE COLOR
<main style={{backgroundColor: '#232526'}}>
<ChatSidebar />
</main>
)
return <>{showSettings ? <SettingsView /> : <ChatSidebar />}</>
}
export default App