Fix broken rename and delete project commands

Something about the `optionsFromContext` config no longer works with file I/O-related commands. I suspect this has to do with our read/write loop patching
This commit is contained in:
Frank Noirot
2025-01-13 10:34:38 -05:00
parent 82aefec34d
commit b30a37a0b3

View File

@ -73,12 +73,11 @@ export const projectsCommandBarConfig: StateMachineCommandSetConfig<
name: { name: {
inputType: 'options', inputType: 'options',
required: true, required: true,
options: [], options: (_, context) =>
optionsFromContext: (context) => context?.projects.map((p) => ({
context.projects.map((p) => ({
name: p.name!, name: p.name!,
value: p.name!, value: p.name!,
})), })) || [],
}, },
}, },
}, },
@ -90,12 +89,11 @@ export const projectsCommandBarConfig: StateMachineCommandSetConfig<
oldName: { oldName: {
inputType: 'options', inputType: 'options',
required: true, required: true,
options: [], options: (_, context) =>
optionsFromContext: (context) => context?.projects.map((p) => ({
context.projects.map((p) => ({
name: p.name!, name: p.name!,
value: p.name!, value: p.name!,
})), })) || [],
}, },
newName: { newName: {
inputType: 'string', inputType: 'string',