feat(lanes): record which CLI tool drives a lane

This commit is contained in:
2026-08-27 11:00:13 +07:00
parent 97839b1f97
commit a66331f008
4 changed files with 54 additions and 4 deletions
+4 -3
View File
@@ -25,11 +25,11 @@ const insertStmt = db.prepare(`
INSERT OR REPLACE INTO dashboard_runs (
id, session_id, mode, cwd, model, permission_mode, effort,
resume_session_id, prompt_preview, status, exit_code, started_at, ended_at,
lane_id
lane_id, tool
) VALUES (
@id, @session_id, @mode, @cwd, @model, @permission_mode, @effort,
@resume_session_id, @prompt_preview, @status, @exit_code, @started_at, @ended_at,
@lane_id
@lane_id, @tool
)
`);
@@ -44,7 +44,7 @@ const updateStmt = db.prepare(`
const RUN_COLUMNS = `id, session_id, mode, cwd, model, permission_mode, effort,
resume_session_id, prompt_preview, status, exit_code,
started_at, ended_at, lane_id`;
started_at, ended_at, lane_id, tool`;
const listStmt = db.prepare(`
SELECT ${RUN_COLUMNS}
@@ -89,6 +89,7 @@ function recordRun(handle) {
started_at: startedAt,
ended_at: endedAt,
lane_id: typeof handle.laneId === "number" ? handle.laneId : null,
tool: handle.tool === "codex" ? "codex" : "claude",
});
} catch {
/* persistence is best-effort */