Comment on diff lines in the Changes view
This commit is contained in:
@@ -442,12 +442,7 @@ private struct FindingActions: View {
|
||||
busy = true
|
||||
Task {
|
||||
do {
|
||||
let sessions = try await store.api.client.listSessions(path: .init(taskId: taskId)).ok.body.json
|
||||
if let live = sessions.last(where: { $0.state != .completed }) {
|
||||
_ = try await store.api.client.sendMessage(path: .init(sessionId: live.id), body: .json(.init(text: text))).accepted
|
||||
} else {
|
||||
_ = try await store.api.client.createSession(path: .init(taskId: taskId), body: .json(.init(prompt: text))).created
|
||||
}
|
||||
try await store.messageTask(taskId, text)
|
||||
} catch {
|
||||
busy = false
|
||||
overlays.showAlert(errorText(error))
|
||||
|
||||
Reference in New Issue
Block a user