opencode-work-context 0.10.2 → 0.10.3
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/package.json +1 -1
- package/plugin/stages-tui.js +22 -19
package/package.json
CHANGED
package/plugin/stages-tui.js
CHANGED
|
@@ -49,6 +49,11 @@ const deliverySummaryText = (workspace) => {
|
|
|
49
49
|
const pending = delivery.environments.reduce((total, environment) => total + environment.pending, 0);
|
|
50
50
|
return `Delivery · ${delivery.environments.length} environments · ${pending} tracked pending`;
|
|
51
51
|
};
|
|
52
|
+
const workspaceSummaryText = (workspace, attention) => [
|
|
53
|
+
attention && `Attention · ${attention}`,
|
|
54
|
+
candidateSummaryText(workspace),
|
|
55
|
+
deliverySummaryText(workspace),
|
|
56
|
+
].filter(Boolean).join(" · ");
|
|
52
57
|
const stageCandidateText = (stage) => {
|
|
53
58
|
const projection = stage.candidates;
|
|
54
59
|
if (!projection || !(projection.draft || projection.ready)) return null;
|
|
@@ -78,17 +83,16 @@ const renderStagesContent = (result, theme, runtime = defaultRuntime, attention,
|
|
|
78
83
|
];
|
|
79
84
|
const attentionSnapshot = visibleAttentionSnapshot(attention, result.data.workspace.id, result.data.stages);
|
|
80
85
|
const workspaceAttention = attentionSummaryText(attentionSnapshot.workspace, { alwaysCount: true });
|
|
86
|
+
const workspaceSummary = workspaceSummaryText(result.data.workspace, workspaceAttention);
|
|
81
87
|
return [
|
|
82
88
|
runtime.jsx("box", {
|
|
83
89
|
marginBottom: 1,
|
|
84
90
|
flexDirection: "column",
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
deliverySummaryText(result.data.workspace) && runtime.jsx("text", { fg: theme?.current?.textMuted, children: deliverySummaryText(result.data.workspace) }),
|
|
91
|
-
].filter(Boolean),
|
|
91
|
+
children: [
|
|
92
|
+
runtime.jsx("text", { wrapMode: "word", children: runtime.jsx("b", { children: result.data.workspace.title }) }),
|
|
93
|
+
runtime.jsx("text", { fg: theme?.current?.textMuted, children: `Workflow · ${result.data.workspace.mode || "standard"}` }),
|
|
94
|
+
workspaceSummary && runtime.jsx("text", { wrapMode: "word", fg: theme?.current?.textMuted, children: workspaceSummary }),
|
|
95
|
+
].filter(Boolean),
|
|
92
96
|
}),
|
|
93
97
|
runtime.jsx("box", {
|
|
94
98
|
flexDirection: "row",
|
|
@@ -114,7 +118,7 @@ const renderStagesContent = (result, theme, runtime = defaultRuntime, attention,
|
|
|
114
118
|
if (event?.button != null && event.button !== 0) return;
|
|
115
119
|
return onStageSelect?.(stage);
|
|
116
120
|
};
|
|
117
|
-
const
|
|
121
|
+
const stageRow = runtime.jsx("box", {
|
|
118
122
|
flexDirection: "row",
|
|
119
123
|
onMouseDown,
|
|
120
124
|
children: [
|
|
@@ -125,19 +129,18 @@ const renderStagesContent = (result, theme, runtime = defaultRuntime, attention,
|
|
|
125
129
|
children: working ? activityFrame() : attentionSignal ? runtime.jsx("b", { children: attentionSignal }) : " ",
|
|
126
130
|
}),
|
|
127
131
|
runtime.jsx("text", { flexShrink: 0, marginRight: 1, fg: current ? theme?.current?.warning : theme?.current?.textMuted, children: statusMarker(stage.status) }),
|
|
128
|
-
runtime.jsx("
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
runtime.jsx("text", { flexGrow: 1, flexShrink: 1, wrapMode: "word", fg: theme?.current?.textMuted, children: metadata }),
|
|
132
|
+
runtime.jsx("box", {
|
|
133
|
+
flexGrow: 1,
|
|
134
|
+
flexShrink: 1,
|
|
135
|
+
flexDirection: "column",
|
|
136
|
+
children: [
|
|
137
|
+
runtime.jsx("text", { wrapMode: "word", fg: current ? theme?.current?.warning : theme?.current?.text, children: `${stage.id}. ${stage.title}` }),
|
|
138
|
+
metadata && runtime.jsx("text", { wrapMode: "word", fg: theme?.current?.textMuted, children: metadata }),
|
|
139
|
+
].filter(Boolean),
|
|
140
|
+
}),
|
|
138
141
|
],
|
|
139
142
|
});
|
|
140
|
-
return
|
|
143
|
+
return stageRow;
|
|
141
144
|
}),
|
|
142
145
|
];
|
|
143
146
|
};
|