@synergenius/flow-weaver-pack-weaver 0.9.94 → 0.9.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1072,7 +1072,17 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
1072
1072
|
function extractInstruction(run) {
|
|
1073
1073
|
if (run.instruction) {
|
|
1074
1074
|
const text = run.instruction;
|
|
1075
|
-
|
|
1075
|
+
const titleMatch = text.match(/^##\s*Task:\s*(.+)/m);
|
|
1076
|
+
if (titleMatch) {
|
|
1077
|
+
const title = titleMatch[1].trim();
|
|
1078
|
+
return title.length > 120 ? title.slice(0, 117) + "..." : title;
|
|
1079
|
+
}
|
|
1080
|
+
if (text.startsWith("Task:")) {
|
|
1081
|
+
const title = text.split("|")[0].replace("Task:", "").trim();
|
|
1082
|
+
return title.length > 120 ? title.slice(0, 117) + "..." : title;
|
|
1083
|
+
}
|
|
1084
|
+
const firstLine = text.split("\n")[0].trim();
|
|
1085
|
+
return firstLine.length > 120 ? firstLine.slice(0, 117) + "..." : firstLine;
|
|
1076
1086
|
}
|
|
1077
1087
|
if (run.summary) {
|
|
1078
1088
|
const summary = run.summary;
|
|
@@ -1085,7 +1095,7 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
1085
1095
|
}
|
|
1086
1096
|
return summary.length > 120 ? summary.slice(0, 117) + "..." : summary;
|
|
1087
1097
|
}
|
|
1088
|
-
return "Bot run";
|
|
1098
|
+
return task?.title ?? "Bot run";
|
|
1089
1099
|
}
|
|
1090
1100
|
if (loading && !task) {
|
|
1091
1101
|
return React6.createElement(
|
|
@@ -567,7 +567,17 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
567
567
|
function extractInstruction(run) {
|
|
568
568
|
if (run.instruction) {
|
|
569
569
|
const text = run.instruction;
|
|
570
|
-
|
|
570
|
+
const titleMatch = text.match(/^##\s*Task:\s*(.+)/m);
|
|
571
|
+
if (titleMatch) {
|
|
572
|
+
const title = titleMatch[1].trim();
|
|
573
|
+
return title.length > 120 ? title.slice(0, 117) + "..." : title;
|
|
574
|
+
}
|
|
575
|
+
if (text.startsWith("Task:")) {
|
|
576
|
+
const title = text.split("|")[0].replace("Task:", "").trim();
|
|
577
|
+
return title.length > 120 ? title.slice(0, 117) + "..." : title;
|
|
578
|
+
}
|
|
579
|
+
const firstLine = text.split("\n")[0].trim();
|
|
580
|
+
return firstLine.length > 120 ? firstLine.slice(0, 117) + "..." : firstLine;
|
|
571
581
|
}
|
|
572
582
|
if (run.summary) {
|
|
573
583
|
const summary = run.summary;
|
|
@@ -580,7 +590,7 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
580
590
|
}
|
|
581
591
|
return summary.length > 120 ? summary.slice(0, 117) + "..." : summary;
|
|
582
592
|
}
|
|
583
|
-
return "Bot run";
|
|
593
|
+
return task?.title ?? "Bot run";
|
|
584
594
|
}
|
|
585
595
|
if (loading && !task) {
|
|
586
596
|
return React2.createElement(
|
package/package.json
CHANGED
|
@@ -418,10 +418,25 @@ function TaskDetailView({ taskId, onBack, onEdit }: TaskDetailViewProps) {
|
|
|
418
418
|
}, [history]);
|
|
419
419
|
|
|
420
420
|
// ── Extract instruction from run ──
|
|
421
|
+
// The run.instruction may be a raw markdown prompt ("## Task: Title\n\n...")
|
|
422
|
+
// or a plain string. Extract just the title for display.
|
|
421
423
|
function extractInstruction(run: HistoricalRun): string {
|
|
422
424
|
if (run.instruction) {
|
|
423
425
|
const text = run.instruction;
|
|
424
|
-
|
|
426
|
+
// Extract title from markdown prompt format: "## Task: Title\n\n..."
|
|
427
|
+
const titleMatch = text.match(/^##\s*Task:\s*(.+)/m);
|
|
428
|
+
if (titleMatch) {
|
|
429
|
+
const title = titleMatch[1].trim();
|
|
430
|
+
return title.length > 120 ? title.slice(0, 117) + '...' : title;
|
|
431
|
+
}
|
|
432
|
+
// Extract from "Task: Title | ..." pipe-separated summary
|
|
433
|
+
if (text.startsWith('Task:')) {
|
|
434
|
+
const title = text.split('|')[0].replace('Task:', '').trim();
|
|
435
|
+
return title.length > 120 ? title.slice(0, 117) + '...' : title;
|
|
436
|
+
}
|
|
437
|
+
// Plain instruction — use first line only
|
|
438
|
+
const firstLine = text.split('\n')[0].trim();
|
|
439
|
+
return firstLine.length > 120 ? firstLine.slice(0, 117) + '...' : firstLine;
|
|
425
440
|
}
|
|
426
441
|
if (run.summary) {
|
|
427
442
|
const summary = run.summary;
|
|
@@ -434,7 +449,8 @@ function TaskDetailView({ taskId, onBack, onEdit }: TaskDetailViewProps) {
|
|
|
434
449
|
}
|
|
435
450
|
return summary.length > 120 ? summary.slice(0, 117) + '...' : summary;
|
|
436
451
|
}
|
|
437
|
-
|
|
452
|
+
// Fall back to task title if available
|
|
453
|
+
return task?.title ?? 'Bot run';
|
|
438
454
|
}
|
|
439
455
|
|
|
440
456
|
// ── Loading state ──
|