From b96a3f6b3a673591b50852e703706d2ce4e6d4bb Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 1 Dec 2026 15:51:23 +0200 Subject: [PATCH] AI chat Details as Uplink draws them: a read of several devices shows each device's values under its name instead of raw JSON keyed by id; latest values as key and value rows; history as a table with Last and Range (changes counted for non-numeric keys); records leave out a profile most rows share; an alarm search reads Searched alarms with its filter, entity and window in Asked for and No alarms; code parts always fold with their line count and the widget read names the widget; a change's Details drops the record's own name, FQN and type, shows changed fields in the change form with 72x54 thumbnails and no inner scroll; approval image changes sit side by side at 72x54; an approved call's line shows Took live and from history; the hand-over's terminal test is offered folded under Nothing heard --- .../ai/ai-action-detail.component.html | 93 ++++++-- .../ai/ai-action-detail.component.ts | 30 ++- .../components/ai/ai-action-detail.models.ts | 140 ++++++++---- .../ai/ai-approval-card.component.html | 2 +- .../ai/ai-approval-card.component.ts | 10 +- .../ai/ai-chat-messages.component.html | 1 + .../ai/ai-chat-messages.component.ts | 2 + .../home/components/ai/ai-chat.component.html | 1 + .../home/components/ai/ai-chat.component.ts | 3 + .../home/components/ai/ai-code-block.ts | 3 +- .../components/ai/ai-hand-over.component.html | 10 +- .../src/app/shared/models/ai-chat.models.ts | 1 + .../assets/locale/locale.constant-en_US.json | 35 ++- ui-ngx/src/theme/ai-theme.scss | 207 +++++++++++++++--- 14 files changed, 436 insertions(+), 102 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html b/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html index 92b784a2e3..939c25ddff 100644 --- a/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html +++ b/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html @@ -52,25 +52,49 @@ } } @case ('values') { - @if (block.label) { + @if (block.entity) { +

{{ entityName(block.entity) }}

+ } @else if (block.label) {
{{ say(block.label) }}
} -
+
@for (row of block.rows; track $index) { - {{ row.key }}{{ row.value }} +
{{ row.key }}
+
{{ row.value }}
} -
+ } @case ('series') { -
- @for (row of block.rows; track row.key) { -
- {{ row.key }} - - {{ 'ai-assistant.detail.series' | translate:{points: row.points, min: number(row.min), max: number(row.max), last: number(row.last)} }} -
- } -
+ @if (block.entity) { +

{{ entityName(block.entity) }}

+ } + + + + + + + + + + + @for (row of block.rows; track row.key) { + + + + + + + } + +
{{ 'ai-assistant.detail.history-key' | translate }}{{ 'ai-assistant.detail.history-curve' | translate }}{{ 'ai-assistant.detail.history-last' | translate }}{{ 'ai-assistant.detail.history-range' | translate }}
{{ row.key }} + + {{ row.lastText ?? number(row.last) }}{{ row.changes !== undefined + ? ('ai-assistant.detail.history-changes' | translate: {count: row.changes}) + : ('ai-assistant.detail.history-span' | translate: {min: number(row.min), max: number(row.max)}) }}
} @case ('keys') { @if (block.label) { @@ -83,8 +107,43 @@ } @case ('facts') { + @if (changeRows(block.rows); as changes) { + @if (changes.length) { +
+ @for (change of changes; track $index) { +
+
{{ label(change) }}
+ @if (change.images; as pair) { +
+ @if (pair.current) { + + } @else { + + } + + {{ 'ai-assistant.review.changes-to' | translate }} + @if (pair.value) { + + } @else { + + } +
+ } @else { +
+ {{ change.was }} + + {{ 'ai-assistant.review.changes-to' | translate }} + {{ factValue(change) }} +
+ } +
+ } +
+ } + } + @if (plainRows(block.rows).length) {
- @for (fact of block.rows; track $index) { + @for (fact of plainRows(block.rows); track $index) {
{{ label(fact) }}
@if (fact.images; as pair) { @@ -121,6 +180,7 @@
}
+ } } @case ('list') { @if (block.label) { @@ -139,7 +199,7 @@ @if (block.title) {
{{ ('ai-assistant.action.' + block.title) | translate }}
} -
{{ block.text }}
+
{{ block.text }}
} @case ('links') {