Remove the warningMessage field for command args (#7005)

This commit is contained in:
Pierre Jacquier
2025-05-16 11:41:33 -04:00
committed by GitHub
parent 47b159c605
commit 49d4f8e5c3
6 changed files with 0 additions and 20 deletions

View File

@ -159,11 +159,6 @@ function CommandBarSelectionInput({
: `Please select ${
arg.multiple ? 'one or more ' : 'one '
}${getSemanticSelectionType(arg.selectionTypes).join(' or ')}`}
{arg.warningMessage && (
<p className="text-warn-80 bg-warn-10 px-2 py-1 rounded-sm mt-3 mr-2 -mb-2 w-full text-sm cursor-default">
{arg.warningMessage}
</p>
)}
<span data-testid="cmd-bar-arg-name" className="sr-only">
{arg.name}
</span>

View File

@ -133,11 +133,6 @@ export default function CommandBarSelectionMixedInput({
Continue without selection
</button>
)}
{arg.warningMessage && (
<p className="text-warn-80 bg-warn-10 px-2 py-1 rounded-sm mt-3 mr-2 -mb-2 w-full text-sm cursor-default">
{arg.warningMessage}
</p>
)}
<span data-testid="cmd-bar-arg-name" className="sr-only">
{arg.name}
</span>

View File

@ -91,11 +91,6 @@ function CommandBarTextareaInput({
autoFocus
/>
</label>
{arg.warningMessage && (
<p className="text-warn-80 bg-warn-10 px-2 py-1 rounded-sm mt-3 mr-2 -mb-2 w-full text-sm cursor-default">
{arg.warningMessage}
</p>
)}
</form>
)
}

View File

@ -22,7 +22,6 @@ import {
KCL_DEFAULT_DEGREE,
KCL_DEFAULT_LENGTH,
KCL_DEFAULT_TRANSFORM,
ML_EXPERIMENTAL_MESSAGE,
} from '@src/lib/constants'
import type { components } from '@src/lib/machine-api'
import type { Selections } from '@src/lib/selections'
@ -962,7 +961,6 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
allowCodeSelection: true,
},
skip: false,
warningMessage: ML_EXPERIMENTAL_MESSAGE,
},
prompt: {
inputType: 'text',

View File

@ -138,7 +138,6 @@ export type CommandArgumentConfig<
commandBarContext: { argumentsToSubmit: Record<string, unknown> }, // Should be the commandbarMachine's context, but it creates a circular dependency
machineContext?: C
) => boolean)
warningMessage?: string
/** If `true`, arg is used as passed-through data, never for user input */
hidden?:
| boolean
@ -280,7 +279,6 @@ export type CommandArgument<
) => boolean)
skip?: boolean
machineActor?: Actor<T>
warningMessage?: string
/** For showing a summary display of the current value, such as in
* the command bar's header
*/

View File

@ -175,7 +175,6 @@ export function buildCommandArgument<
skip: arg.skip,
machineActor,
valueSummary: arg.valueSummary,
warningMessage: arg.warningMessage ?? '',
} satisfies Omit<CommandArgument<O, T>, 'inputType'>
if (arg.inputType === 'options') {