mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-21 02:20:12 +00:00
- Add log property to PluginAPI interface and implementation - Extend PluginBridgeService to provide Log.withContext for each plugin - Create simplified logger helper for sync-md plugin with fallback - Replace console.log statements in sync-md with centralized logging - All plugin logs now integrate with main app's Log class and history
21 lines
626 B
TypeScript
21 lines
626 B
TypeScript
import { initSyncManager } from './sync/sync-manager';
|
|
import { initUiBridge } from './ui-bridge';
|
|
import { loadLocalConfig } from './local-config';
|
|
import { log } from '../shared/logger';
|
|
|
|
export const initPlugin = (): void => {
|
|
log.log('initPlugin called');
|
|
|
|
// Initialize UI bridge to handle messages
|
|
initUiBridge();
|
|
log.log('UI bridge initialized');
|
|
|
|
// Load saved config from local storage and start sync if enabled
|
|
const config = loadLocalConfig();
|
|
log.log('Loaded config:', config);
|
|
|
|
if (config?.filePath) {
|
|
// Transform config to match sync-manager expectations
|
|
initSyncManager(config);
|
|
}
|
|
};
|