@yrpri/api 9.0.84 → 9.0.85
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.
|
@@ -20,7 +20,7 @@ export class AgentTools extends BaseAssistantTools {
|
|
|
20
20
|
async showAgentWorkflowOverviewWidgetHandler(params) {
|
|
21
21
|
try {
|
|
22
22
|
const { agent, run } = await this.agentModels.getCurrentAgentAndWorkflow();
|
|
23
|
-
const workflowJson = JSON.stringify(agent.configuration.workflow);
|
|
23
|
+
const workflowJson = JSON.stringify(this.getSimpleWorkflow(agent.configuration.workflow));
|
|
24
24
|
const base64Workflow = btoa(workflowJson);
|
|
25
25
|
const html = `<yp-agent-workflow-widget
|
|
26
26
|
agentProductId="${agent.id}"
|
|
@@ -401,14 +401,18 @@ export class AgentTools extends BaseAssistantTools {
|
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
|
|
405
|
-
const
|
|
406
|
-
const workflowCopy = JSON.parse(JSON.stringify(run.workflow));
|
|
404
|
+
getSimpleWorkflow(workflow) {
|
|
405
|
+
const workflowCopy = JSON.parse(JSON.stringify(workflow));
|
|
407
406
|
if (workflowCopy.steps) {
|
|
408
407
|
workflowCopy.steps.forEach((step) => {
|
|
409
408
|
step.emailInstructions = "";
|
|
410
409
|
});
|
|
411
410
|
}
|
|
411
|
+
return workflowCopy;
|
|
412
|
+
}
|
|
413
|
+
async renderAgentRunWidget(agent, run) {
|
|
414
|
+
const subscription = await this.assistant.getCurrentSubscription();
|
|
415
|
+
const workflowCopy = this.getSimpleWorkflow(run.workflow);
|
|
412
416
|
const workflowBase64 = btoa(JSON.stringify(workflowCopy));
|
|
413
417
|
return `<yp-agent-run-widget
|
|
414
418
|
agentProductId="${agent.id}"
|