fix: next round of cleanups

This commit is contained in:
2026-02-27 11:26:00 +01:00
parent c6edacba51
commit 18e0557ef5
25 changed files with 1021 additions and 1415 deletions

View File

@@ -94,6 +94,18 @@ export const ENGINE_MAP: Record<string, EngineGetter> = {
const { taskManager } = require('../engine/TaskManager');
return taskManager;
},
sync: () => {
const { getGitApiAdapter } = require('../engine/GitApiAdapter');
return getGitApiAdapter();
},
publish: () => {
const { getPublishApiAdapter } = require('../engine/PublishApiAdapter');
return getPublishApiAdapter();
},
app: () => {
const { getAppApiAdapter } = require('../engine/AppApiAdapter');
return getAppApiAdapter();
},
};
// Map API method names to engine method names where they differ
@@ -199,10 +211,7 @@ export async function invokeMainProcessPythonApi(method: string, args: Record<st
'media.importDialog', 'media.replaceFileDialog', 'media.getFilePath',
'app.openFolder', 'app.selectFolder', 'app.showItemInFolder',
'app.getTitleBarMetrics', 'app.notifyRendererReady', 'app.triggerMenuAction',
'app.getBlogmarkBookmarklet', 'app.copyToClipboard',
'chat.sendMessage', 'chat.abortMessage', 'chat.analyzeTaxonomy',
'chat.analyzeMediaImage',
'sync.configure', 'sync.start', 'sync.stopAutoSync',
'app.getBlogmarkBookmarklet', 'app.copyToClipboard', 'app.setPreviewPostTarget',
]);
if (unsafeMethods.has(method)) {