feat(deskclaw): rebrand + vibe presets + chat model picker

This commit is contained in:
DeskClaw Bot
2026-04-21 13:56:26 +00:00
Unverified
parent 92144ab639
commit aa4d1fe2b2
23 changed files with 377 additions and 73 deletions

View File

@@ -8,6 +8,7 @@ import {
removeAgentWorkspaceDirectory,
resolveAccountIdForAgent,
updateAgentModel,
updateDefaultModel,
updateAgentName,
} from '../../utils/agent-config';
import { deleteChannelAccountConfig } from '../../utils/channel-config';
@@ -135,6 +136,23 @@ export async function handleAgentRoutes(
return true;
}
if (url.pathname === '/api/agents/default-model' && req.method === 'PUT') {
try {
const body = await parseJsonBody<{ modelRef?: string | null }>(req);
const snapshot = await updateDefaultModel(body.modelRef ?? null);
try {
await syncAllProviderAuthToRuntime();
} catch (syncError) {
console.warn('[agents] Failed to sync runtime after updating default model:', syncError);
}
scheduleGatewayReload(ctx, 'update-default-model');
sendJson(res, 200, { success: true, ...snapshot });
} catch (error) {
sendJson(res, 500, { success: false, error: String(error) });
}
return true;
}
if (url.pathname.startsWith('/api/agents/') && req.method === 'PUT') {
const suffix = url.pathname.slice('/api/agents/'.length);
const parts = suffix.split('/').filter(Boolean);