merge: resolve v1.23.0 upstream conflicts, preserve custom git provider config
Resolved conflicts in 8 files by taking upstream refactored code: - desktop.ts: re-export DesktopSettings from registry - openchamberConfig.ts: simplified project setup client - persistence.ts: registry-derived settings, add git provider hydration - search.ts: upstream search entries + git provider entries - useConfigStore.ts: loadDesktopSettings() path - settings-helpers.js: add gitProviderId/gitModelId/gitProviders sanitization - DOCUMENTATION.md: upstream walkthrough docs - vite.config.ts: upstream SW glob patterns Custom fork additions preserved: - gitProviderId, gitModelId, gitProviders fields in settings registry - Git provider domain store hydration in persistence.ts - Git provider search entries in search.ts - Git provider sanitization in settings-helpers.js
This commit is contained in:
@@ -398,6 +398,27 @@ const handleLocalApiRequest = async (input: RequestInfo | URL, url: URL, init: R
|
||||
return unsupportedWebRouteResponse('Scheduled tasks');
|
||||
}
|
||||
|
||||
// Project setup (worktree setup commands, project actions, draft starters)
|
||||
// lives in the user's OpenChamber config dir; the extension host owns the
|
||||
// file the way the OpenChamber server does elsewhere.
|
||||
const projectSetupMatch = normalizedPathname.match(/^\/api\/projects\/([^/]+)\/config(\/shared)?$/);
|
||||
if (projectSetupMatch && (method === 'GET' || method === 'PUT') && !(method === 'GET' && projectSetupMatch[2])) {
|
||||
const projectId = decodeURIComponent(projectSetupMatch[1]);
|
||||
const payload = method === 'GET'
|
||||
? { projectId }
|
||||
: { projectId, patch: await extractJsonBody(input, init, method) };
|
||||
const bridgeType = method === 'GET'
|
||||
? 'api:project-setup:get'
|
||||
: projectSetupMatch[2] ? 'api:project-setup:update-shared' : 'api:project-setup:update';
|
||||
try {
|
||||
const data = await sendBridgeMessage(bridgeType, payload);
|
||||
return jsonResponse(data, 200);
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : 'Project config request failed';
|
||||
return jsonResponse({ error: message }, /must be|is required|unsupported characters/.test(message) ? 400 : 500);
|
||||
}
|
||||
}
|
||||
|
||||
if (normalizedPathname === '/api/fs/git-dirs') {
|
||||
return unsupportedWebRouteResponse('Nested git repository discovery');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user