(command)
| 59 | ]; |
| 60 | |
| 61 | function _rtkRewrite(command) { |
| 62 | if (!_checkRtk()) return command; |
| 63 | // Don't double-rewrite if already starts with rtk |
| 64 | if (command.trimStart().startsWith('rtk ')) return command; |
| 65 | for (const { re, rewrite } of RTK_REWRITES) { |
| 66 | if (re.test(command.trimStart())) { |
| 67 | return rewrite(command.trimStart()); |
| 68 | } |
| 69 | } |
| 70 | return command; |
| 71 | } |
| 72 | |
| 73 | function showMiniDiff(tui, filePath, oldStr, newStr, lineNum) { |
| 74 | const diff = tui.renderDiff(filePath, oldStr, newStr, lineNum); |
no test coverage detected