Revert "Remove Create with Text-to-CAD from toolbar, make commands in command palette more distinct" (#7068)
Revert "Remove Create with Text-to-CAD from toolbar, make commands in command…"
This reverts commit 5734cc7fc3.
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 64 KiB |
@ -1,4 +1,5 @@
|
||||
import type { EventFrom, StateFrom } from 'xstate'
|
||||
import { settingsActor } from '@src/lib/singletons'
|
||||
|
||||
import type { CustomIconName } from '@src/components/CustomIcon'
|
||||
import { createLiteral } from '@src/lang/create'
|
||||
@ -34,7 +35,6 @@ export type ToolbarItem = {
|
||||
id: string
|
||||
onClick: (props: ToolbarItemCallbackProps) => void
|
||||
icon?: CustomIconName
|
||||
className?: string
|
||||
iconColor?: string
|
||||
alwaysDark?: true
|
||||
status: 'available' | 'unavailable' | 'kcl-only' | 'experimental'
|
||||
@ -425,20 +425,54 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
|
||||
},
|
||||
'break',
|
||||
{
|
||||
id: 'prompt-to-edit',
|
||||
onClick: () =>
|
||||
commandBarActor.send({
|
||||
type: 'Find and select command',
|
||||
data: { name: 'Prompt-to-edit', groupId: 'modeling' },
|
||||
}),
|
||||
icon: 'sparkles',
|
||||
iconColor: '#29FFA4',
|
||||
alwaysDark: true,
|
||||
status: IS_ML_EXPERIMENTAL ? 'experimental' : 'available',
|
||||
title: 'Text-to-CAD',
|
||||
description:
|
||||
'Edit or create geometry from a text prompt and selection.',
|
||||
links: [],
|
||||
id: 'ai',
|
||||
array: [
|
||||
{
|
||||
id: 'text-to-cad',
|
||||
onClick: () => {
|
||||
const currentProject =
|
||||
settingsActor.getSnapshot().context.currentProject
|
||||
commandBarActor.send({
|
||||
type: 'Find and select command',
|
||||
data: {
|
||||
name: 'Text-to-CAD',
|
||||
groupId: 'application',
|
||||
argDefaultValues: {
|
||||
method: 'existingProject',
|
||||
projectName: currentProject?.name,
|
||||
},
|
||||
},
|
||||
})
|
||||
},
|
||||
icon: 'sparkles',
|
||||
iconColor: '#29FFA4',
|
||||
alwaysDark: true,
|
||||
status: IS_ML_EXPERIMENTAL ? 'experimental' : 'available',
|
||||
title: 'Create with Zoo Text-to-CAD',
|
||||
description: 'Create geometry with AI / ML.',
|
||||
links: [
|
||||
{
|
||||
label: 'API docs',
|
||||
url: 'https://zoo.dev/docs/api/ml/generate-a-cad-model-from-text',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'prompt-to-edit',
|
||||
onClick: () =>
|
||||
commandBarActor.send({
|
||||
type: 'Find and select command',
|
||||
data: { name: 'Prompt-to-edit', groupId: 'modeling' },
|
||||
}),
|
||||
icon: 'sparkles',
|
||||
iconColor: '#29FFA4',
|
||||
alwaysDark: true,
|
||||
status: IS_ML_EXPERIMENTAL ? 'experimental' : 'available',
|
||||
title: 'Modify with Zoo Text-to-CAD',
|
||||
description: 'Edit geometry with AI / ML.',
|
||||
links: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||