Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions internal/commands/chat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,17 @@ func TestInjectAttachmentSizes_DuplicateFilenames(t *testing.T) {
assert.Equal(t, "📎 doc.pdf (2.0kb)", lines[2])
}

func TestInjectAttachmentSizes_InlineAttachment(t *testing.T) {
// HTMLToMarkdown for inline attachments produces "content\n📎 filename\n"
// where the marker follows non-empty content — must still be annotated.
text := "See \n📎 report.pdf\nreport.pdf"
attachments := []basecamp.CampfireLineAttachment{
{Filename: "report.pdf", ByteSize: 9_000},
}
got := injectAttachmentSizes(text, attachments)
assert.Contains(t, got, "📎 report.pdf (9.0kb)")
}

func TestChatLinesDisplayData_ReplacesContent(t *testing.T) {
lines := []basecamp.CampfireLine{
{
Expand Down
Loading