mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
generalize for @andrew
This commit is contained in:
parent
07d87c8bf0
commit
e132c87792
2 changed files with 9 additions and 10 deletions
|
|
@ -90,7 +90,7 @@ const MemoizedModelSelectBox = ({ featureName }: { featureName: FeatureName }) =
|
|||
|
||||
}
|
||||
|
||||
const DummySelectBox = () => {
|
||||
const WarningBox = ({ text, className }: { text: string, className?: string }) => {
|
||||
|
||||
const accessor = useAccessor()
|
||||
const commandService = accessor.get('ICommandService')
|
||||
|
|
@ -101,22 +101,21 @@ const DummySelectBox = () => {
|
|||
|
||||
return <div
|
||||
className={`
|
||||
flex items-center
|
||||
flex-nowrap text-ellipsis
|
||||
|
||||
text-void-warning brightness-90 opacity-90
|
||||
|
||||
hover:brightness-75 transition-all duration-200
|
||||
text-xs text-ellipsis
|
||||
cursor-pointer
|
||||
text-xs
|
||||
|
||||
flex items-center flex-nowrap
|
||||
${className}
|
||||
`}
|
||||
onClick={openSettings}
|
||||
>
|
||||
<IconWarning
|
||||
size={14}
|
||||
className='mr-1 brightness-90'
|
||||
className='mr-1'
|
||||
/>
|
||||
<span>Provider required</span>
|
||||
<span>{text}</span>
|
||||
</div>
|
||||
// return <VoidSelectBox
|
||||
// options={[{ text: 'Please add a model!', value: null }]}
|
||||
|
|
@ -127,6 +126,6 @@ const DummySelectBox = () => {
|
|||
export const ModelDropdown = ({ featureName }: { featureName: FeatureName }) => {
|
||||
const settingsState = useSettingsState()
|
||||
return <>
|
||||
{settingsState._modelOptions.length === 0 ? <DummySelectBox /> : <MemoizedModelSelectBox featureName={featureName} />}
|
||||
{settingsState._modelOptions.length === 0 ? <WarningBox text='Provider required' /> : <MemoizedModelSelectBox featureName={featureName} />}
|
||||
</>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ module.exports = {
|
|||
"void-fg-1": "var(--vscode-editor-foreground)",
|
||||
"void-fg-2": "var(--vscode-input-foreground)",
|
||||
"void-fg-3": "var(--vscode-input-placeholderForeground)",
|
||||
"void-warning": "var(--vscode-charts-orange)",
|
||||
"void-warning": "var(--vscode-charts-yellow)",
|
||||
|
||||
"void-border-1": "var(--vscode-commandCenter-activeBorder)",
|
||||
"void-border-2": "var(--vscode-commandCenter-border)",
|
||||
|
|
|
|||
Loading…
Reference in a new issue