Chat View Refinement
Nucleic-Session: 4E56990A-96AE-4597-9140-753CB82E769D Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -179,39 +179,36 @@ struct SessionDetailView: View {
|
||||
|
||||
@ViewBuilder
|
||||
private func sessionActions(_ summary: WireSessionSummary) -> some View {
|
||||
Button { renameDraft = summary.title; showRename = true } label: {
|
||||
Label("Rename", systemImage: "pencil")
|
||||
Button { renameDraft = summary.title; showRename = true } label: {
|
||||
Label("Rename", systemImage: "pencil")
|
||||
}
|
||||
Button { store.setFavorite(sessionID, !summary.favorite) } label: {
|
||||
Label(summary.favorite ? "Unfavorite" : "Favorite",
|
||||
systemImage: summary.favorite ? "star.slash" : "star")
|
||||
}
|
||||
// Autoship is a Nucleic Control capability — offered only for Control projects, and
|
||||
// the host couples it with auto-approval (enabling it turns Auto on).
|
||||
if controlled {
|
||||
Button { store.setSessionAutoShip(sessionID, !summary.autoShip) } label: {
|
||||
Label(summary.autoShip ? "Turn off Autoship" : "Turn on Autoship",
|
||||
systemImage: summary.autoShip ? "shippingbox.fill" : "shippingbox")
|
||||
}
|
||||
Button { store.setFavorite(sessionID, !summary.favorite) } label: {
|
||||
Label(summary.favorite ? "Unfavorite" : "Favorite",
|
||||
systemImage: summary.favorite ? "star.slash" : "star")
|
||||
}
|
||||
if summary.status == .running {
|
||||
Button { store.interrupt(sessionID) } label: { Label("Interrupt", systemImage: "stop.circle") }
|
||||
}
|
||||
Section {
|
||||
Button { showIntegrate = true } label: { Label("Integrate…", systemImage: "arrow.triangle.merge") }
|
||||
Button(role: .destructive) { showDiscard = true } label: {
|
||||
Label("Discard…", systemImage: "xmark.bin")
|
||||
}
|
||||
// Autoship is a Nucleic Control capability — offered only for Control projects, and
|
||||
// the host couples it with auto-approval (enabling it turns Auto on).
|
||||
if controlled {
|
||||
Button { store.setSessionAutoShip(sessionID, !summary.autoShip) } label: {
|
||||
Label(summary.autoShip ? "Turn off Autoship" : "Turn on Autoship",
|
||||
systemImage: summary.autoShip ? "shippingbox.fill" : "shippingbox")
|
||||
}
|
||||
Button { store.setArchived(sessionID, !summary.archived) } label: {
|
||||
Label(summary.archived ? "Unarchive" : "Archive",
|
||||
systemImage: summary.archived ? "tray.and.arrow.up" : "archivebox")
|
||||
}
|
||||
if summary.status == .running {
|
||||
Button { store.interrupt(sessionID) } label: { Label("Interrupt", systemImage: "stop.circle") }
|
||||
}
|
||||
Section {
|
||||
Button { showIntegrate = true } label: { Label("Integrate…", systemImage: "arrow.triangle.merge") }
|
||||
Button(role: .destructive) { showDiscard = true } label: {
|
||||
Label("Discard…", systemImage: "xmark.bin")
|
||||
}
|
||||
Button { store.setArchived(sessionID, !summary.archived) } label: {
|
||||
Label(summary.archived ? "Unarchive" : "Archive",
|
||||
systemImage: summary.archived ? "tray.and.arrow.up" : "archivebox")
|
||||
}
|
||||
}
|
||||
Button(role: .destructive) { store.deleteSession(sessionID) } label: {
|
||||
Label("Delete", systemImage: "trash")
|
||||
}
|
||||
} label: {
|
||||
Image(systemName: "ellipsis.circle")
|
||||
}
|
||||
Button(role: .destructive) { store.deleteSession(sessionID) } label: {
|
||||
Label("Delete", systemImage: "trash")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user