ai_xiaopei
2 days ago ada154418fb223e742112e58ef169193e588eafb
internal/draft/intake.go
@@ -654,6 +654,13 @@
            HasMergeHint: hasMerge,
         }
         // 从路径提取一级目录名作为 Type
         // 路径格式:待审阅/TAPD提取/003-xxx/draft.md
         parts := strings.Split(relPath, string(filepath.Separator))
         if len(parts) >= 2 && parts[0] == "待审阅" {
            draft.Type = parts[1]
         }
         // 解析 frontmatter
         fm := parseFrontmatter(string(content))
         if title, ok := fm["title"]; ok {
@@ -662,9 +669,6 @@
         if status, ok := fm["status"]; ok {
            draft.Status = status
         }
         if draftType, ok := fm["type"]; ok {
            draft.Type = draftType
         }
         if created, ok := fm["created"]; ok {
            draft.Created = created
         }
@@ -690,6 +694,13 @@
               HasMergeHint: false,
            }
            // 从路径提取一级目录名作为 Type
            // 路径格式:待审阅/TAPD提取/003-xxx.md
            parts := strings.Split(relPath, string(filepath.Separator))
            if len(parts) >= 2 && parts[0] == "待审阅" {
               draft.Type = parts[1]
            }
            // 解析 frontmatter
            fm := parseFrontmatter(string(content))
            if title, ok := fm["title"]; ok {
@@ -698,9 +709,6 @@
            if status, ok := fm["status"]; ok {
               draft.Status = status
            }
            if draftType, ok := fm["type"]; ok {
               draft.Type = draftType
            }
            if created, ok := fm["created"]; ok {
               draft.Created = created
            }