web: run pipelines from the browser and quiet background chat
Add the Run pipeline dialog with prompt, server directory and a per-run notification choice; add --notify auto/on/off to run and retry; move the live tool call onto the tool-count line and tick the reasoning duration; stop chat frames from repainting a different screen.
This commit is contained in:
@@ -181,6 +181,29 @@ export class PipelinesRepository {
|
||||
}
|
||||
|
||||
/** Cancels a run; mirrors PipelinesRepository.cancelRun (exactly run_id). */
|
||||
/**
|
||||
* Starts a fresh run of one pipeline version. `notifyMode` is auto, on or off;
|
||||
* auto omits the field so the pipeline definition applies.
|
||||
*/
|
||||
async runPipeline({ pipelineId, version, prompt, workspace, notifyMode = "auto", title = "" } = {}) {
|
||||
const request = {
|
||||
type: Protocol.RUN_PIPELINE,
|
||||
pipeline_id: Number(pipelineId),
|
||||
version: Number(version),
|
||||
request_key: newChatOperationId(),
|
||||
workspace: String(workspace ?? "").trim(),
|
||||
input: { prompt: String(prompt ?? "") },
|
||||
};
|
||||
if (String(title ?? "").trim() !== "") request.title = String(title).trim();
|
||||
const mode = String(notifyMode ?? "auto").trim().toLowerCase();
|
||||
if (mode === "on" || mode === "off") request.notify_mode = mode;
|
||||
const response = await this.#client.call(request);
|
||||
if (!response.run_detail) {
|
||||
throw new ProtocolError("The server returned no run detail.");
|
||||
}
|
||||
return response.run_detail;
|
||||
}
|
||||
|
||||
async cancelRun(id) {
|
||||
const response = await this.#client.call({ type: Protocol.CANCEL_RUN, run_id: id });
|
||||
if (!response.run_detail) {
|
||||
|
||||
Reference in New Issue
Block a user