feat(app): pipeline source and stage prompts switch between raw and rendered markdown

This commit is contained in:
2026-10-23 20:08:48 +01:00
parent 27ad8c6aea
commit f258d8a30c
5 changed files with 112 additions and 2 deletions
@@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../ui/text/markdown_source_view.dart';
import '../../../core/api_gateway.dart';
import '../../../ui/adaptive/host.dart';
import '../domain/graph_protocol.dart';
@@ -153,8 +154,15 @@ class _StageDefinitionFieldView extends StatelessWidget {
children: [
Text(field.label, style: style.label),
const SizedBox(height: 4),
// An authored text block (a prompt) is markdown: rendered or raw.
if (field.block)
_SelectableDefinitionText(value: field.value, style: style.value)
MarkdownSourceView(
text: field.value,
raw: _SelectableDefinitionText(
value: field.value,
style: style.value,
),
)
else
Text(field.value, style: style.value),
],