Show when each extension was last updated

MCP, skill and tool rows in Settings say "Updated 5m ago" beside how
they're reached and who gets them. updated_at now means a change to an
extension's settings (an edit, or any Access save): runs, connections and
MCP syncs keep their own last_checked_at / last_synced_at and no longer
touch it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-26 08:07:44 +01:00
co-authored by Claude Opus 5.5
parent b9008b22cb
commit 2df1bf83f4
18 changed files with 62 additions and 16 deletions
@@ -11,13 +11,12 @@ type Params = {
/**
* Saves how a custom tool's run went (`status`, `last_error`,
* `last_checked_at`), for its row in Settings, under Tools. Never throws:
* a run doesn't fail over its bookkeeping.
* a run doesn't fail over its bookkeeping. `updated_at` is left alone: it
* says when the tool's settings last changed.
*/
export default async function recordCustomToolRun({ custom_tool_id, error }: Params) {
const now = Date.now();
await BunSQLite.sql({
sql: `UPDATE custom_tools SET status = ?, last_error = ?, last_checked_at = ?, updated_at = ? WHERE id = ?`,
values: [error ? "error" : "ok", (error || "").slice(0, 4000), now, now, custom_tool_id],
sql: `UPDATE custom_tools SET status = ?, last_error = ?, last_checked_at = ? WHERE id = ?`,
values: [error ? "error" : "ok", (error || "").slice(0, 4000), Date.now(), custom_tool_id],
}).catch(() => {});
}