generalize for @andrew

This commit is contained in:
Mathew Pareles 2025-01-09 02:15:52 -08:00
parent 07d87c8bf0
commit e132c87792
2 changed files with 9 additions and 10 deletions

View file

@ -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} />}
</>
}

View file

@ -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)",