Fix problems found in QA pass of build 1792795001
This commit is contained in:
@@ -56,6 +56,7 @@ final class ChatModel {
|
||||
@ObservationIgnored private var members: [String: String] = [:]
|
||||
private(set) var scrollRequest: (seq: Int, id: Int?, anchor: UnitPoint)?
|
||||
private(set) var fetching = false
|
||||
private(set) var stopping = false
|
||||
private(set) var older: [ByreEvent]?
|
||||
@ObservationIgnored var stuck = true
|
||||
@ObservationIgnored var prepended = false
|
||||
@@ -396,6 +397,9 @@ final class ChatModel {
|
||||
if let q = groups.first(where: { $0.id == "questions" }) {
|
||||
return flagged(q)
|
||||
}
|
||||
if task.state == .running && stopping {
|
||||
return ChatStatus(label: "Stopping…", help: "Waiting for the agent to stop its turn\(end)", tone: .working, group: nil)
|
||||
}
|
||||
if let busy = task.state == .running ? store.taskState(task) : store.progress(task) {
|
||||
return ChatStatus(label: busy.label, help: "\(busy.title)\(end)", tone: .working, group: nil)
|
||||
}
|
||||
@@ -555,7 +559,11 @@ final class ChatModel {
|
||||
}
|
||||
|
||||
func interrupt(_ sessionId: String, _ overlays: Overlays) {
|
||||
stopping = true
|
||||
Task {
|
||||
defer {
|
||||
stopping = false
|
||||
}
|
||||
do {
|
||||
_ = try await store.api.client.interruptSession(path: .init(sessionId: sessionId)).accepted
|
||||
} catch {
|
||||
@@ -1895,6 +1903,7 @@ private struct SnapshotRow: View {
|
||||
HStack(spacing: 8) {
|
||||
Rectangle().fill(Palette.border).frame(height: 1)
|
||||
Text("snapshot #\(snap.n)")
|
||||
.fixedSize()
|
||||
if !inherited {
|
||||
Button("Changes") {
|
||||
store.pinSnapshot(snap.n)
|
||||
|
||||
@@ -910,6 +910,9 @@ final class TranscriptBuilder {
|
||||
if bool(p, "handoff") {
|
||||
return note([.text("handoff written; continuing in a new session with a fresh context")])
|
||||
}
|
||||
if bool(p, "interrupted") {
|
||||
return note([.text("turn stopped")])
|
||||
}
|
||||
return Row(.turnEnd(error: bool(p, "is_error") ? "turn ended: \(jsString(p["subtype"]).replacingOccurrences(of: "_", with: " "))" : nil), taskId: rowTask)
|
||||
|
||||
case "session.created":
|
||||
|
||||
Reference in New Issue
Block a user