Uninote
Uninote
用户根目录
brdr
common
programming
docs
tests
后端试题
问题讨论

文件树、打包、过滤

//.,, 核心过滤逻辑
export function matchingTreePaths(nodes, matches, timeFilter, showEmpty = false) {
function showFileTimeFilterPopover() {

快捷键、热键

  const hotkeys = await createWindowHotkeyController({ application: app,
    getMainWindow: () => preferredMainWindow || mainWindow,
    toggleSnippetWindow: () => snippetController?.toggle(),
    toggleQuickCmdForm: () => void quickCmdFormController?.show().catch((error) => console.warn('Quick Cmd Form 打开失败', error)),
    adjustMouse, globalShortcut });
          if (!globalShortcut.register(key, () => commands.execute(command))) {
// Preserve the editing focus before the click opens the lazily loaded palette.
// Keyboard activation still uses the button's normal focus behavior.
//.,, 保持焦点,便于恢复
document.querySelector('#command-palette-button').addEventListener('mousedown', (event) => {
  if (event.button === 0) event.preventDefault();
});
export class CommandRegistry {
  constructor() { this.commands = new Map(); }
  register(command) {
    if (!command.id || this.commands.has(command.id)) throw new Error(`重复的命令 ID:${command.id}`);
    this.commands.set(command.id, { source: 'system', ...command });
  }
  execute(id) { return this.commands.get(id)?.execute(); }
}

architect

codes

点赞(0) 阅读(8) 举报
目录
标题