diff --git a/extensions/void/src/sidebar/MarkdownRender.tsx b/extensions/void/src/sidebar/MarkdownRender.tsx index fa59ca9a..e9cc2b96 100644 --- a/extensions/void/src/sidebar/MarkdownRender.tsx +++ b/extensions/void/src/sidebar/MarkdownRender.tsx @@ -7,10 +7,10 @@ import { awaitVSCodeResponse, getVSCodeAPI } from './getVscodeApi'; export const BlockCode = ({ text, disableApplyButton = false }: { text: string, disableApplyButton?: boolean }) => { return
{disableApplyButton ? null :
-
} -
+
 				{text}
 			
@@ -128,7 +128,7 @@ const Render = ({ token }: { token: Token }) => { // inline code if (t.type === "codespan") { - return {t.text}; + return {t.text}; } if (t.type === "br") { diff --git a/extensions/void/src/sidebar/Sidebar.tsx b/extensions/void/src/sidebar/Sidebar.tsx index 151f50cb..1d6889c5 100644 --- a/extensions/void/src/sidebar/Sidebar.tsx +++ b/extensions/void/src/sidebar/Sidebar.tsx @@ -58,61 +58,37 @@ ${instructions} If you make a change, rewrite the entire file. `; // TODO don't rewrite the whole file on prompt, instead rewrite it when click Apply -}; +} -const FilesSelector = ({ - files, - setFiles, -}: { - files: vscode.Uri[]; - setFiles: (files: vscode.Uri[]) => void; -}) => { - return ( - files.length !== 0 && ( -
- Include files: - {files.map((filename, i) => ( -
- {/* X button on a file */} - -
- ))} + +const FilesSelector = ({ files, setFiles }: { files: vscode.Uri[], setFiles: (files: vscode.Uri[]) => void }) => { + return files.length !== 0 &&
+ Include files: + {files.map((filename, i) => +
+ {/* X button on a file */} +
) ); }; const IncludedFiles = ({ files }: { files: vscode.Uri[] }) => { - return ( - files.length !== 0 && ( -
- {files.map((filename, i) => ( -
- -
- ))} + return files.length !== 0 &&
+ {files.map((filename, i) => +
+
) ); @@ -144,14 +120,9 @@ const ChatBubble = ({ chatMessage }: { chatMessage: ChatMessage }) => { chatbubbleContents = ; // sectionsHTML } - return ( -
-
- {chatbubbleContents} -
+ return
+
+ {chatbubbleContents}
); }; @@ -460,10 +431,46 @@ const Sidebar = () => { )}
- {/* Red overlay when isDisabled is true */} + {isDisabled && (
)} +
{ if (e.key === 'Enter' && !e.shiftKey) onSubmit(e) }} + + onSubmit={(e) => { + console.log('submit!') + e.preventDefault(); + onSubmit(e) + }}> + +