import { computeEditorListPatch } from './editor-chat-list.js';
/** Keeps `editorRepos` + `cursorListMode` in sync without touching agents:index flow. */
export function installEditorListSync(stateManager) {
    const sync = () => {
        const patch = computeEditorListPatch(stateManager.getState());
        if (patch)
            stateManager.patchNow(patch);
    };
    stateManager.on('state:patch', sync);
    stateManager.on('state:full', sync);
}
