(ruleId: string)
| 638 | |
| 639 | const ruleIndex = this.config.customRules.findIndex(r => r.id === ruleId); |
| 640 | |
| 641 | if (ruleIndex === -1) { |
| 642 | return { success: false }; |
| 643 | } |
| 644 | |
| 645 | const removedRule = this.config.customRules[ruleIndex]; |
| 646 | this.config.customRules.splice(ruleIndex, 1); |
| 647 | |
| 648 | await this.saveConfig(); |
| 649 | return { success: true, removedRule }; |
| 650 | } |
| 651 | |
| 652 | public getCustomRules(): CommandRule[] { |
| 653 | return this.config.customRules || []; |
| 654 | } |
| 655 | |
| 656 | public getCustomRulesByCommand(command?: string): CommandRule[] { |
| 657 | const rules = this.getCustomRules(); |
no test coverage detected