KTD1 fourth step: - squad.Options.TaskPreparer + TaskPreparation (Attachment + Backfills + MirrorTemplateToOutput); squad stays sole writer of its workspace files - CDO quote calc/xlsx/backfill implementation moves to bizdev (quote_preparer.go); squad/quote_backfill.go relocated to bizdev - arch path rule enforced the boundary: bizdev may not name/write output.md; mirroring decided squad-side via flag - squad -> quote import eliminated; engine.go delegations now local - verified: build/vet/arch green, squad+bizdev short tests pass
19 lines
459 B
Go
19 lines
459 B
Go
package bizdev
|
|
|
|
import (
|
|
"chat-agent-system/internal/squad"
|
|
)
|
|
|
|
// WriteMaterials persists uploaded material text into workspace materials_text/.
|
|
func WriteMaterials(workDir string, materials []MaterialInput) error {
|
|
var items []squad.MaterialItem
|
|
for _, m := range materials {
|
|
items = append(items, squad.MaterialItem{
|
|
Filename: m.Filename,
|
|
Content: m.Content,
|
|
})
|
|
}
|
|
cm := squad.NewContextManager()
|
|
return cm.InjectMaterials(workDir, items)
|
|
}
|