Move Model Selector Position
Nucleic-Session: 855E352B-51E5-4752-9C04-2C23B973FA44 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -189,7 +189,8 @@ struct SessionDetailView: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// The ⋯ menu: the diff viewer for everyone, then the control-scope session actions.
|
||||
/// The ⋯ menu: the diff viewer for everyone, then — at control scope — the next-turn model /
|
||||
/// effort selectors (moved off the composer to keep it compact) and the session actions.
|
||||
@ViewBuilder
|
||||
private var sessionMenu: some View {
|
||||
Menu {
|
||||
@@ -197,6 +198,8 @@ struct SessionDetailView: View {
|
||||
Label(diffLabel, systemImage: "plus.forwardslash.minus")
|
||||
}
|
||||
if let summary, store.canControl {
|
||||
Divider()
|
||||
modelEffortMenu(summary)
|
||||
Divider()
|
||||
sessionActions(summary)
|
||||
}
|
||||
@@ -205,6 +208,23 @@ struct SessionDetailView: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// The model and effort selectors for the next turn, relocated from the composer's control row
|
||||
/// into the ⋯ menu so the glass chat bar stays compact — each opens as a submenu of levels.
|
||||
/// `ModelMenu` / `EffortMenu` are themselves menus, so they nest cleanly here.
|
||||
@ViewBuilder
|
||||
private func modelEffortMenu(_ summary: WireSessionSummary) -> some View {
|
||||
// A session's backend is fixed at creation, so only same-backend models are offered.
|
||||
ModelMenu(model: modelBinding, catalog: store.modelCatalog, backend: summary.backend)
|
||||
EffortMenu(effort: effortBinding, catalog: store.modelCatalog,
|
||||
// No explicit model yet → use the session backend's default, so the menu
|
||||
// shows that backend's effort range rather than collapsing to one level.
|
||||
modelSKU: summary.model ?? store.modelCatalog.models(for: summary.backend).first?.sku,
|
||||
controlled: controlled,
|
||||
// Orchestra is a one-way latch for an existing chat — the host won't turn it
|
||||
// off, so disable the other levels here to match.
|
||||
lockWhenOrchestra: true)
|
||||
}
|
||||
|
||||
/// "View changes" with the live +/− counts when the host projects them, so the menu hints
|
||||
/// whether there's anything to look at before opening the sheet.
|
||||
private var diffLabel: String {
|
||||
|
||||
Reference in New Issue
Block a user