@harness-lab/cli 0.4.0 → 0.4.1
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
CHANGED
package/src/run-cli.js
CHANGED
|
@@ -879,11 +879,19 @@ async function handleWorkshopShowInstance(io, ui, env, positionals, flags, deps)
|
|
|
879
879
|
|
|
880
880
|
try {
|
|
881
881
|
const client = createHarnessClient({ fetchFn: deps.fetchFn, session });
|
|
882
|
-
const result = await
|
|
882
|
+
const [result, agenda] = await Promise.all([
|
|
883
|
+
client.getWorkshopInstance(instanceId),
|
|
884
|
+
client.getWorkshopAgenda(instanceId).catch(() => null),
|
|
885
|
+
]);
|
|
883
886
|
ui.json("Workshop Instance", {
|
|
884
887
|
ok: true,
|
|
885
888
|
...summarizeWorkshopInstance(result.instance),
|
|
886
889
|
instance: result.instance,
|
|
890
|
+
contentSummary: agenda ? {
|
|
891
|
+
phases: Array.isArray(agenda.items) ? agenda.items.length : 0,
|
|
892
|
+
scenes: Array.isArray(agenda.items) ? agenda.items.reduce((sum, item) => sum + (item.presenterScenes?.length ?? 0), 0) : 0,
|
|
893
|
+
currentPhase: agenda.phase ?? null,
|
|
894
|
+
} : null,
|
|
887
895
|
});
|
|
888
896
|
return 0;
|
|
889
897
|
} catch (error) {
|
|
@@ -1118,6 +1126,10 @@ async function handleWorkshopResetInstance(io, ui, env, positionals, flags, deps
|
|
|
1118
1126
|
readStringFlag(flags, "template-id", "template"),
|
|
1119
1127
|
);
|
|
1120
1128
|
ui.json("Workshop Reset Instance", result);
|
|
1129
|
+
if (result.contentSummary) {
|
|
1130
|
+
const s = result.contentSummary;
|
|
1131
|
+
ui.status("ok", `Reset ${instanceId}: ${s.phases} phases, ${s.scenes} scenes, ${s.briefs} briefs, ${s.challenges} challenges`);
|
|
1132
|
+
}
|
|
1121
1133
|
return 0;
|
|
1122
1134
|
} catch (error) {
|
|
1123
1135
|
if (error instanceof HarnessApiError) {
|