statelyai / xstate-tools

Public monorepo for XState tooling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to create a new machine

gkiely opened this issue · comments

It would be great if it were possible to create a new state chart using the VSCode extension, just like in the stately editor.

Current:
Xstate > Open Visual Editor in a blank file shows an error "Could not find a machine at the current cursor error".

Expected:
Ability to create a new machine in the visual editor.

Ideally via a separate command, and/or the visual editor shows a button to create a new state machine.

Yeah, that makes sense and I was actually thinking about something similar recently. I was thinking about a command though and it seems that perhaps you'd like to have a button in the visual editor.

Command works fine for me.

You can also use the xsm snippet to easily create new machines in the code, although I agree, having a dedicated command would be a good experience.