Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix(auto-harness): extend pipeline progress percentage calc fix

ray_lec8146ad1498f
diff --git a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness.ts b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness.ts
index 143f651c71..242400a379 100644
--- a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness.ts
+++ b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness.ts
@@ -1269,7 +1269,9 @@ function formatLogSection(section: ParsedLogSection, detailed: boolean = false):
const activeStage = section.status !== 'success' && section.status !== 'failed' ? section.stage : undefined;
const effectiveCompleted = [...(section.completed_stages || [])];
if (section.status === 'success' && section.stage && !effectiveCompleted.includes(section.stage)) {
- effectiveCompleted.push(section.stage);
+ if (section.pipeline !== 'extended_evolve_pipeline' || section.stage !== 'build_verify') {
+ effectiveCompleted.push(section.stage);
+ }
}
const progressBar = formatStageProgress(section.stages, effectiveCompleted, activeStage, section.gap_count, section.extension_order?.length);
const icon = section.status === "success" ? "✅" : section.status === "failed" ? "❌" : "⏸️";
@@ -1523,6 +1525,7 @@ function parseAndAggregateLogs(
content: content,
stage: stage,
stages: pipelineInfo?.stages,
+ pipeline: pipelineInfo?.pipeline,
completed_stages: [...completedStages],
});
break;
@@ -1622,6 +1625,7 @@ function parseAndAggregateLogs(
stage: log.stage || log.parent_stage || currentStage || "",
status: extStatus,
stages: pipelineInfo?.stages,
+ pipeline: pipelineInfo?.pipeline,
completed_stages: [...completedStages],
extension_order: [...extensionOrder],
extensions_by_name: extensionsSnapshot,
@@ -1631,7 +1635,12 @@ function parseAndAggregateLogs(
}
if (log.stage && !scope && (log.status === 'success' || log.status === 'failed') && !completedStages.includes(log.stage)) {
- completedStages.push(log.stage);
+ // extended_evolve_pipeline: build_verify 不在此处计入完成,等 activate 出现后再计入
+ if (pipelineInfo?.pipeline === 'extended_evolve_pipeline' && log.stage === 'build_verify') {
+ // 跳过,不加入 completedStages
+ } else {
+ completedStages.push(log.stage);
+ }
if (log.status === 'failed') hasFailure = true;
// Track stages that have explicitly reported success (scope="", status="success")
if (log.status === 'success') {
@@ -1647,6 +1656,13 @@ function parseAndAggregateLogs(
currentStage = log.stage;
}
+ // extended_evolve_pipeline: 当 activate 出现时,将 build_verify 计入完成
+ if (pipelineInfo?.pipeline === 'extended_evolve_pipeline' && log.stage === 'activate' && !scope) {
+ if (!completedStages.includes('build_verify') && stagesWithSuccessResult.has('build_verify')) {
+ completedStages.push('build_verify');
+ }
+ }
+
// For activate stage: skip "running" status (merge/interaction sub-events handle display)
// Only show the final "success" completion
if (log.stage === 'activate' && log.status === 'running' && !scope) {
@@ -1701,6 +1717,7 @@ function parseAndAggregateLogs(
stage: log.stage,
status: log.status,
stages: pipelineInfo?.stages,
+ pipeline: pipelineInfo?.pipeline,
completed_stages: [...completedStages],
// Include extension info for display (snapshot at this point)
extension_order: [...extensionOrder],
diff --git a/jiuwenswarm/channels/tui/frontend/src/ui/screen-layout.ts b/jiuwenswarm/channels/tui/frontend/src/ui/screen-layout.ts
index e25a888174..5732f37357 100644
--- a/jiuwenswarm/channels/tui/frontend/src/ui/screen-layout.ts
+++ b/jiuwenswarm/channels/tui/frontend/src/ui/screen-layout.ts
@@ -121,7 +121,7 @@ function buildStatusLines(
isTeamWorking(snapshot.teamMemberEvents, snapshot.teamMessageEvents);
const right = snapshot.lastError
- ? `error:${snapshot.lastError}`
+ ? `error:${snapshot.lastError.split('\n')[0].slice(0, 50)}`
: snapshot.isInterrupted
? renderInterruptedStatus()
: snapshot.isPaused