MCPcopy
hub / github.com/Doorman11991/smallcode / _rtkRewrite

Function _rtkRewrite

bin/executor.js:61–71  ·  view source on GitHub ↗
(command)

Source from the content-addressed store, hash-verified

59];
60
61function _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
73function showMiniDiff(tui, filePath, oldStr, newStr, lineNum) {
74 const diff = tui.renderDiff(filePath, oldStr, newStr, lineNum);

Callers 1

executeToolFunction · 0.85

Calls 1

_checkRtkFunction · 0.85

Tested by

no test coverage detected