Switch to the transcript after sending a review finding to fix
This commit is contained in:
Vendored
+2
-1
@@ -1,7 +1,7 @@
|
||||
import { get, post } from "./api.js";
|
||||
import { ago, errorText, h, replace, showAlert } from "./dom.js";
|
||||
import { markdown } from "./markdown.js";
|
||||
import { onEach, pickReview, state } from "./state.js";
|
||||
import { focusTask, onEach, pickReview, state } from "./state.js";
|
||||
const severities = ["critical", "high", "medium", "low", "info"];
|
||||
export function isReviewEvent(ev) {
|
||||
return ev.kind.startsWith("review.");
|
||||
@@ -160,6 +160,7 @@ function fixButton(taskId, r, f, where) {
|
||||
await post("/api/tasks/{taskId}/sessions", { path: { taskId }, body: { prompt: text } });
|
||||
}
|
||||
replace(button, "sent");
|
||||
focusTask(taskId);
|
||||
}
|
||||
catch (err) {
|
||||
button.disabled = false;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+2
-1
@@ -1,7 +1,7 @@
|
||||
import { get, post, type ByreEvent, type Schemas } from "./api.js";
|
||||
import { ago, errorText, h, replace, showAlert } from "./dom.js";
|
||||
import { markdown } from "./markdown.js";
|
||||
import { onEach, pickReview, state } from "./state.js";
|
||||
import { focusTask, onEach, pickReview, state } from "./state.js";
|
||||
|
||||
type Review = Schemas["Review"];
|
||||
|
||||
@@ -226,6 +226,7 @@ function fixButton(taskId: string, r: Review, f: Record<string, unknown>, where:
|
||||
await post("/api/tasks/{taskId}/sessions", { path: { taskId }, body: { prompt: text } });
|
||||
}
|
||||
replace(button, "sent");
|
||||
focusTask(taskId);
|
||||
} catch (err) {
|
||||
button.disabled = false;
|
||||
void showAlert(errorText(err));
|
||||
|
||||
Reference in New Issue
Block a user