Public Access
Normalize scalar frontmatter lists
PR and Push Build/Test / build-and-test (push) Successful in 8m49s
PR and Push Build/Test / build-and-test (push) Successful in 8m49s
This commit is contained in:
@@ -105,6 +105,36 @@ public sealed class MeetingNoteStoreTests
|
||||
Assert.Equal(userNotes, reloaded.UserNotes);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ReadConvertsScalarListFrontmatterToSingleItemLists()
|
||||
{
|
||||
var (vaultRoot, store) = CreateStore();
|
||||
var notePath = Path.Combine(vaultRoot, "Meetings", "Notes", "manual.md");
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(notePath)!);
|
||||
await File.WriteAllTextAsync(
|
||||
notePath,
|
||||
"""
|
||||
---
|
||||
title: Manual frontmatter
|
||||
start_time: "2026-05-19T10:00:00.0000000+02:00"
|
||||
end_time: ""
|
||||
attendees: Ada
|
||||
projects: Meeting Assistant
|
||||
transcript: "[[../Transcripts/manual-transcript|Transcript]]"
|
||||
assistant_context: "[[../Assistant Context/manual-context|Assistant Context]]"
|
||||
summary: "[[../Summaries/manual-summary|Summary]]"
|
||||
---
|
||||
|
||||
User notes.
|
||||
""");
|
||||
|
||||
var loaded = await store.ReadAsync(notePath, CancellationToken.None);
|
||||
|
||||
Assert.Equal(["Ada"], loaded.Frontmatter.Attendees);
|
||||
Assert.Equal(["Meeting Assistant"], loaded.Frontmatter.Projects);
|
||||
Assert.Equal("User notes.", loaded.UserNotes);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ActionLinkEscapesSummaryFileName()
|
||||
{
|
||||
|
||||
@@ -63,6 +63,34 @@ public sealed class ProjectKnowledgeToolTests
|
||||
await tools.Search("alpha"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ListProjectsAcceptsScalarProjectFrontmatter()
|
||||
{
|
||||
var root = Path.Combine(Path.GetTempPath(), "meeting-assistant-tests", Guid.NewGuid().ToString("N"));
|
||||
var projectsRoot = Path.Combine(root, "Projects");
|
||||
Directory.CreateDirectory(Path.Combine(projectsRoot, "MeetingAssistant"));
|
||||
var artifacts = CreateArtifacts(root);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(artifacts.MeetingNotePath)!);
|
||||
await File.WriteAllTextAsync(
|
||||
artifacts.MeetingNotePath,
|
||||
"""
|
||||
---
|
||||
projects: MeetingAssistant
|
||||
---
|
||||
""");
|
||||
var tools = new MeetingSummaryTools(
|
||||
artifacts,
|
||||
new MeetingAssistantOptions
|
||||
{
|
||||
Vault =
|
||||
{
|
||||
ProjectsFolder = projectsRoot
|
||||
}
|
||||
});
|
||||
|
||||
Assert.Equal("MeetingAssistant", await tools.ListProjects());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task WriteProjectFileSupportsAppendReplaceInsertOverwriteAndCreate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user