feat(workflow): add end-to-end workflow debug test command and condition branch explanation
This commit is contained in:
1 parent
26a6b7318c
commit
fe6183dd44
13 files changed
+1026
-3
No files matched your search
@@ -17,8 +17,15 @@ export async function createWorkflowDetailClient(
|
||||
const explicit = stringOption(parsed.options, PLATFORM_ID_OPTION_KEYS);
|
||||
let platformId = explicit;
|
||||
if (!platformId) {
|
||||
const all = await listAllWorkflows(clients, { page: 1, pageSize: 100 });
|
||||
platformId = all.workflows.find((workflow) => workflow.id === pipelineId)?.platformId;
|
||||
try {
|
||||
const corpId = runtime.selectedCorp!.corpId || runtime.selectedCorp!.id;
|
||||
const { listPlatforms } = await import("../../../domains/platform/services.js");
|
||||
const platforms = await listPlatforms(clients.ekbClient, corpId);
|
||||
const firstActive = platforms.find((p) => p.active) ?? platforms[0];
|
||||
platformId = firstActive?.id;
|
||||
} catch {
|
||||
// Fall back to easoClient
|
||||
}
|
||||
}
|
||||
return {
|
||||
client: platformId ? await createPiperClientForCorp(runtime.selectedCorp!, platformId) : clients.easoClient,
|
||||
|
||||
Reference in new issue
Block a user