Public Access
Update meeting summary agent UI
This commit is contained in:
@@ -11,7 +11,7 @@ namespace MeetingAssistant.Workflow;
|
||||
|
||||
internal sealed class WpfWorkflowRulesEditorWindowService : IWorkflowRulesEditorWindowService
|
||||
{
|
||||
internal const string WindowTitle = "Settings and logs";
|
||||
internal const string WindowTitle = "Meeting Summary Agent";
|
||||
|
||||
private readonly IServiceProvider services;
|
||||
private readonly WorkflowRulesEditorMarkdownLinkResolver linkResolver;
|
||||
@@ -288,19 +288,21 @@ internal sealed class WorkflowRulesEditorWpfWindow : Window
|
||||
conversationPanel.ActualHeight);
|
||||
|
||||
conversationPanel.Children.Clear();
|
||||
foreach (var message in viewModel.Messages)
|
||||
foreach (var item in viewModel.Messages)
|
||||
{
|
||||
conversationPanel.Children.Add(CreateMessageCard(message));
|
||||
conversationPanel.Children.Add(item.Kind == WorkflowRulesEditorConversationItemKind.Activity
|
||||
? CreateActivityExpander(item)
|
||||
: CreateMessageCard(item.Message!));
|
||||
}
|
||||
|
||||
if (viewModel.IsThinking)
|
||||
{
|
||||
conversationPanel.Children.Add(new TextBlock
|
||||
foreach (var activity in viewModel.ActivityMessages)
|
||||
{
|
||||
Text = viewModel.ActivityMessage,
|
||||
Foreground = MutedText,
|
||||
Margin = new Thickness(4, 2, 4, 2)
|
||||
});
|
||||
conversationPanel.Children.Add(CreateActivityLine(activity));
|
||||
}
|
||||
|
||||
conversationPanel.Children.Add(CreateActivityLine(viewModel.ActivityMessage));
|
||||
}
|
||||
|
||||
sendButton.IsEnabled = !viewModel.IsThinking;
|
||||
@@ -338,6 +340,43 @@ internal sealed class WorkflowRulesEditorWpfWindow : Window
|
||||
return card;
|
||||
}
|
||||
|
||||
private static Expander CreateActivityExpander(WorkflowRulesEditorConversationItem item)
|
||||
{
|
||||
var details = new StackPanel
|
||||
{
|
||||
Orientation = Orientation.Vertical,
|
||||
Margin = new Thickness(16, 2, 4, 6)
|
||||
};
|
||||
|
||||
foreach (var line in item.ActivityLines ?? [])
|
||||
{
|
||||
details.Children.Add(CreateActivityLine(line));
|
||||
}
|
||||
|
||||
var expander = new Expander
|
||||
{
|
||||
Header = item.Content,
|
||||
Content = details,
|
||||
IsExpanded = item.IsExpanded,
|
||||
Foreground = MutedText,
|
||||
Background = Brushes.Transparent,
|
||||
Margin = new Thickness(4, 0, 4, 8)
|
||||
};
|
||||
expander.Expanded += (_, _) => item.IsExpanded = true;
|
||||
expander.Collapsed += (_, _) => item.IsExpanded = false;
|
||||
return expander;
|
||||
}
|
||||
|
||||
private static TextBlock CreateActivityLine(string text)
|
||||
{
|
||||
return new TextBlock
|
||||
{
|
||||
Text = text,
|
||||
Foreground = MutedText,
|
||||
Margin = new Thickness(4, 2, 4, 2)
|
||||
};
|
||||
}
|
||||
|
||||
private static Style CreateSendButtonStyle()
|
||||
{
|
||||
var style = new Style(typeof(Button));
|
||||
|
||||
Reference in New Issue
Block a user