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:
@@ -11,13 +11,12 @@ type Params = {
|
||||
/**
|
||||
* Saves whether a bot's run could connect to an MCP server, so its row in
|
||||
* Settings, under MCPs, shows a server that stopped answering (or came
|
||||
* back). Its tools listing is left as it was. Never throws.
|
||||
* back). Its tools listing and `updated_at` (when its settings last
|
||||
* changed) are left as they were. Never throws.
|
||||
*/
|
||||
export default async function recordMcpServerConnection({ mcp_server_id, error }: Params) {
|
||||
const now = Date.now();
|
||||
|
||||
await BunSQLite.sql({
|
||||
sql: `UPDATE mcp_servers SET status = ?, last_error = ?, last_synced_at = ?, updated_at = ? WHERE id = ?`,
|
||||
values: [error ? "error" : "ok", (error || "").slice(0, 4000), now, now, mcp_server_id],
|
||||
sql: `UPDATE mcp_servers SET status = ?, last_error = ?, last_synced_at = ? WHERE id = ?`,
|
||||
values: [error ? "error" : "ok", (error || "").slice(0, 4000), Date.now(), mcp_server_id],
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user