From 581a0fb075ddf05b72a39cd17942659797c58bd7 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Thu, 19 Nov 2026 17:54:55 +0200 Subject: [PATCH] feat: the details of drawing SCADA pipes name the equipment and sides a line joins --- .../modules/home/components/ai/ai-action-detail.models.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts b/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts index f81919f07d..ac3ec73a8e 100644 --- a/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts +++ b/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts @@ -1150,8 +1150,10 @@ function describe(tool: string, values: Values, result: unknown, names: AiDetail } case 'add_scada_connectors': { const rows = (Array.isArray(values.lines) ? values.lines : []).filter(isObject) - .map((line, index) => `${str(line.name) ?? 'Line ' + (index + 1)} · ${Array.isArray(line.points) ? line.points.length : 0} points` - + (isObject(line.flow) ? ' · flow' : '')); + .map((line, index) => `${str(line.name) ?? 'Line ' + (index + 1)} · ${isObject(line.from) && isObject(line.to) + ? `${names.get(str(line.from.widgetId) ?? '')?.name ?? str(line.from.widgetId) ?? '—'} ${str(line.from.side) ?? ''} → ` + + `${names.get(str(line.to.widgetId) ?? '')?.name ?? str(line.to.widgetId) ?? '—'} ${str(line.to.side) ?? ''}` + : `${Array.isArray(line.points) ? line.points.length : 0} points`}` + (isObject(line.flow) ? ' · flow' : '')); return {hood: text('add-scada-connectors', {count: rows.length, entity: dashboard}), blocks: rows.length ? [{type: 'list', rows}] : generic(result, 'result')}; } case 'update_dashboard_widget':