Files
pipelines/app/lib/features/chat/conversation/chat_question_markdown.dart
T
alan 509d4c624f Render agent questions as markdown
A question's text, its description and its options' descriptions now
use the transcript's markdown renderer (bold, code, lists, links) in
the card's own text styles; tapping an option's formatted description
still selects it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:23:24 +00:00

23 lines
707 B
Dart

import 'package:flutter/material.dart';
import '../ui/transcript/chat_markdown_view.dart';
/// A question's text (its title, description or an option's description)
/// rendered as markdown in [style]: agents format questions with bold, code,
/// lists and links, the same subset the transcript draws.
class ChatQuestionMarkdown extends StatelessWidget {
const ChatQuestionMarkdown(this.text, {super.key, this.style});
final String text;
final TextStyle? style;
@override
Widget build(BuildContext context) {
final view = ChatMarkdownView(text: text);
final style = this.style;
return style == null
? view
: DefaultTextStyle.merge(style: style, child: view);
}
}