feat: upload audio, get a private Swedish transcript, discuss it (#33, ADR-033) #39
+15
-7
@@ -283,9 +283,9 @@ func (a *App) uploadChatView(u domain.UploadedTranscript, model string, history
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// maxSpotsShown is how many contested spots the page lists. The stored list holds up to
|
// maxSpotsShown is how many spots to check the page lists. The stored list holds every
|
||||||
// 200 and the counts are exact; a page of two hundred "check this" items is not a page
|
// judged spot and the counts are exact; a page of two hundred "check this" items is not a
|
||||||
// anyone reads, so the rest are counted, not listed.
|
// page anyone reads, so the rest are counted, not listed.
|
||||||
const maxSpotsShown = 50
|
const maxSpotsShown = 50
|
||||||
|
|
||||||
// minuteMark renders where in the recording a spot is, as the nearest minute.
|
// minuteMark renders where in the recording a spot is, as the nearest minute.
|
||||||
@@ -293,12 +293,20 @@ func minuteMark(seconds float64) string {
|
|||||||
return fmt.Sprintf("~%d min", int(math.Round(seconds/60)))
|
return fmt.Sprintf("~%d min", int(math.Round(seconds/60)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// shownSpots is the part of the contested list the page renders.
|
// shownSpots is the part of the stored list the page renders: the spots a reader should
|
||||||
|
// check, changed or uncertain, in order, capped. A spot the model confidently kept is
|
||||||
|
// stored (ADR-035) but is not one to check, so it is not listed.
|
||||||
func shownSpots(r *domain.Reconciliation) []domain.ContestedSpot {
|
func shownSpots(r *domain.Reconciliation) []domain.ContestedSpot {
|
||||||
if len(r.Contested) > maxSpotsShown {
|
var out []domain.ContestedSpot
|
||||||
return r.Contested[:maxSpotsShown]
|
for _, c := range r.Contested {
|
||||||
|
if c.Used == "alt" || c.Unsure {
|
||||||
|
out = append(out, c)
|
||||||
|
if len(out) == maxSpotsShown {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return r.Contested
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// moreSpots is how many spots to check are not listed, from the exact counts.
|
// moreSpots is how many spots to check are not listed, from the exact counts.
|
||||||
|
|||||||
Reference in New Issue
Block a user