I am using a toggle to run a prompt up a specific point:
// ui
previewCrop: form.bool({}),
// run
if (form.previewCrop) {
graph.PreviewImage({ images: cropped_image });
await runtime.PROMPT();
return;
}
This pattern works well, but it requires managing the toggles to ensure only one preview is enabled (or the one you want).
An InlineRun button would have this behavior:
Set the form value to true (it would have a boolean value type)
Run the prompt (same as the main run button)
Reset the form value back to false
i.e. It would be true only when the button is hit
I would gladly give a try at implementing this if you accept PRs, I'll have to dig around in the code a bit to figure it out.
Let me know if the code architecture would allow for this type of control (that can change the form state, run a prompt, and then change it back) or if it would require major code changes.
I am using a toggle to run a prompt up a specific point:
This pattern works well, but it requires managing the toggles to ensure only one preview is enabled (or the one you want).
An InlineRun button would have this behavior:
i.e. It would be true only when the button is hit
I would gladly give a try at implementing this if you accept PRs, I'll have to dig around in the code a bit to figure it out.
Let me know if the code architecture would allow for this type of control (that can change the form state, run a prompt, and then change it back) or if it would require major code changes.