* 从历史记录中删除
(appPath: string, featureCode?: string, name?: string)
| 886 | * 从历史记录中删除 |
| 887 | */ |
| 888 | private removeFromHistory(appPath: string, featureCode?: string, name?: string): void { |
| 889 | try { |
| 890 | const originalHistory: any[] = databaseAPI.dbGet('command-history') || [] |
| 891 | |
| 892 | const history = filterOutCommand(originalHistory, appPath, featureCode, name) |
| 893 | |
| 894 | databaseAPI.dbPut('command-history', history) |
| 895 | console.log('[Commands] 已从历史记录删除:', appPath, featureCode) |
| 896 | |
| 897 | // 通知前端重新加载历史记录 |
| 898 | this.notifyRenderer('history-changed') |
| 899 | } catch (error) { |
| 900 | console.error('[Commands] 从历史记录删除失败:', error) |
| 901 | } |
| 902 | } |
| 903 | |
| 904 | /** |
| 905 | * 固定应用 |
no test coverage detected