reviewing is work
This commit is contained in:
@@ -125,6 +125,11 @@ final class ChatModel {
|
||||
builder.open && session?.state == .running
|
||||
}
|
||||
|
||||
var reviewing: Bool {
|
||||
let state = taskId.flatMap { store.findTask($0) }?.state
|
||||
return state == .reviewing || state == .reviewPending
|
||||
}
|
||||
|
||||
var subagents: Bool {
|
||||
(session?.subagents ?? 0) > 0
|
||||
}
|
||||
@@ -742,6 +747,7 @@ private struct TranscriptScroll: View {
|
||||
|
||||
var body: some View {
|
||||
let running = model.running
|
||||
let active = running || model.reviewing
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
if model.key == nil {
|
||||
@@ -845,8 +851,8 @@ private struct TranscriptScroll: View {
|
||||
}
|
||||
}
|
||||
.overlay {
|
||||
Rectangle().stroke(running ? accent : .clear, lineWidth: 1)
|
||||
.animation(.easeInOut(duration: 0.3), value: running)
|
||||
Rectangle().stroke(active ? accent : .clear, lineWidth: 1)
|
||||
.animation(.easeInOut(duration: 0.3), value: active)
|
||||
}
|
||||
.overlay(alignment: .topTrailing) {
|
||||
AttentionBar(model: model)
|
||||
@@ -1581,6 +1587,7 @@ private struct SnapshotRow: View {
|
||||
let showReview: () -> Void
|
||||
@Environment(Store.self) private var store
|
||||
@Environment(Overlays.self) private var overlays
|
||||
@Environment(\.paneAccent) private var accent
|
||||
@ViewState private var forking = false
|
||||
|
||||
var body: some View {
|
||||
@@ -1658,7 +1665,7 @@ private struct SnapshotRow: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.buttonStyle(SmallLinkButtonStyle(color: n > 0 ? Palette.warn : Palette.accent, fill: review?.state == .running ? Palette.accentTint : .clear))
|
||||
.buttonStyle(SmallLinkButtonStyle(color: n > 0 ? Palette.warn : Palette.accent, border: review?.state == .running ? accent : Palette.border))
|
||||
.disabled(review == nil || review?.state == .running)
|
||||
.help(review?.state == .running ? "Review in progress" : review == nil ? "Not reviewed" : "Scroll to the review of snapshot \(snap.n)")
|
||||
}
|
||||
|
||||
@@ -403,7 +403,6 @@ private struct WebButton: View {
|
||||
struct SmallLinkButtonStyle: ButtonStyle {
|
||||
var color = Palette.accent
|
||||
var border = Palette.border
|
||||
var fill = Color.clear
|
||||
@Environment(\.isEnabled) private var enabled
|
||||
|
||||
func makeBody(configuration: ButtonStyleConfiguration) -> some View {
|
||||
@@ -411,7 +410,6 @@ struct SmallLinkButtonStyle: ButtonStyle {
|
||||
.font(Fonts.font(11))
|
||||
.foregroundStyle(color)
|
||||
.padding(.horizontal, 6)
|
||||
.background(fill, in: RoundedRectangle(cornerRadius: 4))
|
||||
.overlay(RoundedRectangle(cornerRadius: 4).stroke(border))
|
||||
.opacity(enabled ? 1 : 0.45)
|
||||
.contentShape(Rectangle())
|
||||
|
||||
Reference in New Issue
Block a user