INNER CODE UNIT · Go

enrichArchetypes

career-ops-hq/career-ops · dashboard/main.go:62

func enrichArchetypes(careerOpsPath string, apps []model.CareerApplication, pm *screens.PipelineModel) {
	for i := range apps {
		if apps[i].ReportPath == "" {
			continue
		}
		archetype, tldr, remote, comp := data.LoadReportSummary(careerOpsPath, apps[i].ReportPath)
		// Only overwrite when the report actually supplies a non-empty archetype;
		// preserve any value already derived from the tracker.
		if archetype != "" {
			apps[i].Archetype = archetype
		}
		if archetype != "" || tldr != "" || remote != "" || comp != "" {
			pm.EnrichReport(apps[i].ReportPath, archetype, tldr, remote, comp)
		}
	}
}

func (m appModel) Init() tea.Cmd {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…