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
|
/// Tracks its own text style, so at accessibility sizes the row grows with the model name it
|
||||||
/// exists to show rather than clipping it.
|
/// exists to show rather than clipping it.
|
||||||
@ScaledMetric(relativeTo: .caption) private var rowHeight: CGFloat = 16
|
@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 {
|
private var railLeadingInset: CGFloat { railNubSize / 2 - railTrackHeight / 2 }
|
||||||
if orchestra { return catalog.orchestraDisplayName }
|
|
||||||
let projected = catalog.displayName(forLevel: level)
|
|
||||||
return projected.isEmpty
|
|
||||||
? (IntelligenceLevel(rawValue: level)?.displayName ?? "") : projected
|
|
||||||
}
|
|
||||||
|
|
||||||
/// "Balanced · Sonnet 5 · High", or just the stop before anything resolves. Orchestra states
|
/// "Sonnet 5 · High" — just the concrete pair, not the stop's name ("Balanced", "Deep", …),
|
||||||
/// its mode rather than a pair — the supervisor model isn't the interesting fact there.
|
/// 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 {
|
private var summary: String {
|
||||||
if orchestra { return "\(stopName) · parallel subagents" }
|
if orchestra { return "Parallel subagents" }
|
||||||
if let unavailableReason { return "\(stopName) · \(unavailableReason)" }
|
if let unavailableReason { return unavailableReason.localizedCapitalized }
|
||||||
guard let model, let effort else { return stopName }
|
guard let model, let effort else { return "" }
|
||||||
return "\(stopName) · \(modelCatalog.displayName(model)) · "
|
return "\(modelCatalog.displayName(model)) · "
|
||||||
+ modelCatalog.effortDisplayName(effort).localizedCapitalized
|
+ modelCatalog.effortDisplayName(effort).localizedCapitalized
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,6 +61,7 @@ struct IntelligenceRouteLine: View {
|
|||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.truncationMode(.middle)
|
.truncationMode(.middle)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.padding(.leading, railLeadingInset)
|
||||||
.frame(height: rowHeight)
|
.frame(height: rowHeight)
|
||||||
// One element with the rail, not a second stop in the VoiceOver order: this restates
|
// 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
|
// what the rail's own value already says, and a swipe onto a duplicate readout is pure
|
||||||
|
|||||||
Reference in New Issue
Block a user