mirror of
https://github.com/open-gitagent/langship.sh.git
synced 2026-08-03 07:21:04 +02:00
feat: enhance agent execution flow with multi-execution view and improved error handling
- Added multi-execution view to display multiple execution statuses. - Improved error handling in agent triggering to surface failures. - Updated execution view to support live updates via SSE and added a log panel for node logs. - Enhanced pipeline canvas to display node statuses during execution. - Introduced new fields in the build node form for Docker configurations. - Updated API to support execution streaming and enhanced node catalog descriptions.
This commit is contained in:
@@ -106,13 +106,25 @@ function AgentDetail() {
|
||||
async function onTrigger() {
|
||||
await withBusy("trigger", async () => {
|
||||
const res = await api.triggerAgent(id);
|
||||
if (res.executionIds?.length) {
|
||||
router.push(
|
||||
`/executions/view/?id=${encodeURIComponent(res.executionIds[0])}`
|
||||
);
|
||||
} else {
|
||||
await load();
|
||||
const ids = res.executionIds ?? [];
|
||||
if (ids.length === 1) {
|
||||
router.push(`/executions/view/?id=${encodeURIComponent(ids[0])}`);
|
||||
return;
|
||||
}
|
||||
if (ids.length > 1) {
|
||||
router.push(`/executions/multi/?ids=${ids.map(encodeURIComponent).join(",")}`);
|
||||
return;
|
||||
}
|
||||
// Nothing dispatched — surface failures so the user sees why.
|
||||
const fails = res.failures ?? [];
|
||||
if (fails.length === 0) {
|
||||
throw new Error("trigger returned no executions and no failure detail");
|
||||
}
|
||||
throw new Error(
|
||||
fails
|
||||
.map((f) => `${f.pipelineId}: ${f.reason}${f.error ? " — " + f.error : ""}`)
|
||||
.join("; ")
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -241,6 +253,15 @@ function AgentDetail() {
|
||||
!config?.orchestratorEnabled ||
|
||||
!agent.attachedPipelines?.length
|
||||
}
|
||||
title={
|
||||
!config?.orchestratorEnabled
|
||||
? "Orchestrator not configured (Restate unreachable)"
|
||||
: !agent.attachedPipelines?.length
|
||||
? "Attach a pipeline first"
|
||||
: busy === "trigger"
|
||||
? "Dispatching…"
|
||||
: "Trigger a run on every attached pipeline"
|
||||
}
|
||||
>
|
||||
<Play />
|
||||
{busy === "trigger" ? "Triggering…" : "Trigger run"}
|
||||
|
||||
Reference in New Issue
Block a user