tasks: run straight from the menu when there is nothing to ask
a task that takes real options — which audio tracks to keep, what format to convert to — has to ask, and the runner modal is for that. a task that is one command over the clicked file has nothing to ask, and putting a form in front of it with one pre-filled field and a Run button is a click that decides nothing. derived, not declared. the rule is whether anything is left over once the file browser has filled in what it knows, which is two things and only two: file_path by name, and any input declaring autofill entry_name / entry_path. a default does NOT count — a default is a suggestion and the user has to see it to change it. agentic, pipeline, inline true and inline 'ask' always take the modal; the last because the choice is itself the question, and the one before it because the modal is where an ephemeral run's output goes. and the reason the transcribe task's one field came up EMPTY: inputs is a list in TASK.md and a map everywhere else. the app's own task-creation guide teaches the list form, so that is what gets written; every consumer reads the map. a list arrived at the form as Object.entries(array), key "0" — so the input rendered nameless, was never matched against what the browser auto-fills, and would have run with nothing in it. normalised in parseTaskMd, which fixes the form, the INPUT_<NAME> env vars and the positional args together. the map form still passes through. GET /tasks now carries inline and inputs so the menu can decide without a second request. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
This commit is contained in:
@@ -16,6 +16,8 @@ tasksRouter.get('/', async (ctx) => {
|
||||
triggers: (row.trigger as TriggerConfig[]) ?? [],
|
||||
mode: row.mode ?? 'agentic',
|
||||
plugin: row.plugin,
|
||||
inline: row.inline,
|
||||
inputs: row.inputs,
|
||||
}));
|
||||
|
||||
return ctx.json(tasks);
|
||||
|
||||
Reference in New Issue
Block a user