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