@agimon-ai/po-workflow 0.0.0-alpha.222 → 0.0.0-alpha.224
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.
- package/dist/extensions/native.mjs +426 -196
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/po-runtime-identity.json +1 -1
- package/package.json +17 -11
|
@@ -2,7 +2,7 @@ import { createApiClient, defineActivityGroup, defineChannelFile, defineDockFace
|
|
|
2
2
|
import { View } from "react-native-unistyles/components/native/View";
|
|
3
3
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
4
4
|
import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
|
|
5
|
-
import { ArrowRightIcon, Badge, Button, ChevronDownIcon, ChevronRightIcon, CodeBlock, Dot, EmptyState, FileIcon, FolderIcon, Input, Label, ListRow, LiveDuration, LoadingState, Markdown, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, SearchIcon, SegmentedControl, Select, Sheet, SheetBody, SheetContent, SheetHeader, SheetList, SheetTitle, StatusBadge, Switch, Textarea, WorkflowIcon, fontOf, toolTone } from "@agimon-ai/po-native-components";
|
|
5
|
+
import { ArrowRightIcon, Badge, Button, ChevronDownIcon, ChevronRightIcon, CodeBlock, Dot, EmptyState, FileIcon, FolderIcon, Input, Label, ListRow, LiveDuration, LoadingState, Markdown, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, SearchIcon, SegmentedControl, Select, Sheet, SheetBody, SheetContent, SheetHeader, SheetList, SheetTitle, Spinner, StatusBadge, Switch, Textarea, WorkflowIcon, fontOf, toolTone } from "@agimon-ai/po-native-components";
|
|
6
6
|
import { createElement, memo, useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
7
7
|
import { StyleSheet } from "react-native-unistyles";
|
|
8
8
|
import { Pressable } from "react-native-unistyles/components/native/Pressable";
|
|
@@ -1338,10 +1338,10 @@ function WorkflowDuration({ startedAt, endedAt, now, seconds = false, running =
|
|
|
1338
1338
|
function DynamicWorkflowActivity({ runs, connected = true, onOpen }) {
|
|
1339
1339
|
const t = useT();
|
|
1340
1340
|
return /* @__PURE__ */ jsxs(View, {
|
|
1341
|
-
style: styles$
|
|
1341
|
+
style: styles$10.run,
|
|
1342
1342
|
children: [
|
|
1343
1343
|
/* @__PURE__ */ jsx(Text, {
|
|
1344
|
-
style: styles$
|
|
1344
|
+
style: styles$10.dim,
|
|
1345
1345
|
children: connected ? activitySummary(runs, t) : t("workflow.extra.connectionPausedShowingLastUpdate", "Connection paused. Showing last update.")
|
|
1346
1346
|
}),
|
|
1347
1347
|
!runs.length && /* @__PURE__ */ jsxs(Button, {
|
|
@@ -1351,15 +1351,15 @@ function DynamicWorkflowActivity({ runs, connected = true, onOpen }) {
|
|
|
1351
1351
|
accessibilityLabel: t("workflow.ui.openDynamicWorkflows", "Open dynamic workflows"),
|
|
1352
1352
|
children: [
|
|
1353
1353
|
/* @__PURE__ */ jsx(Text, {
|
|
1354
|
-
style: styles$
|
|
1354
|
+
style: styles$10.itemTitle,
|
|
1355
1355
|
children: t("workflow.ui.noWorkflowsYet", "No workflows yet")
|
|
1356
1356
|
}),
|
|
1357
1357
|
/* @__PURE__ */ jsx(Text, {
|
|
1358
|
-
style: styles$
|
|
1358
|
+
style: styles$10.dim,
|
|
1359
1359
|
children: t("workflow.ui.idle", "Idle")
|
|
1360
1360
|
}),
|
|
1361
1361
|
/* @__PURE__ */ jsx(Text, {
|
|
1362
|
-
style: styles$
|
|
1362
|
+
style: styles$10.link,
|
|
1363
1363
|
children: t("workflow.ui.viewWorkflows", "View workflows →")
|
|
1364
1364
|
})
|
|
1365
1365
|
]
|
|
@@ -1370,27 +1370,27 @@ function DynamicWorkflowActivity({ runs, connected = true, onOpen }) {
|
|
|
1370
1370
|
onPress: onOpen,
|
|
1371
1371
|
accessibilityRole: "button",
|
|
1372
1372
|
accessibilityLabel: t("workflow.ui.openRun", "Open {name}", { name: run.label }),
|
|
1373
|
-
style: styles$
|
|
1373
|
+
style: styles$10.activityRow,
|
|
1374
1374
|
children: [/* @__PURE__ */ jsxs(View, {
|
|
1375
|
-
style: styles$
|
|
1375
|
+
style: styles$10.inline,
|
|
1376
1376
|
children: [
|
|
1377
1377
|
/* @__PURE__ */ jsx(Dot, {
|
|
1378
1378
|
tone: statusDot(run.status),
|
|
1379
1379
|
size: "md"
|
|
1380
1380
|
}),
|
|
1381
1381
|
/* @__PURE__ */ jsx(Text, {
|
|
1382
|
-
style: styles$
|
|
1382
|
+
style: styles$10.itemTitle,
|
|
1383
1383
|
children: run.label
|
|
1384
1384
|
}),
|
|
1385
1385
|
/* @__PURE__ */ jsxs(Text, {
|
|
1386
|
-
style: styles$
|
|
1386
|
+
style: styles$10.dim,
|
|
1387
1387
|
children: [workflowStatusLabel(t, run.status), " ›"]
|
|
1388
1388
|
})
|
|
1389
1389
|
]
|
|
1390
1390
|
}), counts.total > 0 && /* @__PURE__ */ jsxs(View, {
|
|
1391
|
-
style: styles$
|
|
1391
|
+
style: styles$10.activityDetail,
|
|
1392
1392
|
children: [/* @__PURE__ */ jsxs(Text, {
|
|
1393
|
-
style: styles$
|
|
1393
|
+
style: styles$10.dim,
|
|
1394
1394
|
children: [
|
|
1395
1395
|
run.status === "running" ? t("workflow.dynamic.runningOf", "{count} of {total} running", {
|
|
1396
1396
|
count: counts.running,
|
|
@@ -1402,7 +1402,7 @@ function DynamicWorkflowActivity({ runs, connected = true, onOpen }) {
|
|
|
1402
1402
|
" ",
|
|
1403
1403
|
t("workflow.ui.done.lowercase", "done"),
|
|
1404
1404
|
counts.failed > 0 && /* @__PURE__ */ jsxs(Text, {
|
|
1405
|
-
style: styles$
|
|
1405
|
+
style: styles$10.error,
|
|
1406
1406
|
children: [
|
|
1407
1407
|
" ",
|
|
1408
1408
|
"· ",
|
|
@@ -1413,7 +1413,7 @@ function DynamicWorkflowActivity({ runs, connected = true, onOpen }) {
|
|
|
1413
1413
|
})
|
|
1414
1414
|
]
|
|
1415
1415
|
}), /* @__PURE__ */ jsxs(View, {
|
|
1416
|
-
style: styles$
|
|
1416
|
+
style: styles$10.progress,
|
|
1417
1417
|
accessibilityLabel: counts.failed > 0 ? t("workflow.ui.progressCountsWithFailed", "{done} done, {running} running, {failed} failed, {total} total", {
|
|
1418
1418
|
done: counts.done,
|
|
1419
1419
|
running: counts.running,
|
|
@@ -1425,9 +1425,9 @@ function DynamicWorkflowActivity({ runs, connected = true, onOpen }) {
|
|
|
1425
1425
|
total: counts.total
|
|
1426
1426
|
}),
|
|
1427
1427
|
children: [
|
|
1428
|
-
/* @__PURE__ */ jsx(View, { style: [styles$
|
|
1429
|
-
/* @__PURE__ */ jsx(View, { style: [styles$
|
|
1430
|
-
counts.failed > 0 ? /* @__PURE__ */ jsx(View, { style: [styles$
|
|
1428
|
+
/* @__PURE__ */ jsx(View, { style: [styles$10.progressDone, { width: `${counts.done / counts.total * 100}%` }] }),
|
|
1429
|
+
/* @__PURE__ */ jsx(View, { style: [styles$10.progressRunning, { width: `${counts.running / counts.total * 100}%` }] }),
|
|
1430
|
+
counts.failed > 0 ? /* @__PURE__ */ jsx(View, { style: [styles$10.progressFailed, { width: `${counts.failed / counts.total * 100}%` }] }) : null
|
|
1431
1431
|
]
|
|
1432
1432
|
})]
|
|
1433
1433
|
})]
|
|
@@ -1441,7 +1441,7 @@ function PhaseTrack({ shape, phases }) {
|
|
|
1441
1441
|
if (shape.kind === "step") {
|
|
1442
1442
|
const phase = phases.find((entry) => entry.key === shape.key);
|
|
1443
1443
|
return phase ? /* @__PURE__ */ jsx(View, {
|
|
1444
|
-
style: styles$
|
|
1444
|
+
style: styles$10.phase,
|
|
1445
1445
|
children: /* @__PURE__ */ jsxs(StatusBadge, {
|
|
1446
1446
|
tone: WORKFLOW_STATUS[phase.status].tone,
|
|
1447
1447
|
children: [
|
|
@@ -1456,9 +1456,9 @@ function PhaseTrack({ shape, phases }) {
|
|
|
1456
1456
|
if (!leaves(shape)) return null;
|
|
1457
1457
|
const grouped = shape.kind === "parallel" || shape.kind === "branch";
|
|
1458
1458
|
return /* @__PURE__ */ jsxs(View, {
|
|
1459
|
-
style: grouped ? styles$
|
|
1459
|
+
style: grouped ? styles$10.phaseGroup : styles$10.phaseSequence,
|
|
1460
1460
|
children: [grouped && /* @__PURE__ */ jsx(Text, {
|
|
1461
|
-
style: styles$
|
|
1461
|
+
style: styles$10.dim,
|
|
1462
1462
|
children: shape.kind === "parallel" ? t("workflow.extra.parallel", "Parallel") : t("workflow.extra.branch", "Branch")
|
|
1463
1463
|
}), shape.children.map((child) => /* @__PURE__ */ jsx(PhaseTrack, {
|
|
1464
1464
|
shape: child,
|
|
@@ -1470,21 +1470,21 @@ function ItemRow({ item, run, now, defaultExpanded, onOpenAgent }) {
|
|
|
1470
1470
|
const t = useT();
|
|
1471
1471
|
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
1472
1472
|
return /* @__PURE__ */ jsxs(View, {
|
|
1473
|
-
style: styles$
|
|
1473
|
+
style: styles$10.item,
|
|
1474
1474
|
children: [
|
|
1475
1475
|
/* @__PURE__ */ jsxs(Pressable, {
|
|
1476
1476
|
onPress: () => setExpanded(!expanded),
|
|
1477
1477
|
accessibilityRole: "button",
|
|
1478
1478
|
accessibilityLabel: `${item.label}, ${workflowStatusLabel(t, item.status)}`,
|
|
1479
1479
|
accessibilityState: { expanded },
|
|
1480
|
-
style: styles$
|
|
1480
|
+
style: styles$10.toggle,
|
|
1481
1481
|
children: [
|
|
1482
1482
|
/* @__PURE__ */ jsx(Text, {
|
|
1483
|
-
style: styles$
|
|
1483
|
+
style: styles$10.dim,
|
|
1484
1484
|
children: expanded ? "▾" : "▸"
|
|
1485
1485
|
}),
|
|
1486
1486
|
/* @__PURE__ */ jsx(Text, {
|
|
1487
|
-
style: styles$
|
|
1487
|
+
style: styles$10.itemTitle,
|
|
1488
1488
|
children: item.label
|
|
1489
1489
|
}),
|
|
1490
1490
|
/* @__PURE__ */ jsx(StatusBadge, {
|
|
@@ -1494,25 +1494,25 @@ function ItemRow({ item, run, now, defaultExpanded, onOpenAgent }) {
|
|
|
1494
1494
|
]
|
|
1495
1495
|
}),
|
|
1496
1496
|
/* @__PURE__ */ jsx(View, {
|
|
1497
|
-
style: styles$
|
|
1497
|
+
style: styles$10.track,
|
|
1498
1498
|
children: /* @__PURE__ */ jsx(PhaseTrack, {
|
|
1499
1499
|
shape: run.shape,
|
|
1500
1500
|
phases: item.phases
|
|
1501
1501
|
})
|
|
1502
1502
|
}),
|
|
1503
1503
|
expanded && /* @__PURE__ */ jsx(View, {
|
|
1504
|
-
style: styles$
|
|
1504
|
+
style: styles$10.details,
|
|
1505
1505
|
children: item.phases.map((phase) => /* @__PURE__ */ jsxs(View, {
|
|
1506
|
-
style: styles$
|
|
1506
|
+
style: styles$10.detail,
|
|
1507
1507
|
children: [
|
|
1508
1508
|
/* @__PURE__ */ jsxs(View, {
|
|
1509
|
-
style: styles$
|
|
1509
|
+
style: styles$10.inline,
|
|
1510
1510
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
1511
|
-
style: styles$
|
|
1511
|
+
style: styles$10.title,
|
|
1512
1512
|
children: phase.label
|
|
1513
1513
|
}), /* @__PURE__ */ jsx(WorkflowDuration, {
|
|
1514
1514
|
seconds: true,
|
|
1515
|
-
style: styles$
|
|
1515
|
+
style: styles$10.dim,
|
|
1516
1516
|
startedAt: phase.startedAt,
|
|
1517
1517
|
endedAt: phase.finishedAt,
|
|
1518
1518
|
running: phase.status === "running",
|
|
@@ -1520,16 +1520,16 @@ function ItemRow({ item, run, now, defaultExpanded, onOpenAgent }) {
|
|
|
1520
1520
|
})]
|
|
1521
1521
|
}),
|
|
1522
1522
|
phase.executionStatus !== phase.status && /* @__PURE__ */ jsx(Text, {
|
|
1523
|
-
style: styles$
|
|
1523
|
+
style: styles$10.dim,
|
|
1524
1524
|
children: t("workflow.ui.stepExecutionState", "Step: {state}", { state: workflowStatusLabel(t, phase.executionStatus) })
|
|
1525
1525
|
}),
|
|
1526
1526
|
phase.error && /* @__PURE__ */ jsx(Text, {
|
|
1527
1527
|
accessibilityRole: phase.status === "failed" ? "alert" : void 0,
|
|
1528
|
-
style: phase.status === "failed" ? styles$
|
|
1528
|
+
style: phase.status === "failed" ? styles$10.error : styles$10.dim,
|
|
1529
1529
|
children: phase.error
|
|
1530
1530
|
}),
|
|
1531
1531
|
phase.agents.map((agent, index) => /* @__PURE__ */ jsxs(View, {
|
|
1532
|
-
style: styles$
|
|
1532
|
+
style: styles$10.inline,
|
|
1533
1533
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
1534
1534
|
variant: "link",
|
|
1535
1535
|
size: "sm",
|
|
@@ -1545,7 +1545,7 @@ function ItemRow({ item, run, now, defaultExpanded, onOpenAgent }) {
|
|
|
1545
1545
|
})]
|
|
1546
1546
|
}, agent.runId)),
|
|
1547
1547
|
!phase.agents.length && /* @__PURE__ */ jsx(Text, {
|
|
1548
|
-
style: styles$
|
|
1548
|
+
style: styles$10.dim,
|
|
1549
1549
|
children: t("workflow.ui.noAgentTranscript", "No agent transcript")
|
|
1550
1550
|
})
|
|
1551
1551
|
]
|
|
@@ -1557,13 +1557,13 @@ function ItemRow({ item, run, now, defaultExpanded, onOpenAgent }) {
|
|
|
1557
1557
|
function DynamicWorkflowView({ runs, now, connected = true, defaultExpandedKeys = [], onOpenAgent }) {
|
|
1558
1558
|
const t = useT();
|
|
1559
1559
|
return /* @__PURE__ */ jsxs(ScrollView, {
|
|
1560
|
-
style: styles$
|
|
1561
|
-
contentContainerStyle: styles$
|
|
1560
|
+
style: styles$10.screen,
|
|
1561
|
+
contentContainerStyle: styles$10.content,
|
|
1562
1562
|
accessibilityLabel: t("workflow.ui.dynamicWorkflows", "Dynamic workflows"),
|
|
1563
1563
|
children: [
|
|
1564
1564
|
!connected && /* @__PURE__ */ jsxs(Text, {
|
|
1565
1565
|
accessibilityRole: "alert",
|
|
1566
|
-
style: styles$
|
|
1566
|
+
style: styles$10.notice,
|
|
1567
1567
|
children: [
|
|
1568
1568
|
" ",
|
|
1569
1569
|
t("workflow.ui.connectionPausedTheseAreTheLastReportedWorkflowStates", "Connection paused. These are the last reported workflow states."),
|
|
@@ -1577,13 +1577,13 @@ function DynamicWorkflowView({ runs, now, connected = true, defaultExpandedKeys
|
|
|
1577
1577
|
description: t("workflow.ui.workflowsAppearHereWhenPoStartsThemYouCanCarryOnWithYourConversation", "Workflows appear here when Po starts them. You can carry on with your conversation.")
|
|
1578
1578
|
}),
|
|
1579
1579
|
runs.map((run) => /* @__PURE__ */ jsxs(View, {
|
|
1580
|
-
style: styles$
|
|
1580
|
+
style: styles$10.run,
|
|
1581
1581
|
children: [
|
|
1582
1582
|
/* @__PURE__ */ jsxs(View, {
|
|
1583
|
-
style: styles$
|
|
1583
|
+
style: styles$10.inline,
|
|
1584
1584
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
1585
1585
|
accessibilityRole: "header",
|
|
1586
|
-
style: styles$
|
|
1586
|
+
style: styles$10.runTitle,
|
|
1587
1587
|
children: run.label
|
|
1588
1588
|
}), /* @__PURE__ */ jsx(StatusBadge, {
|
|
1589
1589
|
tone: WORKFLOW_STATUS[run.status].tone,
|
|
@@ -1591,34 +1591,34 @@ function DynamicWorkflowView({ runs, now, connected = true, defaultExpandedKeys
|
|
|
1591
1591
|
})]
|
|
1592
1592
|
}),
|
|
1593
1593
|
/* @__PURE__ */ jsxs(View, {
|
|
1594
|
-
style: styles$
|
|
1594
|
+
style: styles$10.inline,
|
|
1595
1595
|
children: [/* @__PURE__ */ jsx(WorkflowDuration, {
|
|
1596
1596
|
seconds: true,
|
|
1597
|
-
style: styles$
|
|
1597
|
+
style: styles$10.dim,
|
|
1598
1598
|
startedAt: run.startedAt,
|
|
1599
1599
|
endedAt: run.finishedAt,
|
|
1600
1600
|
running: run.status === "running",
|
|
1601
1601
|
now
|
|
1602
1602
|
}), run.executionStatus !== run.status && (run.executionStatus === "failed" || run.executionStatus === "running") && /* @__PURE__ */ jsx(Text, {
|
|
1603
|
-
style: styles$
|
|
1603
|
+
style: styles$10.dim,
|
|
1604
1604
|
children: t("workflow.ui.executionStateCaption", " · Execution: {state}", { state: workflowStatusLabel(t, run.executionStatus) })
|
|
1605
1605
|
})]
|
|
1606
1606
|
}),
|
|
1607
1607
|
run.error && /* @__PURE__ */ jsx(Text, {
|
|
1608
1608
|
accessibilityRole: run.status === "failed" ? "alert" : void 0,
|
|
1609
|
-
style: run.status === "failed" ? styles$
|
|
1609
|
+
style: run.status === "failed" ? styles$10.error : styles$10.dim,
|
|
1610
1610
|
children: run.error
|
|
1611
1611
|
}),
|
|
1612
1612
|
run.groups.map((group) => /* @__PURE__ */ jsxs(View, {
|
|
1613
|
-
style: styles$
|
|
1613
|
+
style: styles$10.group,
|
|
1614
1614
|
children: [
|
|
1615
1615
|
/* @__PURE__ */ jsx(Text, {
|
|
1616
1616
|
accessibilityRole: "header",
|
|
1617
|
-
style: styles$
|
|
1617
|
+
style: styles$10.title,
|
|
1618
1618
|
children: group.label
|
|
1619
1619
|
}),
|
|
1620
1620
|
/* @__PURE__ */ jsxs(Text, {
|
|
1621
|
-
style: styles$
|
|
1621
|
+
style: styles$10.dim,
|
|
1622
1622
|
children: [groupSummary(group, t), group.concurrency ? t("workflow.ui.concurrencyCaption", " · Up to {count} at once", { count: group.concurrency }) : ""]
|
|
1623
1623
|
}),
|
|
1624
1624
|
group.items.map((item) => /* @__PURE__ */ jsx(ItemRow, {
|
|
@@ -1629,7 +1629,7 @@ function DynamicWorkflowView({ runs, now, connected = true, defaultExpandedKeys
|
|
|
1629
1629
|
onOpenAgent
|
|
1630
1630
|
}, item.key)),
|
|
1631
1631
|
group.truncated && /* @__PURE__ */ jsx(Text, {
|
|
1632
|
-
style: styles$
|
|
1632
|
+
style: styles$10.dim,
|
|
1633
1633
|
children: t("workflow.ui.showingItems", "Showing {shown} of {total} items.", {
|
|
1634
1634
|
shown: group.items.length,
|
|
1635
1635
|
total: group.total
|
|
@@ -1642,7 +1642,7 @@ function DynamicWorkflowView({ runs, now, connected = true, defaultExpandedKeys
|
|
|
1642
1642
|
]
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
1645
|
-
const styles$
|
|
1645
|
+
const styles$10 = StyleSheet.create((theme) => ({
|
|
1646
1646
|
activityRow: {
|
|
1647
1647
|
minHeight: 44,
|
|
1648
1648
|
padding: theme.spacing(3),
|
|
@@ -1848,9 +1848,9 @@ function StepDynamicRunsNote({ stepSessionId }) {
|
|
|
1848
1848
|
const summary = stepRunsSummary(runs, t);
|
|
1849
1849
|
return /* @__PURE__ */ jsxs(Text, {
|
|
1850
1850
|
testID: `step-dynamic-note-${stepSessionId}`,
|
|
1851
|
-
style: styles$
|
|
1851
|
+
style: styles$9.summary,
|
|
1852
1852
|
children: [summary.text, summary.failed > 0 ? /* @__PURE__ */ jsxs(Text, {
|
|
1853
|
-
style: styles$
|
|
1853
|
+
style: styles$9.failed,
|
|
1854
1854
|
children: [
|
|
1855
1855
|
" ",
|
|
1856
1856
|
"· ",
|
|
@@ -1873,13 +1873,13 @@ function StepDynamicRuns({ stepSessionId, openSession }) {
|
|
|
1873
1873
|
const summary = stepRunsSummary(runs, t);
|
|
1874
1874
|
return /* @__PURE__ */ jsxs(View, {
|
|
1875
1875
|
testID: "step-dynamic-runs",
|
|
1876
|
-
style: styles$
|
|
1876
|
+
style: styles$9.section(open),
|
|
1877
1877
|
children: [/* @__PURE__ */ jsxs(Pressable, {
|
|
1878
1878
|
accessibilityRole: "button",
|
|
1879
1879
|
accessibilityState: { expanded: open },
|
|
1880
1880
|
testID: "step-dynamic-runs-toggle",
|
|
1881
1881
|
onPress: () => setOpen(!open),
|
|
1882
|
-
style: styles$
|
|
1882
|
+
style: styles$9.toggle,
|
|
1883
1883
|
children: [
|
|
1884
1884
|
open ? /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
1885
1885
|
size: 12,
|
|
@@ -1889,14 +1889,14 @@ function StepDynamicRuns({ stepSessionId, openSession }) {
|
|
|
1889
1889
|
color: "faint"
|
|
1890
1890
|
}),
|
|
1891
1891
|
/* @__PURE__ */ jsx(Text, {
|
|
1892
|
-
style: styles$
|
|
1892
|
+
style: styles$9.title,
|
|
1893
1893
|
children: t("workflow.ui.dynamicWorkflows", "Dynamic workflows")
|
|
1894
1894
|
}),
|
|
1895
1895
|
/* @__PURE__ */ jsxs(Text, {
|
|
1896
1896
|
numberOfLines: 1,
|
|
1897
|
-
style: styles$
|
|
1897
|
+
style: styles$9.summary,
|
|
1898
1898
|
children: [summary.text, summary.failed > 0 ? /* @__PURE__ */ jsxs(Text, {
|
|
1899
|
-
style: styles$
|
|
1899
|
+
style: styles$9.failed,
|
|
1900
1900
|
children: [
|
|
1901
1901
|
" ",
|
|
1902
1902
|
"· ",
|
|
@@ -1908,7 +1908,7 @@ function StepDynamicRuns({ stepSessionId, openSession }) {
|
|
|
1908
1908
|
})
|
|
1909
1909
|
]
|
|
1910
1910
|
}), open ? /* @__PURE__ */ jsx(ScrollView, {
|
|
1911
|
-
style: styles$
|
|
1911
|
+
style: styles$9.runs,
|
|
1912
1912
|
children: /* @__PURE__ */ jsx(DynamicWorkflowView, {
|
|
1913
1913
|
runs,
|
|
1914
1914
|
onOpenAgent: () => openSession?.(stepSessionId)
|
|
@@ -1916,7 +1916,7 @@ function StepDynamicRuns({ stepSessionId, openSession }) {
|
|
|
1916
1916
|
}) : null]
|
|
1917
1917
|
});
|
|
1918
1918
|
}
|
|
1919
|
-
const styles$
|
|
1919
|
+
const styles$9 = StyleSheet.create((theme) => ({
|
|
1920
1920
|
section: (open) => ({
|
|
1921
1921
|
flex: open ? 2 : 0,
|
|
1922
1922
|
flexShrink: open ? 1 : 0,
|
|
@@ -2063,23 +2063,23 @@ function PendingLaunchBanner({ pending, onRetry, onDismiss }) {
|
|
|
2063
2063
|
accessibilityRole: "text",
|
|
2064
2064
|
accessibilityLiveRegion: "polite",
|
|
2065
2065
|
testID: "workflow-pending-launch",
|
|
2066
|
-
style: styles$
|
|
2066
|
+
style: styles$8.pending,
|
|
2067
2067
|
children: [/* @__PURE__ */ jsxs(View, {
|
|
2068
|
-
style: styles$
|
|
2068
|
+
style: styles$8.row,
|
|
2069
2069
|
children: [/* @__PURE__ */ jsx(Dot, {
|
|
2070
2070
|
tone: "yellow",
|
|
2071
2071
|
pulse: true
|
|
2072
2072
|
}), /* @__PURE__ */ jsx(Text, {
|
|
2073
|
-
style: styles$
|
|
2073
|
+
style: styles$8.name,
|
|
2074
2074
|
children: t("workflow.ui.startingWorkflow", "Starting {name}…", { name })
|
|
2075
2075
|
})]
|
|
2076
2076
|
}), stalled ? /* @__PURE__ */ jsxs(View, {
|
|
2077
|
-
style: styles$
|
|
2077
|
+
style: styles$8.pendingActions,
|
|
2078
2078
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
2079
|
-
style: styles$
|
|
2079
|
+
style: styles$8.meta,
|
|
2080
2080
|
children: t("workflow.ui.pendingLaunchStalled", "Taking longer than usual to start.")
|
|
2081
2081
|
}), /* @__PURE__ */ jsxs(View, {
|
|
2082
|
-
style: styles$
|
|
2082
|
+
style: styles$8.row,
|
|
2083
2083
|
children: [onRetry && pending.line !== void 0 ? /* @__PURE__ */ jsx(Button, {
|
|
2084
2084
|
variant: "outline",
|
|
2085
2085
|
size: "xs",
|
|
@@ -2106,13 +2106,13 @@ function Status({ state }) {
|
|
|
2106
2106
|
}
|
|
2107
2107
|
function Heading({ title, count }) {
|
|
2108
2108
|
return /* @__PURE__ */ jsxs(View, {
|
|
2109
|
-
style: styles$
|
|
2109
|
+
style: styles$8.section,
|
|
2110
2110
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
2111
2111
|
accessibilityRole: "header",
|
|
2112
|
-
style: styles$
|
|
2112
|
+
style: styles$8.heading,
|
|
2113
2113
|
children: title
|
|
2114
2114
|
}), /* @__PURE__ */ jsx(Text, {
|
|
2115
|
-
style: styles$
|
|
2115
|
+
style: styles$8.meta,
|
|
2116
2116
|
children: count
|
|
2117
2117
|
})]
|
|
2118
2118
|
});
|
|
@@ -2122,9 +2122,9 @@ function Duration({ start, end, now }) {
|
|
|
2122
2122
|
return now === void 0 ? /* @__PURE__ */ jsx(WorkflowDuration, {
|
|
2123
2123
|
startedAt: start,
|
|
2124
2124
|
endedAt: end,
|
|
2125
|
-
style: styles$
|
|
2125
|
+
style: styles$8.meta
|
|
2126
2126
|
}) : /* @__PURE__ */ jsx(Text, {
|
|
2127
|
-
style: styles$
|
|
2127
|
+
style: styles$8.meta,
|
|
2128
2128
|
children: start === void 0 ? "" : formatRunDuration(Math.max(0, (end === void 0 ? now : Date.parse(end)) - Date.parse(start)), t)
|
|
2129
2129
|
});
|
|
2130
2130
|
}
|
|
@@ -2132,7 +2132,7 @@ function Job({ run, tree, job, now, onOpen, autoCollapsed, current, path = [], l
|
|
|
2132
2132
|
const t = useT();
|
|
2133
2133
|
const [open, setOpen] = useState(() => current?.job === job.name || !autoCollapsed.has(job.name));
|
|
2134
2134
|
if (path.includes(job.name)) return /* @__PURE__ */ jsx(Text, {
|
|
2135
|
-
style: styles$
|
|
2135
|
+
style: styles$8.childError,
|
|
2136
2136
|
children: t("workflow.ui.cyclicChildOwnership", "Cyclic child ownership: {name}", { name: job.name })
|
|
2137
2137
|
});
|
|
2138
2138
|
const done = job.steps.filter((step) => step.status === "completed" || step.status === "skipped").length;
|
|
@@ -2144,7 +2144,7 @@ function Job({ run, tree, job, now, onOpen, autoCollapsed, current, path = [], l
|
|
|
2144
2144
|
accessibilityLabel: `${label}, ${workflowStateLabel(t, job.status)}`,
|
|
2145
2145
|
accessibilityState: { expanded: open },
|
|
2146
2146
|
onPress: () => setOpen(!open),
|
|
2147
|
-
style: styles$
|
|
2147
|
+
style: styles$8.job,
|
|
2148
2148
|
children: [
|
|
2149
2149
|
open ? /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
2150
2150
|
size: 16,
|
|
@@ -2154,11 +2154,11 @@ function Job({ run, tree, job, now, onOpen, autoCollapsed, current, path = [], l
|
|
|
2154
2154
|
color: "dim"
|
|
2155
2155
|
}),
|
|
2156
2156
|
/* @__PURE__ */ jsx(Text, {
|
|
2157
|
-
style: styles$
|
|
2157
|
+
style: styles$8.name,
|
|
2158
2158
|
children: label
|
|
2159
2159
|
}),
|
|
2160
2160
|
/* @__PURE__ */ jsxs(Text, {
|
|
2161
|
-
style: styles$
|
|
2161
|
+
style: styles$8.meta,
|
|
2162
2162
|
children: [
|
|
2163
2163
|
done,
|
|
2164
2164
|
"/",
|
|
@@ -2174,17 +2174,17 @@ function Job({ run, tree, job, now, onOpen, autoCollapsed, current, path = [], l
|
|
|
2174
2174
|
]
|
|
2175
2175
|
}),
|
|
2176
2176
|
job.reason ? /* @__PURE__ */ jsx(Text, {
|
|
2177
|
-
style: styles$
|
|
2177
|
+
style: styles$8.reason,
|
|
2178
2178
|
children: job.reason
|
|
2179
2179
|
}) : null,
|
|
2180
2180
|
open ? /* @__PURE__ */ jsxs(View, { children: [job.steps.map((step) => /* @__PURE__ */ jsx(ListRow, {
|
|
2181
|
-
style: styles$
|
|
2181
|
+
style: styles$8.step,
|
|
2182
2182
|
selected: step.name === currentStep,
|
|
2183
2183
|
accessibilityLabel: `${step.name}, ${workflowStateLabel(t, step.status)}`,
|
|
2184
2184
|
title: step.name,
|
|
2185
2185
|
leading: /* @__PURE__ */ jsx(Dot, { tone: dotToneForState(step.status) }),
|
|
2186
2186
|
description: /* @__PURE__ */ jsxs(View, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2187
|
-
style: styles$
|
|
2187
|
+
style: styles$8.meta,
|
|
2188
2188
|
children: [
|
|
2189
2189
|
step.name === currentStep ? t("workflow.extra.youAreHere", "You are here") : void 0,
|
|
2190
2190
|
workflowStateLabel(t, step.status),
|
|
@@ -2201,10 +2201,10 @@ function Job({ run, tree, job, now, onOpen, autoCollapsed, current, path = [], l
|
|
|
2201
2201
|
onPress: step.status === "pending" ? void 0 : () => onOpen(job.name, step.name)
|
|
2202
2202
|
}, step.name)), children.length > 0 ? /* @__PURE__ */ jsxs(View, {
|
|
2203
2203
|
accessibilityLabel: t("workflow.ui.child.jobsOf", "Child jobs of {name}", { name: job.name }),
|
|
2204
|
-
style: styles$
|
|
2204
|
+
style: styles$8.childJobs,
|
|
2205
2205
|
children: [/* @__PURE__ */ jsxs(Text, {
|
|
2206
2206
|
accessibilityRole: "header",
|
|
2207
|
-
style: styles$
|
|
2207
|
+
style: styles$8.childHeader,
|
|
2208
2208
|
children: [
|
|
2209
2209
|
t("workflow.ui.childJobs", "Child jobs"),
|
|
2210
2210
|
" (",
|
|
@@ -2213,7 +2213,7 @@ function Job({ run, tree, job, now, onOpen, autoCollapsed, current, path = [], l
|
|
|
2213
2213
|
]
|
|
2214
2214
|
}), children.map(({ child, name }, index) => /* @__PURE__ */ jsxs(View, { children: [
|
|
2215
2215
|
tree.duplicateNames.has(name) ? /* @__PURE__ */ jsx(Text, {
|
|
2216
|
-
style: styles$
|
|
2216
|
+
style: styles$8.childError,
|
|
2217
2217
|
children: t("workflow.ui.child.duplicate", "Duplicate child identity: {name}. Recorded parent: {parent}.", {
|
|
2218
2218
|
name,
|
|
2219
2219
|
parent: job.name
|
|
@@ -2231,21 +2231,21 @@ function Job({ run, tree, job, now, onOpen, autoCollapsed, current, path = [], l
|
|
|
2231
2231
|
label: child.job
|
|
2232
2232
|
}, recorded.name)),
|
|
2233
2233
|
!run.jobs.some((candidate) => candidate.name === name) ? /* @__PURE__ */ jsx(Text, {
|
|
2234
|
-
style: styles$
|
|
2234
|
+
style: styles$8.childNote,
|
|
2235
2235
|
children: t("workflow.ui.child.noProgress", "{name}: {state}. No progress recorded.", {
|
|
2236
2236
|
name,
|
|
2237
2237
|
state: workflowStateLabel(t, child.state)
|
|
2238
2238
|
})
|
|
2239
2239
|
}) : null,
|
|
2240
2240
|
(child.state === "failed" || child.state === "interrupted") && run.jobs.some((recorded) => recorded.name === name && recorded.status !== child.state) ? /* @__PURE__ */ jsx(Text, {
|
|
2241
|
-
style: styles$
|
|
2241
|
+
style: styles$8.childError,
|
|
2242
2242
|
children: t("workflow.ui.child.invocation", "Invocation {name}: {state}.", {
|
|
2243
2243
|
name,
|
|
2244
2244
|
state: workflowStateLabel(t, child.state)
|
|
2245
2245
|
})
|
|
2246
2246
|
}) : null,
|
|
2247
2247
|
child.error === void 0 ? null : /* @__PURE__ */ jsx(Text, {
|
|
2248
|
-
style: styles$
|
|
2248
|
+
style: styles$8.childError,
|
|
2249
2249
|
children: child.error
|
|
2250
2250
|
})
|
|
2251
2251
|
] }, `${name}/${index}`))]
|
|
@@ -2257,7 +2257,7 @@ function WorkflowArtifactList({ listing, error, loading = false, onOpen, onParen
|
|
|
2257
2257
|
const t = useT();
|
|
2258
2258
|
const artifacts = listing?.artifacts ?? [];
|
|
2259
2259
|
return /* @__PURE__ */ jsxs(View, {
|
|
2260
|
-
style: styles$
|
|
2260
|
+
style: styles$8.artifacts,
|
|
2261
2261
|
children: [
|
|
2262
2262
|
/* @__PURE__ */ jsx(Heading, {
|
|
2263
2263
|
title: t("workflow.ui.artifacts", "Artifacts"),
|
|
@@ -2273,10 +2273,10 @@ function WorkflowArtifactList({ listing, error, loading = false, onOpen, onParen
|
|
|
2273
2273
|
]
|
|
2274
2274
|
}) : null,
|
|
2275
2275
|
error ? /* @__PURE__ */ jsxs(View, {
|
|
2276
|
-
style: styles$
|
|
2276
|
+
style: styles$8.artifactError,
|
|
2277
2277
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
2278
2278
|
accessibilityRole: "alert",
|
|
2279
|
-
style: styles$
|
|
2279
|
+
style: styles$8.error,
|
|
2280
2280
|
children: error
|
|
2281
2281
|
}), onRetry ? /* @__PURE__ */ jsx(Button, {
|
|
2282
2282
|
variant: "outline",
|
|
@@ -2286,7 +2286,7 @@ function WorkflowArtifactList({ listing, error, loading = false, onOpen, onParen
|
|
|
2286
2286
|
}) : null]
|
|
2287
2287
|
}) : null,
|
|
2288
2288
|
loading ? /* @__PURE__ */ jsx(Text, {
|
|
2289
|
-
style: styles$
|
|
2289
|
+
style: styles$8.reason,
|
|
2290
2290
|
children: t("workflow.ui.loadingArtifacts", "Loading artifacts…")
|
|
2291
2291
|
}) : null,
|
|
2292
2292
|
artifacts.map((artifact) => /* @__PURE__ */ jsx(ListRow, {
|
|
@@ -2303,7 +2303,7 @@ function WorkflowArtifactList({ listing, error, loading = false, onOpen, onParen
|
|
|
2303
2303
|
onPress: artifact.state === "pending" || artifact.state === "unreadable" ? void 0 : () => onOpen(artifact)
|
|
2304
2304
|
}, artifact.path)),
|
|
2305
2305
|
!artifacts.length && !loading && !error ? /* @__PURE__ */ jsx(Text, {
|
|
2306
|
-
style: styles$
|
|
2306
|
+
style: styles$8.reason,
|
|
2307
2307
|
children: t("workflow.ui.noArtifactsYet", "No artifacts yet.")
|
|
2308
2308
|
}) : null
|
|
2309
2309
|
]
|
|
@@ -2334,20 +2334,20 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2334
2334
|
onDismiss: onDismissPendingLaunch
|
|
2335
2335
|
}) : null,
|
|
2336
2336
|
run ? /* @__PURE__ */ jsxs(View, {
|
|
2337
|
-
style: styles$
|
|
2337
|
+
style: styles$8.header,
|
|
2338
2338
|
children: [
|
|
2339
2339
|
/* @__PURE__ */ jsxs(View, {
|
|
2340
|
-
style: styles$
|
|
2340
|
+
style: styles$8.row,
|
|
2341
2341
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
2342
2342
|
accessibilityRole: "header",
|
|
2343
|
-
style: styles$
|
|
2343
|
+
style: styles$8.title,
|
|
2344
2344
|
children: run.displayName
|
|
2345
2345
|
}), /* @__PURE__ */ jsx(Status, { state: runState(run) })]
|
|
2346
2346
|
}),
|
|
2347
2347
|
/* @__PURE__ */ jsxs(View, {
|
|
2348
|
-
style: styles$
|
|
2348
|
+
style: styles$8.row,
|
|
2349
2349
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
2350
|
-
style: styles$
|
|
2350
|
+
style: styles$8.flexMeta,
|
|
2351
2351
|
children: runHeaderSubtitle(run, t)
|
|
2352
2352
|
}), /* @__PURE__ */ jsx(Duration, {
|
|
2353
2353
|
start: run.startedAt,
|
|
@@ -2369,22 +2369,22 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2369
2369
|
}) : null,
|
|
2370
2370
|
attention ? /* @__PURE__ */ jsxs(View, {
|
|
2371
2371
|
accessibilityLiveRegion: "polite",
|
|
2372
|
-
style: [styles$
|
|
2372
|
+
style: [styles$8.attention, attention.kind === "waiting" ? styles$8.ask : attention.kind === "paused" ? styles$8.paused : styles$8.failure],
|
|
2373
2373
|
children: [
|
|
2374
2374
|
/* @__PURE__ */ jsx(Text, {
|
|
2375
|
-
style: styles$
|
|
2375
|
+
style: styles$8.heading,
|
|
2376
2376
|
children: attention.kind === "error" ? t("workflow.extra.runFailed", "Run failed") : attention.kind === "stale" ? t("workflow.extra.progressStopped", "Progress stopped") : attention.kind === "waiting" ? t("workflow.extra.waitingForYourApproval", "Waiting for your approval") : t("workflow.extra.paused", "Paused")
|
|
2377
2377
|
}),
|
|
2378
2378
|
/* @__PURE__ */ jsx(Text, {
|
|
2379
|
-
style: styles$
|
|
2379
|
+
style: styles$8.body,
|
|
2380
2380
|
children: attentionText
|
|
2381
2381
|
}),
|
|
2382
2382
|
/* @__PURE__ */ jsx(Text, {
|
|
2383
|
-
style: styles$
|
|
2383
|
+
style: styles$8.meta,
|
|
2384
2384
|
children: attention.kind === "paused" ? t("workflow.extra.askTheAgentInThisConversationToResumeIt", "Ask the agent in this conversation to resume it.") : attention.kind === "waiting" ? t("workflow.extra.itCarriesOnOnceYouAnswer", "It carries on once you answer.") : t("workflow.extra.askTheAgentInThisConversationToDiagnoseOrRecoverIt", "Ask the agent in this conversation to diagnose or recover it.")
|
|
2385
2385
|
}),
|
|
2386
2386
|
attention.kind === "waiting" ? onReviewApproval ? /* @__PURE__ */ jsx(View, {
|
|
2387
|
-
style: styles$
|
|
2387
|
+
style: styles$8.attentionActions,
|
|
2388
2388
|
children: /* @__PURE__ */ jsx(Button, {
|
|
2389
2389
|
variant: "primary",
|
|
2390
2390
|
testID: "workflow-dock-review-approval",
|
|
@@ -2392,11 +2392,11 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2392
2392
|
children: t("workflow.ui.reviewApproval", "Review approval")
|
|
2393
2393
|
})
|
|
2394
2394
|
}) : /* @__PURE__ */ jsx(Text, {
|
|
2395
|
-
style: styles$
|
|
2395
|
+
style: styles$8.meta,
|
|
2396
2396
|
children: t("workflow.ui.reviewInHomeApprovals", "Open Home approvals to approve or reject the pending request.")
|
|
2397
2397
|
}) : null,
|
|
2398
2398
|
recoverable && (onRecover || failedStep) ? /* @__PURE__ */ jsxs(View, {
|
|
2399
|
-
style: styles$
|
|
2399
|
+
style: styles$8.attentionActions,
|
|
2400
2400
|
children: [onRecover && current === void 0 ? /* @__PURE__ */ jsx(Button, {
|
|
2401
2401
|
variant: "primary",
|
|
2402
2402
|
testID: "workflow-dock-recover",
|
|
@@ -2412,15 +2412,15 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2412
2412
|
]
|
|
2413
2413
|
}) : null,
|
|
2414
2414
|
active.length ? /* @__PURE__ */ jsxs(View, {
|
|
2415
|
-
style: styles$
|
|
2415
|
+
style: styles$8.activeStrip,
|
|
2416
2416
|
children: [/* @__PURE__ */ jsxs(View, {
|
|
2417
|
-
style: styles$
|
|
2417
|
+
style: styles$8.activeStripHeader,
|
|
2418
2418
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
2419
2419
|
accessibilityRole: "header",
|
|
2420
|
-
style: styles$
|
|
2420
|
+
style: styles$8.meta,
|
|
2421
2421
|
children: t("workflow.ui.activeNow", "Active now")
|
|
2422
2422
|
}), /* @__PURE__ */ jsx(Text, {
|
|
2423
|
-
style: styles$
|
|
2423
|
+
style: styles$8.meta,
|
|
2424
2424
|
children: String(active.length)
|
|
2425
2425
|
})]
|
|
2426
2426
|
}), active.map(({ job, step }) => {
|
|
@@ -2448,13 +2448,13 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2448
2448
|
}) : null
|
|
2449
2449
|
] });
|
|
2450
2450
|
const details = effectiveMode === "picker" ? /* @__PURE__ */ jsxs(View, {
|
|
2451
|
-
style: styles$
|
|
2451
|
+
style: styles$8.picker,
|
|
2452
2452
|
children: [
|
|
2453
2453
|
/* @__PURE__ */ jsxs(View, {
|
|
2454
|
-
style: styles$
|
|
2454
|
+
style: styles$8.row,
|
|
2455
2455
|
children: [/* @__PURE__ */ jsxs(Text, {
|
|
2456
2456
|
accessibilityRole: "header",
|
|
2457
|
-
style: styles$
|
|
2457
|
+
style: styles$8.title,
|
|
2458
2458
|
children: [
|
|
2459
2459
|
" ",
|
|
2460
2460
|
t("workflow.ui.switchRun", "Switch run"),
|
|
@@ -2477,7 +2477,7 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2477
2477
|
onChangeText: setSearch
|
|
2478
2478
|
}),
|
|
2479
2479
|
/* @__PURE__ */ jsx(View, {
|
|
2480
|
-
style: styles$
|
|
2480
|
+
style: styles$8.filters,
|
|
2481
2481
|
children: RUN_FILTERS.map((value) => /* @__PURE__ */ jsx(Button, {
|
|
2482
2482
|
variant: filter === value ? "secondary" : "ghost",
|
|
2483
2483
|
accessibilityState: { selected: filter === value },
|
|
@@ -2511,24 +2511,24 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2511
2511
|
}, workflowRunIdentity(item)))
|
|
2512
2512
|
]
|
|
2513
2513
|
}) : effectiveMode === "stop" ? /* @__PURE__ */ jsxs(View, {
|
|
2514
|
-
style: styles$
|
|
2514
|
+
style: styles$8.picker,
|
|
2515
2515
|
children: [
|
|
2516
2516
|
/* @__PURE__ */ jsx(Text, {
|
|
2517
2517
|
accessibilityRole: "header",
|
|
2518
|
-
style: styles$
|
|
2518
|
+
style: styles$8.title,
|
|
2519
2519
|
children: run?.waiting ? t("workflow.ui.stopWaitingWorkflow", "Stop waiting workflow?") : t("workflow.ui.stopRunTitle", "Stop {name}?", { name: run?.displayName ?? "" })
|
|
2520
2520
|
}),
|
|
2521
2521
|
/* @__PURE__ */ jsx(Text, {
|
|
2522
|
-
style: styles$
|
|
2522
|
+
style: styles$8.body,
|
|
2523
2523
|
children: run?.waiting ? t("workflow.ui.stopWaitingBody", "This run is waiting for your approval. Stopping cancels the run and withdraws pending approval requests so nothing stays stuck in your inbox.") : t("workflow.ui.stopRunningBody", "Stopping cancels the active step and ends this run early. You can still inspect its logs and artifacts afterward.")
|
|
2524
2524
|
}),
|
|
2525
2525
|
/* @__PURE__ */ jsx(Text, {
|
|
2526
|
-
style: styles$
|
|
2526
|
+
style: styles$8.meta,
|
|
2527
2527
|
children: run?.displayName
|
|
2528
2528
|
}),
|
|
2529
2529
|
error ? /* @__PURE__ */ jsx(Text, {
|
|
2530
2530
|
accessibilityRole: "alert",
|
|
2531
|
-
style: styles$
|
|
2531
|
+
style: styles$8.error,
|
|
2532
2532
|
children: error
|
|
2533
2533
|
}) : null,
|
|
2534
2534
|
/* @__PURE__ */ jsx(Button, {
|
|
@@ -2546,11 +2546,11 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2546
2546
|
})
|
|
2547
2547
|
]
|
|
2548
2548
|
}) : effectiveMode === "delete" ? /* @__PURE__ */ jsxs(View, {
|
|
2549
|
-
style: styles$
|
|
2549
|
+
style: styles$8.picker,
|
|
2550
2550
|
children: [
|
|
2551
2551
|
/* @__PURE__ */ jsxs(Text, {
|
|
2552
2552
|
accessibilityRole: "header",
|
|
2553
|
-
style: styles$
|
|
2553
|
+
style: styles$8.title,
|
|
2554
2554
|
children: [
|
|
2555
2555
|
" ",
|
|
2556
2556
|
t("workflow.ui.deleteThisRun", "Delete this run?"),
|
|
@@ -2558,7 +2558,7 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2558
2558
|
]
|
|
2559
2559
|
}),
|
|
2560
2560
|
/* @__PURE__ */ jsxs(Text, {
|
|
2561
|
-
style: styles$
|
|
2561
|
+
style: styles$8.body,
|
|
2562
2562
|
children: [
|
|
2563
2563
|
" ",
|
|
2564
2564
|
t("workflow.ui.thisPermanentlyRemovesTheSettledRunAndItsDirectoryIncludingLogsAndArtifacts", "This permanently removes the settled run and its directory, including logs and artifacts."),
|
|
@@ -2566,12 +2566,12 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2566
2566
|
]
|
|
2567
2567
|
}),
|
|
2568
2568
|
/* @__PURE__ */ jsx(Text, {
|
|
2569
|
-
style: styles$
|
|
2569
|
+
style: styles$8.meta,
|
|
2570
2570
|
children: run?.displayName
|
|
2571
2571
|
}),
|
|
2572
2572
|
error ? /* @__PURE__ */ jsx(Text, {
|
|
2573
2573
|
accessibilityRole: "alert",
|
|
2574
|
-
style: styles$
|
|
2574
|
+
style: styles$8.error,
|
|
2575
2575
|
children: error
|
|
2576
2576
|
}) : null,
|
|
2577
2577
|
/* @__PURE__ */ jsx(Button, {
|
|
@@ -2593,7 +2593,7 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2593
2593
|
]
|
|
2594
2594
|
}) : null;
|
|
2595
2595
|
return /* @__PURE__ */ jsx(View, {
|
|
2596
|
-
style: styles$
|
|
2596
|
+
style: styles$8.frame,
|
|
2597
2597
|
children: details ? sheet ? /* @__PURE__ */ jsx(SheetList, {
|
|
2598
2598
|
embedded: true,
|
|
2599
2599
|
data: [],
|
|
@@ -2605,7 +2605,7 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2605
2605
|
children: details
|
|
2606
2606
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(List, {
|
|
2607
2607
|
...sheet ? { embedded: true } : {},
|
|
2608
|
-
style: styles$
|
|
2608
|
+
style: styles$8.list,
|
|
2609
2609
|
data: tree?.roots ?? [],
|
|
2610
2610
|
keyExtractor: (job) => job.name,
|
|
2611
2611
|
keyboardShouldPersistTaps: "handled",
|
|
@@ -2621,10 +2621,10 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2621
2621
|
}, `${run.workspace}/${run.routeKey ?? run.runKey}/${item.name}`) : null,
|
|
2622
2622
|
ListFooterComponent: run && tree && (tree.unattached.length > 0 || run.childStatusErrors?.length) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2623
2623
|
tree.unattached.map(({ child, lead, name }, index) => /* @__PURE__ */ jsxs(View, {
|
|
2624
|
-
style: styles$
|
|
2624
|
+
style: styles$8.childJobs,
|
|
2625
2625
|
children: [
|
|
2626
2626
|
/* @__PURE__ */ jsx(Text, {
|
|
2627
|
-
style: styles$
|
|
2627
|
+
style: styles$8.childError,
|
|
2628
2628
|
children: t("workflow.ui.child.unattached", "Unattached child {name}: parent {parent} is missing or cyclic. State: {state}.", {
|
|
2629
2629
|
name,
|
|
2630
2630
|
parent: lead,
|
|
@@ -2641,17 +2641,17 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2641
2641
|
current
|
|
2642
2642
|
}, job.name)),
|
|
2643
2643
|
child.error === void 0 ? null : /* @__PURE__ */ jsx(Text, {
|
|
2644
|
-
style: styles$
|
|
2644
|
+
style: styles$8.childError,
|
|
2645
2645
|
children: child.error
|
|
2646
2646
|
})
|
|
2647
2647
|
]
|
|
2648
2648
|
}, `${name}/${index}`)),
|
|
2649
2649
|
run.childStatusErrors?.length ? /* @__PURE__ */ jsx(Text, {
|
|
2650
|
-
style: styles$
|
|
2650
|
+
style: styles$8.childNote,
|
|
2651
2651
|
children: t("workflow.ui.incompleteChildHierarchyJournalEvidenceIsUnavailableUnmatchedProgressIsRetainedInJobs", "Incomplete child hierarchy: journal evidence is unavailable. Unmatched progress is retained in Jobs.")
|
|
2652
2652
|
}) : null,
|
|
2653
2653
|
run.childStatusErrors?.map((journalError, index) => /* @__PURE__ */ jsxs(Text, {
|
|
2654
|
-
style: styles$
|
|
2654
|
+
style: styles$8.childError,
|
|
2655
2655
|
children: [
|
|
2656
2656
|
t("workflow.ui.childJournal", "Child journal"),
|
|
2657
2657
|
journalError.lead === void 0 ? "" : ` (${journalError.lead})`,
|
|
@@ -2672,47 +2672,47 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
|
|
|
2672
2672
|
}
|
|
2673
2673
|
}) : void 0
|
|
2674
2674
|
}), run && current !== void 0 ? /* @__PURE__ */ jsxs(Text, {
|
|
2675
|
-
style: [styles$
|
|
2675
|
+
style: [styles$8.meta, styles$8.actions],
|
|
2676
2676
|
children: [
|
|
2677
2677
|
" ",
|
|
2678
2678
|
t("workflow.ui.theWorkflowSessionRunsThisWorkflowSoStoppingOrDeletingItHappensThere", "The workflow session runs this workflow, so stopping or deleting it happens there."),
|
|
2679
2679
|
" "
|
|
2680
2680
|
]
|
|
2681
2681
|
}) : run ? /* @__PURE__ */ jsxs(View, {
|
|
2682
|
-
style: styles$
|
|
2682
|
+
style: styles$8.actions,
|
|
2683
2683
|
children: [error ? /* @__PURE__ */ jsx(Text, {
|
|
2684
2684
|
accessibilityRole: "alert",
|
|
2685
|
-
style: styles$
|
|
2685
|
+
style: styles$8.error,
|
|
2686
2686
|
children: error
|
|
2687
2687
|
}) : null, /* @__PURE__ */ jsxs(View, {
|
|
2688
|
-
style: styles$
|
|
2688
|
+
style: styles$8.actionRow,
|
|
2689
2689
|
children: [run.stage === "running" && (onPause || onResume) ? run.executionState === "paused" || run.executionState === "resume_requested" ? /* @__PURE__ */ jsx(Button, {
|
|
2690
2690
|
variant: "outline",
|
|
2691
2691
|
testID: "resume-workflow",
|
|
2692
2692
|
disabled: !canAct || busy !== void 0 || run.executionState === "resume_requested" || !onResume,
|
|
2693
2693
|
onPress: onResume,
|
|
2694
|
-
style: styles$
|
|
2694
|
+
style: styles$8.actionButton,
|
|
2695
2695
|
children: busy === "resuming" || run.executionState === "resume_requested" ? t("workflow.ui.resuming", "Resuming…") : t("workflow.ui.resume", "Resume")
|
|
2696
2696
|
}) : /* @__PURE__ */ jsx(Button, {
|
|
2697
2697
|
variant: "outline",
|
|
2698
2698
|
testID: "pause-workflow",
|
|
2699
2699
|
disabled: !canAct || busy !== void 0 || run.executionState === "pause_requested" || !onPause,
|
|
2700
2700
|
onPress: onPause,
|
|
2701
|
-
style: styles$
|
|
2701
|
+
style: styles$8.actionButton,
|
|
2702
2702
|
children: busy === "pausing" || run.executionState === "pause_requested" ? t("workflow.ui.pausing", "Pausing…") : t("workflow.ui.pause", "Pause")
|
|
2703
2703
|
}) : null, /* @__PURE__ */ jsx(Button, {
|
|
2704
2704
|
variant: "danger-outline",
|
|
2705
2705
|
testID: live ? "stop-workflow" : "delete-workflow",
|
|
2706
2706
|
disabled: !canAct || busy !== void 0,
|
|
2707
2707
|
onPress: live ? () => setMode("stop") : () => setMode("delete"),
|
|
2708
|
-
style: styles$
|
|
2708
|
+
style: styles$8.actionButton,
|
|
2709
2709
|
children: busy === "stopping" ? t("workflow.extra.stopping.progress", "Stopping…") : live ? t("workflow.extra.stopWorkflow", "Stop workflow") : t("workflow.extra.deleteRun.progress", "Delete run…")
|
|
2710
2710
|
})]
|
|
2711
2711
|
})]
|
|
2712
2712
|
}) : null] })
|
|
2713
2713
|
});
|
|
2714
2714
|
}
|
|
2715
|
-
const styles$
|
|
2715
|
+
const styles$8 = StyleSheet.create((theme) => {
|
|
2716
2716
|
const text = {
|
|
2717
2717
|
fontFamily: fontOf(theme.fontFamily.sans),
|
|
2718
2718
|
fontSize: theme.fontSize.base,
|
|
@@ -3046,10 +3046,10 @@ const DelimitedArtifact = memo(function DelimitedArtifact({ text, delimiter, ini
|
|
|
3046
3046
|
columns
|
|
3047
3047
|
]);
|
|
3048
3048
|
return /* @__PURE__ */ jsxs(View, {
|
|
3049
|
-
style: styles$
|
|
3049
|
+
style: styles$7.body,
|
|
3050
3050
|
children: [
|
|
3051
3051
|
/* @__PURE__ */ jsx(Text, {
|
|
3052
|
-
style: styles$
|
|
3052
|
+
style: styles$7.meta,
|
|
3053
3053
|
accessibilityLiveRegion: "polite",
|
|
3054
3054
|
children: t("workflow.preview.range", "Rows {rowStart}–{rows} of {rowCount} · Columns {columnStart}–{columns} of {columnCount}", {
|
|
3055
3055
|
rowStart: rows === 0 ? 0 : 1,
|
|
@@ -3061,26 +3061,26 @@ const DelimitedArtifact = memo(function DelimitedArtifact({ text, delimiter, ini
|
|
|
3061
3061
|
})
|
|
3062
3062
|
}),
|
|
3063
3063
|
/* @__PURE__ */ jsx(Text, {
|
|
3064
|
-
style: styles$
|
|
3064
|
+
style: styles$7.copy,
|
|
3065
3065
|
children: t("workflow.ui.scrollWithinThePreviewLoadMoreRowsOrColumnsWhenYouNeedThem", "Scroll within the preview. Load more rows or columns when you need them.")
|
|
3066
3066
|
}),
|
|
3067
3067
|
/* @__PURE__ */ jsx(ScrollView, {
|
|
3068
|
-
style: styles$
|
|
3068
|
+
style: styles$7.preview,
|
|
3069
3069
|
nestedScrollEnabled: true,
|
|
3070
3070
|
children: /* @__PURE__ */ jsx(ScrollView, {
|
|
3071
3071
|
horizontal: true,
|
|
3072
3072
|
children: /* @__PURE__ */ jsxs(View, { children: [/* @__PURE__ */ jsx(View, {
|
|
3073
|
-
style: styles$
|
|
3073
|
+
style: styles$7.tableRow,
|
|
3074
3074
|
children: Array.from({ length: columns }, (_, column) => /* @__PURE__ */ jsx(Text, {
|
|
3075
3075
|
selectable: true,
|
|
3076
|
-
style: styles$
|
|
3076
|
+
style: styles$7.cell,
|
|
3077
3077
|
children: t("workflow.preview.column", "Column {column}", { column: column + 1 })
|
|
3078
3078
|
}, column))
|
|
3079
3079
|
}), cells.map((values, row) => /* @__PURE__ */ jsx(View, {
|
|
3080
|
-
style: styles$
|
|
3080
|
+
style: styles$7.tableRow,
|
|
3081
3081
|
children: Array.from({ length: columns }, (_, column) => /* @__PURE__ */ jsx(Text, {
|
|
3082
3082
|
selectable: true,
|
|
3083
|
-
style: styles$
|
|
3083
|
+
style: styles$7.cell,
|
|
3084
3084
|
children: values[column] ?? ""
|
|
3085
3085
|
}, column))
|
|
3086
3086
|
}, row))] })
|
|
@@ -3109,7 +3109,7 @@ const DelimitedArtifact = memo(function DelimitedArtifact({ text, delimiter, ini
|
|
|
3109
3109
|
]
|
|
3110
3110
|
});
|
|
3111
3111
|
});
|
|
3112
|
-
const styles$
|
|
3112
|
+
const styles$7 = StyleSheet.create((theme) => ({
|
|
3113
3113
|
body: {
|
|
3114
3114
|
flex: 1,
|
|
3115
3115
|
padding: theme.spacing(4),
|
|
@@ -3211,7 +3211,7 @@ function WorkflowLauncher(props) {
|
|
|
3211
3211
|
setSelected(void 0);
|
|
3212
3212
|
}
|
|
3213
3213
|
}, workflow.path) : /* @__PURE__ */ jsxs(View, {
|
|
3214
|
-
style: styles$
|
|
3214
|
+
style: styles$6.body,
|
|
3215
3215
|
children: [
|
|
3216
3216
|
/* @__PURE__ */ jsx(Input, {
|
|
3217
3217
|
accessibilityLabel: t("workflow.ui.findAWorkflow", "Find a workflow"),
|
|
@@ -3220,13 +3220,13 @@ function WorkflowLauncher(props) {
|
|
|
3220
3220
|
placeholder: t("workflow.ui.findAWorkflow", "Find a workflow")
|
|
3221
3221
|
}),
|
|
3222
3222
|
state.warning ? /* @__PURE__ */ jsx(Text, {
|
|
3223
|
-
style: styles$
|
|
3223
|
+
style: styles$6.error,
|
|
3224
3224
|
children: state.warning
|
|
3225
3225
|
}) : null,
|
|
3226
3226
|
shown.map((item) => /* @__PURE__ */ jsx(ListRow, {
|
|
3227
3227
|
title: item.name || item.relativePath,
|
|
3228
3228
|
description: item.error !== void 0 ? /* @__PURE__ */ jsx(Text, {
|
|
3229
|
-
style: styles$
|
|
3229
|
+
style: styles$6.error,
|
|
3230
3230
|
children: item.error
|
|
3231
3231
|
}) : item.description || item.jobs.map((job) => job.name).join(", "),
|
|
3232
3232
|
trailing: item.error !== void 0 ? /* @__PURE__ */ jsx(StatusBadge, {
|
|
@@ -3276,7 +3276,7 @@ function Choice({ label, options, value, onChange }) {
|
|
|
3276
3276
|
}));
|
|
3277
3277
|
const useSegmented = options.length <= 3 && options.every((option) => option.length <= 14);
|
|
3278
3278
|
return /* @__PURE__ */ jsxs(View, {
|
|
3279
|
-
style: styles$
|
|
3279
|
+
style: styles$6.field,
|
|
3280
3280
|
children: [/* @__PURE__ */ jsx(Label, { children: label }), useSegmented ? /* @__PURE__ */ jsx(SegmentedControl, {
|
|
3281
3281
|
accessibilityLabel: label,
|
|
3282
3282
|
options: items,
|
|
@@ -3311,10 +3311,10 @@ function WorkflowLaunch({ sessionId, workflow, initialPrompt, sendSessionFrame,
|
|
|
3311
3311
|
const problems = [...launchProblems(workflow, request), ...workflow.error === void 0 ? [] : [workflow.error]];
|
|
3312
3312
|
const line = workflowLaunchLine(request);
|
|
3313
3313
|
return /* @__PURE__ */ jsxs(View, {
|
|
3314
|
-
style: styles$
|
|
3314
|
+
style: styles$6.body,
|
|
3315
3315
|
children: [
|
|
3316
3316
|
onBack ? /* @__PURE__ */ jsx(View, {
|
|
3317
|
-
style: styles$
|
|
3317
|
+
style: styles$6.launchBackRow,
|
|
3318
3318
|
children: /* @__PURE__ */ jsx(Button, {
|
|
3319
3319
|
variant: "ghost",
|
|
3320
3320
|
testID: "launch-workflow-back",
|
|
@@ -3323,20 +3323,20 @@ function WorkflowLaunch({ sessionId, workflow, initialPrompt, sendSessionFrame,
|
|
|
3323
3323
|
})
|
|
3324
3324
|
}) : null,
|
|
3325
3325
|
workflow.description ? /* @__PURE__ */ jsx(Text, {
|
|
3326
|
-
style: styles$
|
|
3326
|
+
style: styles$6.meta,
|
|
3327
3327
|
children: workflow.description
|
|
3328
3328
|
}) : null,
|
|
3329
3329
|
workflow.inputs.map((input) => {
|
|
3330
3330
|
const isBoolean = input.type === "boolean" && !input.options;
|
|
3331
3331
|
const label = `${input.name}${input.required ? t("workflow.extra.lower.required", " (required)") : ""}`;
|
|
3332
3332
|
return /* @__PURE__ */ jsx(View, {
|
|
3333
|
-
style: styles$
|
|
3333
|
+
style: styles$6.field,
|
|
3334
3334
|
children: isBoolean ? /* @__PURE__ */ jsxs(View, {
|
|
3335
|
-
style: styles$
|
|
3335
|
+
style: styles$6.switchRow,
|
|
3336
3336
|
children: [/* @__PURE__ */ jsxs(View, {
|
|
3337
|
-
style: styles$
|
|
3337
|
+
style: styles$6.switchLabel,
|
|
3338
3338
|
children: [/* @__PURE__ */ jsx(Label, { children: label }), input.description ? /* @__PURE__ */ jsx(Text, {
|
|
3339
|
-
style: styles$
|
|
3339
|
+
style: styles$6.meta,
|
|
3340
3340
|
children: input.description
|
|
3341
3341
|
}) : null]
|
|
3342
3342
|
}), /* @__PURE__ */ jsx(Switch, {
|
|
@@ -3356,12 +3356,12 @@ function WorkflowLaunch({ sessionId, workflow, initialPrompt, sendSessionFrame,
|
|
|
3356
3356
|
[input.name]: value
|
|
3357
3357
|
}))
|
|
3358
3358
|
}), input.description ? /* @__PURE__ */ jsx(Text, {
|
|
3359
|
-
style: styles$
|
|
3359
|
+
style: styles$6.meta,
|
|
3360
3360
|
children: input.description
|
|
3361
3361
|
}) : null] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3362
3362
|
/* @__PURE__ */ jsx(Label, { children: label }),
|
|
3363
3363
|
input.description ? /* @__PURE__ */ jsx(Text, {
|
|
3364
|
-
style: styles$
|
|
3364
|
+
style: styles$6.meta,
|
|
3365
3365
|
children: input.description
|
|
3366
3366
|
}) : null,
|
|
3367
3367
|
/* @__PURE__ */ jsx(Input, {
|
|
@@ -3394,38 +3394,38 @@ function WorkflowLaunch({ sessionId, workflow, initialPrompt, sendSessionFrame,
|
|
|
3394
3394
|
onChange: setChoice
|
|
3395
3395
|
}) : null,
|
|
3396
3396
|
/* @__PURE__ */ jsxs(View, {
|
|
3397
|
-
style: styles$
|
|
3397
|
+
style: styles$6.field,
|
|
3398
3398
|
children: [/* @__PURE__ */ jsx(Label, { children: needsPrompt ? t("workflow.ui.promptRequired", "Prompt (required)") : t("workflow.ui.promptOptional", "Prompt (optional)") }), /* @__PURE__ */ jsx(Textarea, {
|
|
3399
3399
|
accessibilityLabel: t("workflow.ui.workflowPrompt", "Workflow prompt"),
|
|
3400
3400
|
placeholder: t("workflow.ui.whatShouldThisWorkflowDo", "What should this workflow do?"),
|
|
3401
3401
|
rows: 4,
|
|
3402
|
-
style: styles$
|
|
3402
|
+
style: styles$6.promptArea,
|
|
3403
3403
|
value: prompt,
|
|
3404
3404
|
onChangeText: setPrompt
|
|
3405
3405
|
})]
|
|
3406
3406
|
}),
|
|
3407
3407
|
/* @__PURE__ */ jsxs(View, {
|
|
3408
|
-
style: styles$
|
|
3408
|
+
style: styles$6.field,
|
|
3409
3409
|
children: [/* @__PURE__ */ jsx(Label, { children: t("workflow.ui.commandPreview", "Command preview") }), /* @__PURE__ */ jsx(CodeBlock, { text: line })]
|
|
3410
3410
|
}),
|
|
3411
3411
|
problems.map((problem) => /* @__PURE__ */ jsx(Text, {
|
|
3412
|
-
style: styles$
|
|
3412
|
+
style: styles$6.meta,
|
|
3413
3413
|
children: problem
|
|
3414
3414
|
}, problem)),
|
|
3415
3415
|
error ? /* @__PURE__ */ jsx(Text, {
|
|
3416
|
-
style: styles$
|
|
3416
|
+
style: styles$6.error,
|
|
3417
3417
|
children: error
|
|
3418
3418
|
}) : null,
|
|
3419
3419
|
/* @__PURE__ */ jsxs(View, {
|
|
3420
|
-
style: styles$
|
|
3420
|
+
style: styles$6.launchFooter,
|
|
3421
3421
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
3422
3422
|
variant: "outline",
|
|
3423
|
-
style: styles$
|
|
3423
|
+
style: styles$6.launchButton,
|
|
3424
3424
|
onPress: onClose,
|
|
3425
3425
|
children: t("workflow.ui.cancel", "Cancel")
|
|
3426
3426
|
}), /* @__PURE__ */ jsx(Button, {
|
|
3427
3427
|
variant: "primary",
|
|
3428
|
-
style: styles$
|
|
3428
|
+
style: styles$6.launchButton,
|
|
3429
3429
|
testID: "launch-workflow-submit",
|
|
3430
3430
|
disabled: problems.length > 0,
|
|
3431
3431
|
onPress: () => {
|
|
@@ -3449,7 +3449,7 @@ function WorkflowPanel(props) {
|
|
|
3449
3449
|
const identity = props.identity ?? state.focusedRun;
|
|
3450
3450
|
const run = state.runs.find((item) => workflowRunIdentity(item) === identity) ?? (props.identity === void 0 ? state.runs[0] : void 0);
|
|
3451
3451
|
if (props.identity !== void 0 && !run) return /* @__PURE__ */ jsx(Text, {
|
|
3452
|
-
style: styles$
|
|
3452
|
+
style: styles$6.meta,
|
|
3453
3453
|
children: t("workflow.ui.thisRunIsNoLongerListed", "This run is no longer listed.")
|
|
3454
3454
|
});
|
|
3455
3455
|
return /* @__PURE__ */ jsx(WorkflowRunPanel, {
|
|
@@ -3624,9 +3624,9 @@ function WorkflowStep({ sessionId, workspace, runKey, job, step, renderSessionTr
|
|
|
3624
3624
|
target
|
|
3625
3625
|
]);
|
|
3626
3626
|
return /* @__PURE__ */ jsxs(View, {
|
|
3627
|
-
style: styles$
|
|
3627
|
+
style: styles$6.screen,
|
|
3628
3628
|
children: [/* @__PURE__ */ jsxs(Text, {
|
|
3629
|
-
style: styles$
|
|
3629
|
+
style: styles$6.title,
|
|
3630
3630
|
children: [
|
|
3631
3631
|
job,
|
|
3632
3632
|
step === void 0 ? "" : ` › ${step}`,
|
|
@@ -3733,10 +3733,10 @@ function WorkflowTerminal({ sessionId, workspace, runKey, pane, renderRunnerTerm
|
|
|
3733
3733
|
}
|
|
3734
3734
|
};
|
|
3735
3735
|
return /* @__PURE__ */ jsxs(View, {
|
|
3736
|
-
style: styles$
|
|
3736
|
+
style: styles$6.transcript,
|
|
3737
3737
|
children: [
|
|
3738
3738
|
/* @__PURE__ */ jsxs(View, {
|
|
3739
|
-
style: styles$
|
|
3739
|
+
style: styles$6.terminalBar,
|
|
3740
3740
|
children: [/* @__PURE__ */ jsx(Badge, { children: token ? t("workflow.extra.lower.keyboardYours", "keyboard yours") : t("workflow.extra.lower.watching", "watching") }), capabilities?.writable ? /* @__PURE__ */ jsx(Button, {
|
|
3741
3741
|
variant: "outline",
|
|
3742
3742
|
disabled: busy,
|
|
@@ -3748,7 +3748,7 @@ function WorkflowTerminal({ sessionId, workspace, runKey, pane, renderRunnerTerm
|
|
|
3748
3748
|
}) : null]
|
|
3749
3749
|
}),
|
|
3750
3750
|
/* @__PURE__ */ jsx(View, {
|
|
3751
|
-
style: styles$
|
|
3751
|
+
style: styles$6.transcript,
|
|
3752
3752
|
onLayout: (event) => {
|
|
3753
3753
|
const { width, height } = event.nativeEvent.layout;
|
|
3754
3754
|
if (width <= 0 || height <= 0) return;
|
|
@@ -3761,19 +3761,19 @@ function WorkflowTerminal({ sessionId, workspace, runKey, pane, renderRunnerTerm
|
|
|
3761
3761
|
},
|
|
3762
3762
|
children: /* @__PURE__ */ jsx(ScrollView, {
|
|
3763
3763
|
horizontal: true,
|
|
3764
|
-
contentContainerStyle: styles$
|
|
3764
|
+
contentContainerStyle: styles$6.terminalScroll,
|
|
3765
3765
|
children: /* @__PURE__ */ jsx(View, {
|
|
3766
|
-
style: styles$
|
|
3766
|
+
style: styles$6.transcript,
|
|
3767
3767
|
children: renderRunnerTerminal?.(request)
|
|
3768
3768
|
})
|
|
3769
3769
|
})
|
|
3770
3770
|
}),
|
|
3771
3771
|
capabilities?.reason ? /* @__PURE__ */ jsx(Text, {
|
|
3772
|
-
style: styles$
|
|
3772
|
+
style: styles$6.meta,
|
|
3773
3773
|
children: capabilities.reason
|
|
3774
3774
|
}) : null,
|
|
3775
3775
|
notice ? /* @__PURE__ */ jsx(Text, {
|
|
3776
|
-
style: styles$
|
|
3776
|
+
style: styles$6.meta,
|
|
3777
3777
|
children: notice
|
|
3778
3778
|
}) : null
|
|
3779
3779
|
]
|
|
@@ -3961,7 +3961,7 @@ function ArtifactPreview({ sessionId, workspace, runKey, path, renderFilePreview
|
|
|
3961
3961
|
const delimited = !raw && content?.text !== void 0 && /\.(csv|tsv)$/i.test(path);
|
|
3962
3962
|
const preview = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3963
3963
|
/* @__PURE__ */ jsx(Text, {
|
|
3964
|
-
style: styles$
|
|
3964
|
+
style: styles$6.title,
|
|
3965
3965
|
children: path
|
|
3966
3966
|
}),
|
|
3967
3967
|
versions.length > 0 ? /* @__PURE__ */ jsx(Select, {
|
|
@@ -3993,14 +3993,14 @@ function ArtifactPreview({ sessionId, workspace, runKey, path, renderFilePreview
|
|
|
3993
3993
|
]
|
|
3994
3994
|
}) : null,
|
|
3995
3995
|
saveNote ? /* @__PURE__ */ jsx(Text, {
|
|
3996
|
-
style: styles$
|
|
3996
|
+
style: styles$6.meta,
|
|
3997
3997
|
children: saveNote
|
|
3998
3998
|
}) : null,
|
|
3999
3999
|
error ? /* @__PURE__ */ jsxs(View, {
|
|
4000
|
-
style: styles$
|
|
4000
|
+
style: styles$6.field,
|
|
4001
4001
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
4002
4002
|
accessibilityRole: "alert",
|
|
4003
|
-
style: styles$
|
|
4003
|
+
style: styles$6.error,
|
|
4004
4004
|
children: error
|
|
4005
4005
|
}), /* @__PURE__ */ jsx(Button, {
|
|
4006
4006
|
variant: "outline",
|
|
@@ -4022,7 +4022,7 @@ function ArtifactPreview({ sessionId, workspace, runKey, path, renderFilePreview
|
|
|
4022
4022
|
delimiter: /\.csv$/i.test(path) ? "," : " "
|
|
4023
4023
|
}) : /* @__PURE__ */ jsx(CodeBlock, { text: !raw && /\.json$/i.test(path) ? prettyJson(content.text) : content.text }),
|
|
4024
4024
|
content.truncated ? /* @__PURE__ */ jsx(Text, {
|
|
4025
|
-
style: styles$
|
|
4025
|
+
style: styles$6.meta,
|
|
4026
4026
|
children: t("workflow.ui.thisPreviewWasTruncated", "This preview was truncated.")
|
|
4027
4027
|
}) : null
|
|
4028
4028
|
] }) : content ? /* @__PURE__ */ jsx(BinaryArtifactPreview, {
|
|
@@ -4032,15 +4032,15 @@ function ArtifactPreview({ sessionId, workspace, runKey, path, renderFilePreview
|
|
|
4032
4032
|
path,
|
|
4033
4033
|
renderMediaPreview
|
|
4034
4034
|
}) : /* @__PURE__ */ jsx(Text, {
|
|
4035
|
-
style: styles$
|
|
4035
|
+
style: styles$6.meta,
|
|
4036
4036
|
children: t("workflow.ui.loadingPreview", "Loading preview…")
|
|
4037
4037
|
})
|
|
4038
4038
|
] });
|
|
4039
4039
|
return delimited ? /* @__PURE__ */ jsx(View, {
|
|
4040
|
-
style: [styles$
|
|
4040
|
+
style: [styles$6.body, styles$6.transcript],
|
|
4041
4041
|
children: preview
|
|
4042
4042
|
}) : /* @__PURE__ */ jsx(ScrollView, {
|
|
4043
|
-
contentContainerStyle: styles$
|
|
4043
|
+
contentContainerStyle: styles$6.body,
|
|
4044
4044
|
children: preview
|
|
4045
4045
|
});
|
|
4046
4046
|
}
|
|
@@ -4082,7 +4082,7 @@ function BinaryArtifactPreview({ sessionId, workspace, runKey, path, renderMedia
|
|
|
4082
4082
|
title: path,
|
|
4083
4083
|
path
|
|
4084
4084
|
}) : /* @__PURE__ */ jsx(Text, {
|
|
4085
|
-
style: styles$
|
|
4085
|
+
style: styles$6.meta,
|
|
4086
4086
|
children: error ?? t("workflow.ui.loadingPreview", "Loading preview…")
|
|
4087
4087
|
});
|
|
4088
4088
|
}
|
|
@@ -4093,7 +4093,7 @@ function prettyJson(text) {
|
|
|
4093
4093
|
return text;
|
|
4094
4094
|
}
|
|
4095
4095
|
}
|
|
4096
|
-
const styles$
|
|
4096
|
+
const styles$6 = StyleSheet.create((theme) => ({
|
|
4097
4097
|
screen: {
|
|
4098
4098
|
flex: 1,
|
|
4099
4099
|
backgroundColor: theme.colors.bg,
|
|
@@ -4272,9 +4272,9 @@ function StepParentFill({ sessionId, sessionContext, openSession, holdSessionCha
|
|
|
4272
4272
|
const owner = place?.run.ownerSessionId ?? sessionContext.parentSessionId;
|
|
4273
4273
|
return /* @__PURE__ */ jsx(View, {
|
|
4274
4274
|
testID: "step-parent-strip",
|
|
4275
|
-
style: styles$
|
|
4275
|
+
style: styles$5.strip,
|
|
4276
4276
|
children: place === void 0 ? /* @__PURE__ */ jsxs(Text, {
|
|
4277
|
-
style: styles$
|
|
4277
|
+
style: styles$5.text,
|
|
4278
4278
|
numberOfLines: 1,
|
|
4279
4279
|
children: [
|
|
4280
4280
|
" ",
|
|
@@ -4282,13 +4282,13 @@ function StepParentFill({ sessionId, sessionContext, openSession, holdSessionCha
|
|
|
4282
4282
|
" "
|
|
4283
4283
|
]
|
|
4284
4284
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Text, {
|
|
4285
|
-
style: styles$
|
|
4285
|
+
style: styles$5.text,
|
|
4286
4286
|
numberOfLines: 1,
|
|
4287
4287
|
children: [
|
|
4288
4288
|
t("workflow.ui.stepOf", "Step of"),
|
|
4289
4289
|
" ",
|
|
4290
4290
|
/* @__PURE__ */ jsx(Text, {
|
|
4291
|
-
style: styles$
|
|
4291
|
+
style: styles$5.name,
|
|
4292
4292
|
children: place.run.displayName
|
|
4293
4293
|
}),
|
|
4294
4294
|
" ·",
|
|
@@ -4304,13 +4304,13 @@ function StepParentFill({ sessionId, sessionContext, openSession, holdSessionCha
|
|
|
4304
4304
|
openSession(owner);
|
|
4305
4305
|
},
|
|
4306
4306
|
children: /* @__PURE__ */ jsx(Text, {
|
|
4307
|
-
style: styles$
|
|
4307
|
+
style: styles$5.back,
|
|
4308
4308
|
children: t("workflow.ui.backToRun", "Back to run")
|
|
4309
4309
|
})
|
|
4310
4310
|
})] })
|
|
4311
4311
|
});
|
|
4312
4312
|
}
|
|
4313
|
-
const styles$
|
|
4313
|
+
const styles$5 = StyleSheet.create((theme) => ({
|
|
4314
4314
|
strip: {
|
|
4315
4315
|
flexDirection: "row",
|
|
4316
4316
|
alignItems: "center",
|
|
@@ -4481,12 +4481,12 @@ function WorkflowsActivitySection({ sessionId, openSession, openTransientTab, se
|
|
|
4481
4481
|
alignItems: "center"
|
|
4482
4482
|
},
|
|
4483
4483
|
children: [/* @__PURE__ */ jsxs(Text, {
|
|
4484
|
-
style: styles$
|
|
4484
|
+
style: styles$4.status,
|
|
4485
4485
|
children: [row.detail, " · "]
|
|
4486
4486
|
}), /* @__PURE__ */ jsx(WorkflowDuration, {
|
|
4487
4487
|
startedAt: row.startedAt,
|
|
4488
4488
|
endedAt: row.finishedAt,
|
|
4489
|
-
style: styles$
|
|
4489
|
+
style: styles$4.status
|
|
4490
4490
|
})]
|
|
4491
4491
|
})
|
|
4492
4492
|
}, row.identity)) : null] }, group.name);
|
|
@@ -4494,7 +4494,7 @@ function WorkflowsActivitySection({ sessionId, openSession, openTransientTab, se
|
|
|
4494
4494
|
dynamicRuns.length > 0 ? /* @__PURE__ */ jsxs(View, {
|
|
4495
4495
|
testID: "activity-dynamic-workflows",
|
|
4496
4496
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
4497
|
-
style: styles$
|
|
4497
|
+
style: styles$4.heading,
|
|
4498
4498
|
children: t("workflow.ui.dynamic", "Dynamic")
|
|
4499
4499
|
}), /* @__PURE__ */ jsx(DynamicWorkflowActivity, {
|
|
4500
4500
|
runs: dynamicRuns,
|
|
@@ -4502,9 +4502,9 @@ function WorkflowsActivitySection({ sessionId, openSession, openTransientTab, se
|
|
|
4502
4502
|
})]
|
|
4503
4503
|
}) : null,
|
|
4504
4504
|
/* @__PURE__ */ jsxs(View, {
|
|
4505
|
-
style: styles$
|
|
4505
|
+
style: styles$4.idle,
|
|
4506
4506
|
children: [groups.length === 0 && dynamicRuns.length === 0 && state.pendingLaunch === void 0 ? /* @__PURE__ */ jsx(Text, {
|
|
4507
|
-
style: styles$
|
|
4507
|
+
style: styles$4.status,
|
|
4508
4508
|
children: t("workflow.ui.idle", "Idle")
|
|
4509
4509
|
}) : null, /* @__PURE__ */ jsxs(Pressable, {
|
|
4510
4510
|
accessibilityRole: "button",
|
|
@@ -4515,9 +4515,9 @@ function WorkflowsActivitySection({ sessionId, openSession, openTransientTab, se
|
|
|
4515
4515
|
onPress: () => {
|
|
4516
4516
|
if (sessionId !== null) openCatalog(sessionId);
|
|
4517
4517
|
},
|
|
4518
|
-
style: styles$
|
|
4518
|
+
style: styles$4.action,
|
|
4519
4519
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
4520
|
-
style: styles$
|
|
4520
|
+
style: styles$4.actionText(sessionId === null),
|
|
4521
4521
|
children: t("workflow.ui.launchAWorkflow", "Launch a workflow")
|
|
4522
4522
|
}), /* @__PURE__ */ jsx(ArrowRightIcon, {
|
|
4523
4523
|
size: 14,
|
|
@@ -4527,7 +4527,7 @@ function WorkflowsActivitySection({ sessionId, openSession, openTransientTab, se
|
|
|
4527
4527
|
})
|
|
4528
4528
|
] });
|
|
4529
4529
|
}
|
|
4530
|
-
const styles$
|
|
4530
|
+
const styles$4 = StyleSheet.create((theme) => ({
|
|
4531
4531
|
idle: {
|
|
4532
4532
|
flexDirection: "row",
|
|
4533
4533
|
alignItems: "center",
|
|
@@ -4570,6 +4570,232 @@ const styles$3 = StyleSheet.create((theme) => ({
|
|
|
4570
4570
|
//#region src/extensions/workspaces/sessions/(frontend)/fill/Workflows.activity.workflows.native.tsx
|
|
4571
4571
|
var Workflows_activity_workflows_native_default = defineFill({ component: WorkflowsActivitySection });
|
|
4572
4572
|
//#endregion
|
|
4573
|
+
//#region src/extensions/workspaces/sessions/(frontend)/_lib/workflowArtifactSource.ts
|
|
4574
|
+
/** The folder of the session artifact folder every run's directory sits under. */
|
|
4575
|
+
const WORKFLOW_ARTIFACT_FOLDER = "workflows";
|
|
4576
|
+
/** Files the engine keeps beside a run's output; the person reads the jobs' declared files instead. */
|
|
4577
|
+
const BOOKKEEPING_FILES = /* @__PURE__ */ new Set([
|
|
4578
|
+
"run.json",
|
|
4579
|
+
"context.md",
|
|
4580
|
+
"changelog.md",
|
|
4581
|
+
"fix.md"
|
|
4582
|
+
]);
|
|
4583
|
+
const ACTIVE_JOB_STATES = /* @__PURE__ */ new Set([
|
|
4584
|
+
"running",
|
|
4585
|
+
"resumed",
|
|
4586
|
+
"pause_requested",
|
|
4587
|
+
"paused"
|
|
4588
|
+
]);
|
|
4589
|
+
/** Failures first, then gentle asks, then work in progress, then finished runs. */
|
|
4590
|
+
const RUN_STATE_ORDER = [
|
|
4591
|
+
"failed",
|
|
4592
|
+
"waiting",
|
|
4593
|
+
"running",
|
|
4594
|
+
"done"
|
|
4595
|
+
];
|
|
4596
|
+
function artifactRunState(run) {
|
|
4597
|
+
if (run.waiting) return "waiting";
|
|
4598
|
+
if (run.stage === "error" || run.outcome === "failed") return "failed";
|
|
4599
|
+
if (run.stage === "running") return "running";
|
|
4600
|
+
return "done";
|
|
4601
|
+
}
|
|
4602
|
+
function jobState(run, job) {
|
|
4603
|
+
if (job.status === "pending") return "pending";
|
|
4604
|
+
if (run.waiting && (ACTIVE_JOB_STATES.has(job.status) || job.status === "failed")) return "waiting";
|
|
4605
|
+
if (ACTIVE_JOB_STATES.has(job.status)) return "running";
|
|
4606
|
+
if (job.status === "failed") return "failed";
|
|
4607
|
+
return "done";
|
|
4608
|
+
}
|
|
4609
|
+
const sentenceCase = (text) => text.charAt(0).toUpperCase() + text.slice(1);
|
|
4610
|
+
const folderOf = (workspace, runKey) => `${workspace}/${runKey}`;
|
|
4611
|
+
/** `workflows/<workspace>/<runKey>/<rest>` split into its run folder and the path inside it. */
|
|
4612
|
+
function runPathOf(item) {
|
|
4613
|
+
const [root, workspace, runKey, ...rest] = item.path.split("/");
|
|
4614
|
+
return root === "workflows" && workspace && runKey && rest.length > 0 ? {
|
|
4615
|
+
folder: folderOf(workspace, runKey),
|
|
4616
|
+
runKey,
|
|
4617
|
+
inner: rest.join("/")
|
|
4618
|
+
} : void 0;
|
|
4619
|
+
}
|
|
4620
|
+
/**
|
|
4621
|
+
* The session's runs as the Workflows section shows them: each job's declared files matched to
|
|
4622
|
+
* `workflows/<workspace>/<runKey>/<artifact>`, and the files of folders no run reports. A finished run with
|
|
4623
|
+
* nothing written here (one from before runs lived in the artifact folder) is left out.
|
|
4624
|
+
*/
|
|
4625
|
+
function workflowArtifactRuns(runs, items, sessionId) {
|
|
4626
|
+
const byFolder = /* @__PURE__ */ new Map();
|
|
4627
|
+
const runKeyOf = /* @__PURE__ */ new Map();
|
|
4628
|
+
for (const item of items) {
|
|
4629
|
+
const place = runPathOf(item);
|
|
4630
|
+
if (!place) continue;
|
|
4631
|
+
const files = byFolder.get(place.folder) ?? /* @__PURE__ */ new Map();
|
|
4632
|
+
files.set(place.inner, item);
|
|
4633
|
+
byFolder.set(place.folder, files);
|
|
4634
|
+
runKeyOf.set(place.folder, place.runKey);
|
|
4635
|
+
}
|
|
4636
|
+
const shown = [];
|
|
4637
|
+
const claimed = /* @__PURE__ */ new Set();
|
|
4638
|
+
for (const run of runs) {
|
|
4639
|
+
const folder = folderOf(run.workspace, run.runKey);
|
|
4640
|
+
if (claimed.has(folder) || run.ownerSessionId !== void 0 && run.ownerSessionId !== sessionId) continue;
|
|
4641
|
+
const files = byFolder.get(folder);
|
|
4642
|
+
const state = artifactRunState(run);
|
|
4643
|
+
if (files === void 0 && state === "done") continue;
|
|
4644
|
+
claimed.add(folder);
|
|
4645
|
+
shown.push({
|
|
4646
|
+
folder,
|
|
4647
|
+
title: run.displayName,
|
|
4648
|
+
workflow: run.workflowName ?? run.workflowPath.split("/").at(-1) ?? run.workflowPath,
|
|
4649
|
+
state,
|
|
4650
|
+
jobs: run.jobs.flatMap((job) => (job.artifacts ?? []).map((artifact) => {
|
|
4651
|
+
const item = files?.get(artifact);
|
|
4652
|
+
return {
|
|
4653
|
+
key: `${job.name}\0${artifact}`,
|
|
4654
|
+
label: job.artifacts.length === 1 ? sentenceCase(job.name) : `${sentenceCase(job.name)}: ${artifact}`,
|
|
4655
|
+
state: jobState(run, job),
|
|
4656
|
+
...item === void 0 ? {} : { item }
|
|
4657
|
+
};
|
|
4658
|
+
}))
|
|
4659
|
+
});
|
|
4660
|
+
}
|
|
4661
|
+
shown.sort((a, b) => RUN_STATE_ORDER.indexOf(a.state) - RUN_STATE_ORDER.indexOf(b.state));
|
|
4662
|
+
const folders = [...byFolder].filter(([folder]) => !claimed.has(folder)).map(([folder, files]) => ({
|
|
4663
|
+
folder,
|
|
4664
|
+
label: runKeyOf.get(folder),
|
|
4665
|
+
items: [...files].filter(([inner]) => !BOOKKEEPING_FILES.has(inner) && !inner.startsWith(".")).map(([, item]) => item).sort((a, b) => b.modifiedAt - a.modifiedAt)
|
|
4666
|
+
})).filter((folder) => folder.items.length > 0);
|
|
4667
|
+
const keyCounts = /* @__PURE__ */ new Map();
|
|
4668
|
+
for (const { label } of folders) keyCounts.set(label, (keyCounts.get(label) ?? 0) + 1);
|
|
4669
|
+
for (const entry of folders) if (keyCounts.get(entry.label) > 1) entry.label = entry.folder;
|
|
4670
|
+
return {
|
|
4671
|
+
runs: shown,
|
|
4672
|
+
folders
|
|
4673
|
+
};
|
|
4674
|
+
}
|
|
4675
|
+
//#endregion
|
|
4676
|
+
//#region src/extensions/workspaces/sessions/(frontend)/fill/_components/WorkflowsArtifactSource.native.tsx
|
|
4677
|
+
function RunningNativeIcon() {
|
|
4678
|
+
return /* @__PURE__ */ jsx(Spinner, { size: "small" });
|
|
4679
|
+
}
|
|
4680
|
+
/** Native Workflows section of Artifacts: one group per run, failures first, every job with what it wrote. */
|
|
4681
|
+
function WorkflowsBodyNative({ sessionId, items, Group, Row }) {
|
|
4682
|
+
const t = useT();
|
|
4683
|
+
const view = workflowArtifactRuns(useSyncExternalStore((listener) => {
|
|
4684
|
+
const subscription = workflows.store.subscribe(listener);
|
|
4685
|
+
return () => subscription.unsubscribe();
|
|
4686
|
+
}, () => workflows.select(workflows.store.state, sessionId).runs), items, sessionId);
|
|
4687
|
+
if (view.runs.length === 0 && view.folders.length === 0) return null;
|
|
4688
|
+
const runMeta = {
|
|
4689
|
+
running: t("workflow.artifacts.running", "Running"),
|
|
4690
|
+
waiting: t("workflow.artifacts.waiting", "Waiting for you"),
|
|
4691
|
+
failed: t("workflow.artifacts.failed", "Failed"),
|
|
4692
|
+
done: t("workflow.artifacts.done", "Done")
|
|
4693
|
+
};
|
|
4694
|
+
const emptyJob = {
|
|
4695
|
+
pending: t("workflow.artifacts.pending", "Not started"),
|
|
4696
|
+
running: t("workflow.artifacts.running", "Running"),
|
|
4697
|
+
waiting: t("workflow.artifacts.waiting", "Waiting for you"),
|
|
4698
|
+
failed: t("workflow.artifacts.failed", "Failed"),
|
|
4699
|
+
done: t("workflow.artifacts.noFiles", "No files")
|
|
4700
|
+
};
|
|
4701
|
+
return /* @__PURE__ */ jsxs(View, {
|
|
4702
|
+
style: styles$3.stack,
|
|
4703
|
+
children: [view.runs.map((run) => /* @__PURE__ */ jsx(Group, {
|
|
4704
|
+
title: run.title,
|
|
4705
|
+
meta: runMeta[run.state],
|
|
4706
|
+
children: /* @__PURE__ */ jsx(View, {
|
|
4707
|
+
style: styles$3.list,
|
|
4708
|
+
children: run.jobs.map((job) => {
|
|
4709
|
+
if (!job.item || job.state === "pending") return /* @__PURE__ */ jsxs(View, {
|
|
4710
|
+
style: styles$3.emptyJobRow,
|
|
4711
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
4712
|
+
numberOfLines: 1,
|
|
4713
|
+
style: styles$3.emptyLabel,
|
|
4714
|
+
children: job.label
|
|
4715
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
4716
|
+
style: styles$3.emptyMeta,
|
|
4717
|
+
children: emptyJob[job.state]
|
|
4718
|
+
})]
|
|
4719
|
+
}, job.key);
|
|
4720
|
+
const badge = job.state === "running" ? /* @__PURE__ */ jsx(Badge, {
|
|
4721
|
+
tone: "green",
|
|
4722
|
+
children: t("workflow.ui.writing", "Writing")
|
|
4723
|
+
}) : job.state === "waiting" ? /* @__PURE__ */ jsx(Badge, {
|
|
4724
|
+
tone: "yellow",
|
|
4725
|
+
children: t("workflow.ui.review", "Review")
|
|
4726
|
+
}) : job.state === "failed" ? /* @__PURE__ */ jsx(Badge, {
|
|
4727
|
+
tone: "red",
|
|
4728
|
+
children: t("workflow.ui.failed", "Failed")
|
|
4729
|
+
}) : void 0;
|
|
4730
|
+
return /* @__PURE__ */ jsx(Row, {
|
|
4731
|
+
item: job.item,
|
|
4732
|
+
label: job.label,
|
|
4733
|
+
icon: job.state === "running" ? RunningNativeIcon : void 0,
|
|
4734
|
+
badge
|
|
4735
|
+
}, job.key);
|
|
4736
|
+
})
|
|
4737
|
+
})
|
|
4738
|
+
}, run.folder)), view.folders.map((folder) => /* @__PURE__ */ jsx(Group, {
|
|
4739
|
+
title: folder.label,
|
|
4740
|
+
children: /* @__PURE__ */ jsx(View, {
|
|
4741
|
+
style: styles$3.list,
|
|
4742
|
+
children: folder.items.map((item) => /* @__PURE__ */ jsx(Row, {
|
|
4743
|
+
item,
|
|
4744
|
+
label: item.name
|
|
4745
|
+
}, item.path))
|
|
4746
|
+
})
|
|
4747
|
+
}, folder.folder))]
|
|
4748
|
+
});
|
|
4749
|
+
}
|
|
4750
|
+
const styles$3 = StyleSheet.create((theme) => ({
|
|
4751
|
+
stack: {
|
|
4752
|
+
gap: theme.spacing(4),
|
|
4753
|
+
uni__dependencies: [0]
|
|
4754
|
+
},
|
|
4755
|
+
list: {
|
|
4756
|
+
gap: theme.spacing(1),
|
|
4757
|
+
uni__dependencies: [0]
|
|
4758
|
+
},
|
|
4759
|
+
emptyJobRow: {
|
|
4760
|
+
minHeight: 44,
|
|
4761
|
+
flexDirection: "row",
|
|
4762
|
+
alignItems: "center",
|
|
4763
|
+
justifyContent: "space-between",
|
|
4764
|
+
paddingHorizontal: theme.spacing(3),
|
|
4765
|
+
borderRadius: theme.borderRadius.md,
|
|
4766
|
+
borderWidth: 1,
|
|
4767
|
+
borderColor: theme.colors["border-soft"],
|
|
4768
|
+
uni__dependencies: [0]
|
|
4769
|
+
},
|
|
4770
|
+
emptyLabel: {
|
|
4771
|
+
flex: 1,
|
|
4772
|
+
fontFamily: fontOf(theme.fontFamily.sans),
|
|
4773
|
+
fontSize: theme.fontSize.sm,
|
|
4774
|
+
color: theme.colors.dim,
|
|
4775
|
+
uni__dependencies: [0]
|
|
4776
|
+
},
|
|
4777
|
+
emptyMeta: {
|
|
4778
|
+
fontFamily: fontOf(theme.fontFamily.sans),
|
|
4779
|
+
fontSize: theme.fontSize.xs,
|
|
4780
|
+
color: theme.colors.dim,
|
|
4781
|
+
uni__dependencies: [0]
|
|
4782
|
+
}
|
|
4783
|
+
}));
|
|
4784
|
+
//#endregion
|
|
4785
|
+
//#region src/extensions/workspaces/sessions/(frontend)/fill/Workflows.artifacts.source.native.tsx
|
|
4786
|
+
/** Fills slot `artifacts.source` on native: workflow runs and the files their jobs write. */
|
|
4787
|
+
var Workflows_artifacts_source_native_default = defineFill({
|
|
4788
|
+
slot: "artifacts.source",
|
|
4789
|
+
id: "workflows",
|
|
4790
|
+
data: {
|
|
4791
|
+
version: 1,
|
|
4792
|
+
label: "Workflows",
|
|
4793
|
+
icon: WorkflowIcon,
|
|
4794
|
+
folders: [WORKFLOW_ARTIFACT_FOLDER],
|
|
4795
|
+
panel: WorkflowsBodyNative
|
|
4796
|
+
}
|
|
4797
|
+
});
|
|
4798
|
+
//#endregion
|
|
4573
4799
|
//#region src/extensions/workspaces/sessions/(frontend)/fill/Workflows.help.guides.native.ts
|
|
4574
4800
|
var Workflows_help_guides_native_default = defineFill({
|
|
4575
4801
|
slot: "help.guides",
|
|
@@ -6254,6 +6480,10 @@ const nativePlugin = defineNativePlugin({
|
|
|
6254
6480
|
slot: "activity.workflows",
|
|
6255
6481
|
id: "workflows"
|
|
6256
6482
|
}, Workflows_activity_workflows_native_default),
|
|
6483
|
+
via({
|
|
6484
|
+
slot: "artifacts.source",
|
|
6485
|
+
id: "workflows"
|
|
6486
|
+
}, Workflows_artifacts_source_native_default),
|
|
6257
6487
|
via({
|
|
6258
6488
|
slot: "help.guides",
|
|
6259
6489
|
id: "workflows"
|