Merge nucleic/sleek-ancient-otter-hgeb into dev
This commit is contained in:
@@ -35,21 +35,22 @@ struct IntelligenceRouteLine: View {
|
||||
/// Tracks its own text style, so at accessibility sizes the row grows with the model name it
|
||||
/// exists to show rather than clipping it.
|
||||
@ScaledMetric(relativeTo: .caption) private var rowHeight: CGFloat = 16
|
||||
/// Mirrors `IntelligenceRail`'s own nub/track metrics so this line's text starts flush with the
|
||||
/// rail's visible left edge (the nub can reach past the track's own leading point) rather than
|
||||
/// the row's raw container edge.
|
||||
@ScaledMetric(relativeTo: .footnote) private var railNubSize: CGFloat = 26
|
||||
@ScaledMetric(relativeTo: .footnote) private var railTrackHeight: CGFloat = 10
|
||||
|
||||
private var stopName: String {
|
||||
if orchestra { return catalog.orchestraDisplayName }
|
||||
let projected = catalog.displayName(forLevel: level)
|
||||
return projected.isEmpty
|
||||
? (IntelligenceLevel(rawValue: level)?.displayName ?? "") : projected
|
||||
}
|
||||
private var railLeadingInset: CGFloat { railNubSize / 2 - railTrackHeight / 2 }
|
||||
|
||||
/// "Balanced · Sonnet 5 · High", or just the stop before anything resolves. Orchestra states
|
||||
/// its mode rather than a pair — the supervisor model isn't the interesting fact there.
|
||||
/// "Sonnet 5 · High" — just the concrete pair, not the stop's name ("Balanced", "Deep", …),
|
||||
/// which the rail above already shows. Orchestra states its mode rather than a pair — the
|
||||
/// supervisor model isn't the interesting fact there.
|
||||
private var summary: String {
|
||||
if orchestra { return "\(stopName) · parallel subagents" }
|
||||
if let unavailableReason { return "\(stopName) · \(unavailableReason)" }
|
||||
guard let model, let effort else { return stopName }
|
||||
return "\(stopName) · \(modelCatalog.displayName(model)) · "
|
||||
if orchestra { return "Parallel subagents" }
|
||||
if let unavailableReason { return unavailableReason.localizedCapitalized }
|
||||
guard let model, let effort else { return "" }
|
||||
return "\(modelCatalog.displayName(model)) · "
|
||||
+ modelCatalog.effortDisplayName(effort).localizedCapitalized
|
||||
}
|
||||
|
||||
@@ -60,6 +61,7 @@ struct IntelligenceRouteLine: View {
|
||||
.lineLimit(1)
|
||||
.truncationMode(.middle)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.leading, railLeadingInset)
|
||||
.frame(height: rowHeight)
|
||||
// One element with the rail, not a second stop in the VoiceOver order: this restates
|
||||
// what the rail's own value already says, and a swipe onto a duplicate readout is pure
|
||||
|
||||
Reference in New Issue
Block a user