35 lines
1.0 KiB
Go
35 lines
1.0 KiB
Go
package bizdev
|
|
|
|
import (
|
|
"chat-agent-system/internal/quote"
|
|
"chat-agent-system/internal/squad"
|
|
)
|
|
|
|
// FormatMoney formats a currency amount for display in markdown (no grouping separators).
|
|
func FormatMoney(v float64) string {
|
|
return squad.FormatMoney(v)
|
|
}
|
|
|
|
// RenderCDOQuoteTable builds the pricing table from quote summary lines and total.
|
|
func RenderCDOQuoteTable(summary *quote.Summary) string {
|
|
return squad.RenderCDOQuoteTable(summary)
|
|
}
|
|
|
|
// BackfillCDOQuoteMarkdown replaces placeholder sections with computed pricing from summary.
|
|
func BackfillCDOQuoteMarkdown(body string, summary *quote.Summary) string {
|
|
return squad.BackfillCDOQuoteMarkdown(body, summary)
|
|
}
|
|
|
|
// 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)
|
|
}
|