hunk.code_window: import { useAppSettingHelper } from '../hooks/affine/use-app-setting-helper';
   import { useSidebarDrag } from '../hooks/affine/use-sidebar-drag';
   import { useNavigateHelper } from '../hooks/use-navigate-helper';
   import { useRegisterWorkspaceCommands } from '../hooks/use-register-workspace-commands';
   import {
     AllWorkspaceModals,
     CurrentWorkspaceModals,
   } from '../providers/modal-provider';
  
hunk.labels: keep keep keep add keep keep keep keep
hunk.after_edit: import { Workbench } from '../modules/workbench';
  
hunk.file_path: packages/frontend/core/src/layouts/workspace-layout.tsx
hunk.type: add
file: window.requestIdleCallback =
    window.requestIdleCallback ||
    function (cb) {
      const start = Date.now();
      return setTimeout(function () {
        cb({
          didTimeout: false,
          timeRemaining: function () {
            return Math.max(0, 50 - (Date.now() - start));
          },
        });
      }, 1);
    };
  
  window.cancelIdleCallback =
    window.cancelIdleCallback ||
    function (id) {
      clearTimeout(id);
    };
  