Add meeting workflow automation

This commit is contained in:
2026-05-27 12:55:18 +02:00
parent e85274829a
commit b114071957
29 changed files with 1703 additions and 12 deletions
@@ -25,6 +25,14 @@ public interface IMeetingArtifactStore
MeetingSessionArtifacts artifacts,
AssistantContextState state,
CancellationToken cancellationToken);
Task AppendAssistantContextAsync(
MeetingSessionArtifacts artifacts,
string content,
CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
public enum AssistantContextState
@@ -107,6 +107,30 @@ public sealed class MarkdownMeetingArtifactStore : IMeetingArtifactStore
artifacts.AssistantContextPath);
}
public async Task AppendAssistantContextAsync(
MeetingSessionArtifacts artifacts,
string content,
CancellationToken cancellationToken)
{
if (string.IsNullOrWhiteSpace(content))
{
return;
}
Directory.CreateDirectory(Path.GetDirectoryName(artifacts.AssistantContextPath)!);
var prefix = File.Exists(artifacts.AssistantContextPath) &&
new FileInfo(artifacts.AssistantContextPath).Length > 0
? Environment.NewLine
: "";
await File.AppendAllTextAsync(
artifacts.AssistantContextPath,
prefix + content.TrimEnd() + Environment.NewLine,
cancellationToken);
logger.LogInformation(
"Appended automation context to assistant context note {AssistantContextPath}",
artifacts.AssistantContextPath);
}
private static string Render(
MeetingSessionArtifacts artifacts,
MeetingNote meetingNote,
@@ -10,6 +10,8 @@ public sealed class MeetingArtifactFrontmatter
public DateTimeOffset? EndTime { get; set; }
public List<string>? Attendees { get; set; }
public string Meeting { get; set; } = "";
public string Transcript { get; set; } = "";
@@ -36,6 +38,7 @@ public static class MeetingArtifactFrontmatterRenderer
AppendScalar(builder, "title", frontmatter.Title);
AppendDateTime(builder, "start_time", frontmatter.StartTime);
AppendDateTime(builder, "end_time", frontmatter.EndTime);
AppendListIfNotNull(builder, "attendees", frontmatter.Attendees);
AppendQuotedIfNotEmpty(builder, "meeting", frontmatter.Meeting);
AppendQuotedIfNotEmpty(builder, "transcript", frontmatter.Transcript);
AppendQuotedIfNotEmpty(builder, "assistant_context", frontmatter.AssistantContext);
@@ -142,6 +145,22 @@ public static class MeetingArtifactFrontmatterRenderer
builder.AppendLine(value is null ? "\"\"" : EscapeQuoted(value.Value.ToString("O")));
}
private static void AppendListIfNotNull(StringBuilder builder, string key, IReadOnlyList<string>? values)
{
if (values is null)
{
return;
}
builder.Append(key);
builder.AppendLine(":");
foreach (var value in values)
{
builder.Append("- ");
builder.AppendLine(EscapeListItem(value));
}
}
private static void AppendBlockScalar(StringBuilder builder, string key, string value)
{
if (string.IsNullOrEmpty(value))