Compare commits

...

1 Commits

Author SHA1 Message Date
71b7f27bce Revert "Revert "Remove Create with Text-to-CAD from toolbar, make commands in…"
This reverts commit 447069a97b.
2025-05-19 14:09:01 -04:00
16 changed files with 15 additions and 49 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -1,5 +1,4 @@
import type { EventFrom, StateFrom } from 'xstate' import type { EventFrom, StateFrom } from 'xstate'
import { settingsActor } from '@src/lib/singletons'
import type { CustomIconName } from '@src/components/CustomIcon' import type { CustomIconName } from '@src/components/CustomIcon'
import { createLiteral } from '@src/lang/create' import { createLiteral } from '@src/lang/create'
@ -35,6 +34,7 @@ export type ToolbarItem = {
id: string id: string
onClick: (props: ToolbarItemCallbackProps) => void onClick: (props: ToolbarItemCallbackProps) => void
icon?: CustomIconName icon?: CustomIconName
className?: string
iconColor?: string iconColor?: string
alwaysDark?: true alwaysDark?: true
status: 'available' | 'unavailable' | 'kcl-only' | 'experimental' status: 'available' | 'unavailable' | 'kcl-only' | 'experimental'
@ -425,54 +425,20 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
}, },
'break', 'break',
{ {
id: 'ai', id: 'prompt-to-edit',
array: [ onClick: () =>
{ commandBarActor.send({
id: 'text-to-cad', type: 'Find and select command',
onClick: () => { data: { name: 'Prompt-to-edit', groupId: 'modeling' },
const currentProject = }),
settingsActor.getSnapshot().context.currentProject icon: 'sparkles',
commandBarActor.send({ iconColor: '#29FFA4',
type: 'Find and select command', alwaysDark: true,
data: { status: IS_ML_EXPERIMENTAL ? 'experimental' : 'available',
name: 'Text-to-CAD', title: 'Text-to-CAD',
groupId: 'application', description:
argDefaultValues: { 'Edit or create geometry from a text prompt and selection.',
method: 'existingProject', links: [],
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: [],
},
],
}, },
], ],
}, },