diff --git a/src/app/shared/custom-connection/custom-connection.ts b/src/app/shared/custom-connection/custom-connection.ts index deccd0a..dc406b7 100644 --- a/src/app/shared/custom-connection/custom-connection.ts +++ b/src/app/shared/custom-connection/custom-connection.ts @@ -20,6 +20,7 @@ import { BiasComparisonViewStateService } from '@services/bias/bias-comparison-v template: ` -
+
@if (isSelected && !isReadonly) {
}
@@ -495,7 +501,11 @@ } -
{{ input.preview }}
+ @if (input.json) { + + } @else { +
{{ input.preview }}
+ } } @empty {
No inputs recorded.
@@ -614,7 +624,11 @@ } + @if (output.json) { + + } @else {
{{ output.preview }}
+ } } @@ -648,7 +662,11 @@
+ @if (outputModal.json) { + + } @else {
{{ outputModal.value }}
+ }
@@ -665,7 +683,11 @@
+ @if (inputModal.json) { + + } @else {
{{ inputModal.value }}
+ }
diff --git a/src/app/shared/task-execution-viewer/task-execution-viewer.ts b/src/app/shared/task-execution-viewer/task-execution-viewer.ts index 211abe7..4be8e6b 100644 --- a/src/app/shared/task-execution-viewer/task-execution-viewer.ts +++ b/src/app/shared/task-execution-viewer/task-execution-viewer.ts @@ -108,6 +108,8 @@ import { VaultAuthorizationEntry, buildAuthorizationGate, isExecutionStartable, + asJsonTree, + JSON_PREVIEW_ENTRIES } from './execution-viewer.utils'; import { buildExecutionLoopHistories, ExecutionLoopHistory } from './execution-rounds'; import { @@ -693,6 +695,13 @@ export class TaskExecutionViewerComponent implements OnDestroy { return typeof payload === 'string'; } + /** A payload that is JSON, including JSON a model wrote as text, as a tree; null otherwise. */ + payloadJson(payload: unknown): unknown | null { + return typeof payload === 'string' ? asJsonTree(payload) : null; + } + + readonly jsonPreviewEntries = JSON_PREVIEW_ENTRIES; + stepNameForOutcome(stepId: string): string { return this.execution()?.context.steps?.[stepId]?.node?.name ?? stepId; } diff --git a/src/app/utilities/rete-editor.ts b/src/app/utilities/rete-editor.ts index 5d0c614..5fa19bd 100644 --- a/src/app/utilities/rete-editor.ts +++ b/src/app/utilities/rete-editor.ts @@ -776,7 +776,8 @@ export async function refreshLoopMarkers( .filter((c) => getGraphConnectionKind(c.sourceOutput, c.targetInput) === 'dependency') .map((c) => ({ sourceId: c.source, targetId: c.target })) }); - for (const connection of data) { + // Every connection, dependencies included: in a read-only graph none of them can be selected. + for (const connection of connections) { const loopBack = backEdges.has(connection.id); const readonly = resolvedRuntime?.readonly === true; const top = loopBack ? loopTop(area, connection) : undefined;