Dev #2

Merged
sandrodach merged 37 commits from dev into main 2026-10-25 12:14:23 +01:00
Showing only changes of commit 1ada978f9e - Show all commits
+27 -5
View File
@@ -811,11 +811,33 @@ func (s *Store) UpdateThoughtTriage(userID, thoughtID, action, convertTo, target
if len(title) > 72 { if len(title) > 72 {
title = title[:72] + "…" title = title[:72] + "…"
} }
blocks := []domain.DocumentBlock{ blocks := make([]domain.DocumentBlock, 0)
{ID: domain.NewID("blk"), Type: "callout", Content: "Ursprünglicher Gedanke aus deiner Inbox vom " + thought.CreatedAt[:10]}, if strings.TrimSpace(thought.Notes) != "" {
{ID: domain.NewID("blk"), Type: "paragraph", Content: thought.Content}, blocks = append(blocks, domain.DocumentBlock{
{ID: domain.NewID("blk"), Type: "h2", Content: "Nächste Schritte"}, ID: domain.NewID("blk"),
{ID: domain.NewID("blk"), Type: "todo", Content: "Ersten Meilenstein definieren", Checked: false}, Type: "bullet",
Content: strings.TrimSpace(thought.Notes),
Level: 0,
})
}
if len(thought.Subtasks) > 0 {
for _, st := range thought.Subtasks {
blocks = append(blocks, domain.DocumentBlock{
ID: domain.NewID("blk"),
Type: "todo",
Content: st.Title,
Checked: st.IsCompleted,
Level: 0,
})
}
}
if len(blocks) == 0 {
blocks = append(blocks, domain.DocumentBlock{
ID: domain.NewID("blk"),
Type: "bullet",
Content: "",
Level: 0,
})
} }
doc, err := s.CreateDocument(userID, "", title, "📄", "", blocks, thought.Tags, false) doc, err := s.CreateDocument(userID, "", title, "📄", "", blocks, thought.Tags, false)
if err == nil && doc != nil { if err == nil && doc != nil {