Prompt to edit (#4830)
* initial plumbing for getting the new option into the cmd-bar * start of prompt edit * update AI poll * add spinner * more prompt engineering * add success toast, allowing user's to reject code * select code that changed in prompt to edit * selection in scene should not disappear when opening prompt cmd * tweak * fmt * add tests * some clean up * clean up * fix tests
This commit is contained in:
@ -76,6 +76,10 @@ export type ModelingCommandSchema = {
|
||||
'Text-to-CAD': {
|
||||
prompt: string
|
||||
}
|
||||
'Prompt-to-edit': {
|
||||
prompt: string
|
||||
selection: Selections
|
||||
}
|
||||
}
|
||||
|
||||
export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
|
||||
@ -479,4 +483,29 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
|
||||
},
|
||||
},
|
||||
},
|
||||
'Prompt-to-edit': {
|
||||
description: 'Use Zoo AI to edit your kcl',
|
||||
icon: 'chat',
|
||||
args: {
|
||||
selection: {
|
||||
inputType: 'selection',
|
||||
selectionTypes: [
|
||||
'solid2D',
|
||||
'segment',
|
||||
'sweepEdge',
|
||||
'cap',
|
||||
'wall',
|
||||
'edgeCut',
|
||||
'edgeCutEdge',
|
||||
],
|
||||
multiple: true,
|
||||
required: true,
|
||||
skip: true,
|
||||
},
|
||||
prompt: {
|
||||
inputType: 'text',
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user