feat(HAI-007): complete Step 1 — set specifying status during triage
This commit is contained in:
@@ -20,7 +20,7 @@ const COLUMN_TEXT_COLOR_MAP: Record<Column, string> = {
|
|||||||
done: "var(--done)",
|
done: "var(--done)",
|
||||||
};
|
};
|
||||||
|
|
||||||
const ACTIVE_STATUSES = new Set(["planning", "researching", "executing", "finalizing", "merging"]);
|
const ACTIVE_STATUSES = new Set(["planning", "researching", "executing", "finalizing", "merging", "specifying"]);
|
||||||
|
|
||||||
interface TaskCardProps {
|
interface TaskCardProps {
|
||||||
task: Task;
|
task: Task;
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ export class TriageProcessor {
|
|||||||
|
|
||||||
console.log(`[triage] Specifying ${task.id}: ${task.title || task.description.slice(0, 60)}`);
|
console.log(`[triage] Specifying ${task.id}: ${task.title || task.description.slice(0, 60)}`);
|
||||||
this.options.onSpecifyStart?.(task);
|
this.options.onSpecifyStart?.(task);
|
||||||
|
await this.store.updateTask(task.id, { status: "specifying" });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const detail = await this.store.getTask(task.id);
|
const detail = await this.store.getTask(task.id);
|
||||||
@@ -211,6 +212,7 @@ export class TriageProcessor {
|
|||||||
await session.prompt(agentPrompt);
|
await session.prompt(agentPrompt);
|
||||||
|
|
||||||
// Move to todo
|
// Move to todo
|
||||||
|
await this.store.updateTask(task.id, { status: null });
|
||||||
await this.store.moveTask(task.id, "todo");
|
await this.store.moveTask(task.id, "todo");
|
||||||
console.log(`[triage] ✓ ${task.id} specified and moved to todo`);
|
console.log(`[triage] ✓ ${task.id} specified and moved to todo`);
|
||||||
this.options.onSpecifyComplete?.(task);
|
this.options.onSpecifyComplete?.(task);
|
||||||
@@ -218,6 +220,7 @@ export class TriageProcessor {
|
|||||||
session.dispose();
|
session.dispose();
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
|
await this.store.updateTask(task.id, { status: null }).catch(() => {});
|
||||||
console.error(`[triage] ✗ ${task.id} specification failed:`, err.message);
|
console.error(`[triage] ✗ ${task.id} specification failed:`, err.message);
|
||||||
this.options.onSpecifyError?.(task, err);
|
this.options.onSpecifyError?.(task, err);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user