diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index b45c0e2f..e032fb24 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -32,7 +32,7 @@ const IconX = ({ size, className = '' }: { size: number, className?: string }) = height={size} viewBox='0 0 24 24' fill='none' - stroke='currentColor' + stroke='black' className={className} > +
{selections.map((selection, i) => ( - {/* selection summary */} + {/* selected file summary */}
{ + setSelectionIsOpened(s => { + const newS = [...s] + newS[i] = !newS[i] + return newS + }); + }} > -
{ - setSelectionIsOpened(s => { - const newS = [...s] - newS[i] = !newS[i] - return newS - }); - }} - > - {/* file name */} - {getBasename(selection.fileURI.fsPath)} + {/* file name */} + {getBasename(selection.fileURI.fsPath)} - {/* type of selection */} - {selection.selectionStr ? 'Selection' : 'File'} + {/* type of selection */} + {selection.selectionStr ? 'Selection' : 'File'} -
{/* X button */} {type === 'staging' && // hoveredIdx === i - { if (type !== 'staging') return; setStaging([...selections.slice(0, i), ...selections.slice(i + 1)]) }} > - + }
@@ -167,7 +168,8 @@ export const SelectedFiles = ( /> }
- ))} + )) + }
) ) @@ -361,71 +363,78 @@ export const SidebarChat = () => { - {/* user input box */} -
-
-
-
- {/* selections */} - {(selections && selections.length !== 0) && -
- -
- } + {/* input box */} +
{ if (e.key === 'Enter' && !e.shiftKey) onSubmit(e) }} - {/* error message */} - {latestError === null ? null : - { setLatestError(null) }} - /> - } + onSubmit={(e) => { + console.log('submit!') + onSubmit(e) + }} + > + {/* top row */} +
+ {/* selections */} + {(selections && selections.length !== 0) && + + } - { if (e.key === 'Enter' && !e.shiftKey) onSubmit(e) }} - - onSubmit={(e) => { - console.log('submit!') - onSubmit(e) - }} - > - - {/* text input */} - - - {/* submit/stop button */} - {isLoading ? - // stop button - - : - // submit button (up arrow) - - } - -
-
+ {/* error message */} + {latestError === null ? null : + { setLatestError(null) }} + /> + }
-
+ + {/* middle row */} +
+ {/* text input */} + +
+ + {/* bottom row */} +
+ {/* submit / stop button */} + {isLoading ? + // stop button + + : + // submit button (up arrow) + + } +
+ + + + + + } diff --git a/src/vs/workbench/contrib/void/browser/react/tailwind.config.js b/src/vs/workbench/contrib/void/browser/react/tailwind.config.js index 40e1fa7a..dc89eee1 100644 --- a/src/vs/workbench/contrib/void/browser/react/tailwind.config.js +++ b/src/vs/workbench/contrib/void/browser/react/tailwind.config.js @@ -11,22 +11,98 @@ module.exports = { // inject user's vscode theme colors: https://code.visualstudio.com/api/extension-guides/webview#theming-webview-content colors: { vscode: { - "sidebar-bg": "var(--vscode-sideBar-background)", - "editor-bg": "var(--vscode-editor-background)", - "editor-fg": "var(--vscode-editor-foreground)", + + // base colors + "fg": "var(--vscode-foreground)", + "focus-border": "var(--vscode-focusBorder)", + "disabled-fg": "var(--vscode-disabledForeground)", + "widget-border": "var(--vscode-widget-border)", + "widget-shadow": "var(--vscode-widget-shadow)", + "selection-bg": "var(--vscode-selection-background)", + "description-fg": "var(--vscode-descriptionForeground)", + "error-fg": "var(--vscode-errorForeground)", + "icon-fg": "var(--vscode-icon-foreground)", + "sash-hover-border": "var(--vscode-sash-hoverBorder)", + + // text colors + "text-blockquote-bg": "var(--vscode-textBlockQuote-background)", + "text-blockquote-border": "var(--vscode-textBlockQuote-border)", + "text-codeblock-bg": "var(--vscode-textCodeBlock-background)", + "text-link-active-fg": "var(--vscode-textLink-activeForeground)", + "text-link-fg": "var(--vscode-textLink-foreground)", + "text-preformat-fg": "var(--vscode-textPreformat-foreground)", + "text-preformat-bg": "var(--vscode-textPreformat-background)", + "text-separator-fg": "var(--vscode-textSeparator-foreground)", + + // input colors "input-bg": "var(--vscode-input-background)", - "input-fg": "var(--vscode-input-foreground)", "input-border": "var(--vscode-input-border)", - "button-fg": "var(--vscode-button-foreground)", + "input-fg": "var(--vscode-input-foreground)", + "input-placeholder-fg": "input-var(--vscode-placeholderForeground)", + "input-active-bg": "inputOption-var(--vscode-activeBackground)", + "input-option-active-border": "inputOption-var(--vscode-activeBorder)", + "input-option-active-fg": "inputOption-var(--vscode-activeForeground)", + "input-option-hover-bg": "inputOption-var(--vscode-hoverBackground)", + "input-validation-error-bg": "inputValidation-var(--vscode-errorBackground)", + "input-validation-error-fg": "inputValidation-var(--vscode-errorForeground)", + "input-validation-error-border": "inputValidation-var(--vscode-errorBorder)", + "input-validation-info-bg": "inputValidation-var(--vscode-infoBackground)", + "input-validation-info-fg": "inputValidation-var(--vscode-infoForeground)", + "input-validation-info-border": "inputValidation-var(--vscode-infoBorder)", + "input-validation-warning-bg": "inputValidation-var(--vscode-warningBackground)", + "input-validation-warning-fg": "inputValidation-var(--vscode-warningForeground)", + "input-validation-warning-border": "inputValidation-var(--vscode-warningBorder)", + + // badge colors + "badge-fg": "var(--vscode-badge-foreground)", + "badge-bg": "var(--vscode-badge-background)", + + // button colors "button-bg": "var(--vscode-button-background)", - "button-hoverBg": "var(--vscode-button-hoverBackground)", + "button-fg": "var(--vscode-button-foreground)", + "button-border": "var(--vscode-button-border)", + "button-separator": "var(--vscode-button-separator)", + "button-hover-bg": "var(--vscode-button-hoverBackground)", "button-secondary-fg": "var(--vscode-button-secondaryForeground)", "button-secondary-bg": "var(--vscode-button-secondaryBackground)", - "button-secondary-hoverBg": "var(--vscode-button-secondaryHoverBackground)", - "dropdown-bg": "var(--vscode-settings-dropdownBackground)", - "dropdown-foreground": "var(--vscode-settings-dropdownForeground)", - "dropdown-border": "var(--vscode-settings-dropdownBorder)", - "focus-border": "var(--vscode-focusBorder)", + "button-secondary-hover-bg": "var(--vscode-button-secondaryHoverBackground)", + + // checkbox colors + "checkbox-bg": "var(--vscode-checkbox-background)", + "checkbox-fg": "var(--vscode-checkbox-foreground)", + "checkbox-border": "var(--vscode-checkbox-border)", + "checkbox-select-bg": "var(--vscode-checkbox-selectBackground)", + + + // sidebar colors + "sidebar-bg": "var(--vscode-sideBar-background)", + "sidebar-fg": "var(--vscode-sideBar-foreground)", + "sidebar-border": "var(--vscode-sideBar-border)", + "sidebar-drop-backdrop": "var(--vscode-sideBar-dropBackground)", + "sidebar-title-fg": "var(--vscode-sideBarTitle-foreground)", + "sidebar-header-bg": "var(--vscode-sideBarSectionHeader-background)", + "sidebar-header-fg": "var(--vscode-sideBarSectionHeader-foreground)", + "sidebar-header-border": "var(--vscode-sideBarSectionHeader-border)", + "sidebar-activitybartop-border": "var(--vscode-sideBarActivityBarTop-border)", + "sidebar-title-bg": "var(--vscode-sideBarTitle-background)", + "sidebar-title-border": "var(--vscode-sideBarTitle-border)", + "sidebar-stickyscroll-bg": "var(--vscode-sideBarStickyScroll-background)", + "sidebar-stickyscroll-border": "var(--vscode-sideBarStickyScroll-border)", + "sidebar-stickyscroll-shadow": "var(--vscode-sideBarStickyScroll-shadow)", + + + // other colors (these are partially complete) + + // editor colors + "editor-bg": "var(--vscode-editor-background)", + "editor-fg": "var(--vscode-editor-foreground)", + + // editorWidget colors + "editor-widget-fg": "var(--vscode-editorWidget-foreground)", + "editor-widget-bg": "var(--vscode-editorWidget-background)", + "editor-widget-border": "var(--vscode-editorWidget-border)", + + }, }, },