mirror of
https://github.com/voideditor/void
synced 2026-05-23 09:28:23 +00:00
prepare large change
This commit is contained in:
parent
fec283a0f1
commit
991e6a9d5f
3 changed files with 26 additions and 13 deletions
|
|
@ -183,7 +183,7 @@ export const StatusIndicator = ({ indicatorColor, title, className, ...props }:
|
|||
{title && <span className='opacity-80'>{title}</span>}
|
||||
<div
|
||||
className={` size-1.5 rounded-full border
|
||||
${indicatorColor === 'dark' ? 'bg-void-bg-3 border-void-border-1' :
|
||||
${indicatorColor === 'dark' ? 'bg-[rgba(0,0,0,0)] border-void-border-1' :
|
||||
indicatorColor === 'orange' ? 'bg-orange-500 border-orange-500 shadow-[0_0_4px_0px_rgba(234,88,12,0.6)]' :
|
||||
indicatorColor === 'green' ? 'bg-green-500 border-green-500 shadow-[0_0_4px_0px_rgba(22,163,74,0.6)]' :
|
||||
indicatorColor === 'yellow' ? 'bg-yellow-500 border-yellow-500 shadow-[0_0_4px_0px_rgba(22,163,74,0.6)]' :
|
||||
|
|
|
|||
|
|
@ -653,15 +653,19 @@ export const SelectedFiles = (
|
|||
}
|
||||
|
||||
{type === 'staging' && !isThisSelectionProspective ? // X button
|
||||
<IconX
|
||||
className='cursor-pointer z-1 stroke-[2]'
|
||||
<div // box for making it easier to click
|
||||
className='cursor-pointer z-1 self-stretch flex items-center justify-center'
|
||||
onClick={(e) => {
|
||||
e.stopPropagation(); // don't open/close selection
|
||||
if (type !== 'staging') return;
|
||||
setSelections([...selections.slice(0, i), ...selections.slice(i + 1)])
|
||||
}}
|
||||
size={10}
|
||||
/>
|
||||
>
|
||||
<IconX
|
||||
className='stroke-[2]'
|
||||
size={10}
|
||||
/>
|
||||
</div>
|
||||
: <></>
|
||||
}
|
||||
</div>
|
||||
|
|
@ -2592,7 +2596,7 @@ const CommandBarInChat = () => {
|
|||
<div
|
||||
className={`
|
||||
select-none
|
||||
flex w-full rounded-t-lg bg-void-bg-1
|
||||
flex w-full rounded-t-lg bg-void-bg-3
|
||||
text-void-fg-3 text-xs text-nowrap
|
||||
|
||||
overflow-hidden transition-all duration-200 ease-in-out
|
||||
|
|
@ -2606,7 +2610,7 @@ const CommandBarInChat = () => {
|
|||
<div
|
||||
className={`
|
||||
select-none
|
||||
flex w-full rounded-t-lg bg-void-bg-1
|
||||
flex w-full rounded-t-lg bg-void-bg-3
|
||||
text-void-fg-3 text-xs text-nowrap
|
||||
border-t border-l border-r border-zinc-300/10
|
||||
|
||||
|
|
@ -2867,7 +2871,7 @@ export const SidebarChat = () => {
|
|||
<VoidInputBox2
|
||||
enableAtToMention
|
||||
className={`min-h-[81px] px-0.5 py-0.5`}
|
||||
placeholder={`@ to mention, ${keybindingString ? `${keybindingString} to add a file. ` : ''}Enter instructions...`}
|
||||
placeholder={`@ to mention, ${keybindingString ? `${keybindingString} to add a selection. ` : ''}Enter instructions...`}
|
||||
onChangeText={onChangeText}
|
||||
onKeyDown={onKeyDown}
|
||||
onFocus={() => { chatThreadsService.setCurrentlyFocusedMessageIdx(undefined) }}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { ProviderName, SettingName, displayInfoOfSettingName, providerNames, Voi
|
|||
import ErrorBoundary from '../sidebar-tsx/ErrorBoundary.js'
|
||||
import { VoidButtonBgDarken, VoidCustomDropdownBox, VoidInputBox2, VoidSimpleInputBox, VoidSwitch } from '../util/inputs.js'
|
||||
import { useAccessor, useIsDark, useRefreshModelListener, useRefreshModelState, useSettingsState } from '../util/services.js'
|
||||
import { X, RefreshCw, Loader2, Check, } from 'lucide-react'
|
||||
import { X, RefreshCw, Loader2, Check, Asterisk } from 'lucide-react'
|
||||
import { URI } from '../../../../../../../base/common/uri.js'
|
||||
import { env } from '../../../../../../../base/common/process.js'
|
||||
import { ModelDropdown } from './ModelDropdown.js'
|
||||
|
|
@ -147,7 +147,7 @@ const AddButton = ({ disabled, text = 'Add', ...props }: { disabled?: boolean, t
|
|||
|
||||
return <button
|
||||
disabled={disabled}
|
||||
className={`bg-[#0e70c0] px-3 py-1 text-white dark:text-black rounded-sm ${!disabled ? 'hover:bg-[#1177cb] cursor-pointer' : 'opacity-50 cursor-not-allowed bg-opacity-70'}`}
|
||||
className={`bg-[#0e70c0] px-3 py-1 text-white rounded-sm ${!disabled ? 'hover:bg-[#1177cb] cursor-pointer' : 'opacity-50 cursor-not-allowed bg-opacity-70'}`}
|
||||
{...props}
|
||||
>{text}</button>
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ export const AddModelInputBox = ({ providerName: permanentProviderName, classNam
|
|||
const numModels = providerName === null ? 0 : settingsState.settingsOfProvider[providerName].models.length
|
||||
|
||||
if (showCheckmark) {
|
||||
return <AnimatedCheckmarkButton text='Added' className={`bg-[#0e70c0] text-white dark:text-black px-3 py-1 rounded-sm ${className}`} />
|
||||
return <AnimatedCheckmarkButton text='Added' className={`bg-[#0e70c0] text-white px-3 py-1 rounded-sm ${className}`} />
|
||||
}
|
||||
|
||||
if (!isOpen) {
|
||||
|
|
@ -339,6 +339,13 @@ export const ModelDump = () => {
|
|||
: 'Disabled'
|
||||
)
|
||||
|
||||
|
||||
const detailAboutModel = type === 'autodetected' ?
|
||||
<Asterisk size={14} className="inline-block align-text-top brightness-115 stroke-[2] text-[#0e70c0]" data-tooltip-id='void-tooltip' data-tooltip-place='right' data-tooltip-content='Detected locally' />
|
||||
: type === 'default' ? undefined
|
||||
: <Asterisk size={14} className="inline-block align-text-top brightness-115 stroke-[2] text-[#0e70c0]" data-tooltip-id='void-tooltip' data-tooltip-place='right' data-tooltip-content='Custom model' />
|
||||
|
||||
|
||||
return <div key={`${modelName}${providerName}`}
|
||||
className={`flex items-center justify-between gap-4 hover:bg-black/10 dark:hover:bg-gray-300/10 py-1 px-3 rounded-sm overflow-hidden cursor-default truncate
|
||||
`}
|
||||
|
|
@ -346,7 +353,7 @@ export const ModelDump = () => {
|
|||
{/* left part is width:full */}
|
||||
<div className={`flex-grow flex items-center gap-4`}>
|
||||
<span className='w-full max-w-32'>{isNewProviderName ? providerTitle : ''}</span>
|
||||
<span className='w-fit truncate'>{modelName}</span>
|
||||
<span className='w-fit truncate'>{modelName}{detailAboutModel}</span>
|
||||
</div>
|
||||
{/* right part is anything that fits */}
|
||||
<div className='flex items-center gap-4'
|
||||
|
|
@ -356,7 +363,9 @@ export const ModelDump = () => {
|
|||
// : (isHidden ? `'${modelName}' won't appear in dropdowns` : ``)
|
||||
// }
|
||||
>
|
||||
<span className='opacity-50 truncate'>{type === 'autodetected' ? '(detected locally)' : type === 'default' ? '' : '(custom model)'}</span>
|
||||
|
||||
|
||||
{/* <span className='opacity-50 truncate'>{type === 'autodetected' ? '(detected locally)' : type === 'default' ? '' : '(custom model)'}</span> */}
|
||||
|
||||
<VoidSwitch
|
||||
value={value}
|
||||
|
|
|
|||
Loading…
Reference in a new issue