mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-07 02:58:02 +00:00
docs(factory-plugin): note the Execute tokenizer's quoting limit
This commit is contained in:
parent
550ee29e9e
commit
bffd641610
1 changed files with 6 additions and 0 deletions
|
|
@ -91,6 +91,12 @@ function extractPattern(toolName, toolInput) {
|
|||
const cmd = toolInput.command || '';
|
||||
if (!/\brg\b|\bgrep\b/.test(cmd)) return null;
|
||||
|
||||
// NOTE: split(/\s+/) cannot handle shell quoting, same as the Cursor
|
||||
// integration. `rg "User Service" src/` yields "User" (first token after
|
||||
// rg/grep, quotes stripped) rather than the full phrase — BM25 is already
|
||||
// token-tolerant, so the multi-word pattern is deliberately not
|
||||
// reconstructed. Worst case is augment context for a narrower term than
|
||||
// the agent searched. Quoted single tokens (`rg "validateUser"`) are exact.
|
||||
const tokens = cmd.split(/\s+/);
|
||||
let foundCmd = false;
|
||||
let skipNext = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue