@devries-cameron20 / t3code-1 / commits / f41e8b3c10
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(shared): Windows-style paths stay out of the slash menu (#27851)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

samkelly880 committed Nov 13, 2026 at 11:44 UTC f41e8b3c10fa7657b7a61626ff6ed4bda686c34a
2 files changed +4 -2
packages/shared/src/composerTrigger.test.ts
+2
@@ -11,6 +11,8 @@ describe("detectComposerTrigger", () => {
11 ["Run /tmp/build.sh", "Run /tmp/build.sh".length],
12 ["/etc/hosts", "/etc/hosts".length],
13 ["Use /etc/hosts now", "Use /et".length],
14 + ["cmd /foo\\bar", "cmd /foo\\bar".length],
15 + ["/Windows\\System32", "/Windows\\System32".length],
16 ])("keeps the path in %j out of the slash menu", (text, cursor) => {
17 expect(detectComposerTrigger(text, cursor)).toBeNull();
18 });
packages/shared/src/composerTrigger.ts
+2 -2
@@ -45,7 +45,7 @@ function isWhitespace(char: string): boolean {
45 return char === " " || char === "\n" || char === "\t" || char === "\r";
46 }
47
48 -/** A second slash makes the whole word a path, even when the caret precedes that slash. */
48 +/** A second slash or backslash makes the whole word a path, even when the caret precedes it. */
49 export function isPathWord(
50 text: string,
51 wordStart: number,
@@ -56,7 +56,7 @@ export function isPathWord(
56 while (wordEnd < text.length && !isWhitespaceChar(text[wordEnd] ?? "")) {
57 wordEnd += 1;
58 }
59 - return text.slice(wordStart + 1, wordEnd).includes("/");
59 + return /[/\\]/.test(text.slice(wordStart + 1, wordEnd));
60 }
61
62 /**