UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

28 lines (24 loc) 657 B
import { ShortcutUpdateResult } from '@/core/ui/ShortcutManager'; import { ControllerModule, ipcClientEvent } from '.'; export default class ShortcutController extends ControllerModule { /** * 获取所有快捷键配置 */ @ipcClientEvent('getShortcutsConfig') getShortcutsConfig() { return this.app.shortcutManager.getShortcutsConfig(); } /** * 更新单个快捷键配置 */ @ipcClientEvent('updateShortcutConfig') updateShortcutConfig({ id, accelerator, }: { accelerator: string; id: string; }): ShortcutUpdateResult { return this.app.shortcutManager.updateShortcutConfig(id, accelerator); } }