Open History to see the last commit
1import { filterComposerPullRequestMatches } from "@t3tools/shared/composerPullRequestMatches";
2import { EnvironmentId, MessageId, ThreadId, type AssistantCitation } from "@t3tools/contracts";
3import {
4 collectAssistantCitations,
5 expandAssistantCitationsForProvider,
6 serializeAssistantCitation,
7} from "@t3tools/shared/assistantCitations";
8import { describe, expect, it } from "vite-plus/test";
9β
10import {
11 clampCollapsedComposerCursor,
12 collapseExpandedComposerCursor,
13 composerSubmissionIntentForEnter,
14 detectComposerTrigger,
15 expandCollapsedComposerCursor,
16 formatAssistantCitationForComposer,
17 isCollapsedCursorAdjacentToInlineToken,
18 parseStandaloneComposerSlashCommand,
19 replaceTextRange,
20} from "./composer-logic";
21import { formatTerminalContextReference } from "./lib/terminalContext";
22β
23const terminalReference = formatTerminalContextReference({
24 id: "ctx-1",
25 terminalLabel: "Terminal 1",
26 lineStart: 3,
27 lineEnd: 4,
28});
29β
30const citation: AssistantCitation = {
31 version: 1,
32 environmentId: EnvironmentId.make("environment-1"),
33 threadId: ThreadId.make("thread-1"),
34 messageId: MessageId.make("message-1"),
35 text: "Keep Unicode π and punctuation (here).",
36 start: 3,
37 end: 40,
38 prefix: "ε: ",
39 suffix: " εΎ",
40};
41const citationSource = serializeAssistantCitation(citation).replaceAll("+", "%20");
42β
43describe("formatAssistantCitationForComposer", () => {
44 it.each([undefined, "", " \n\t "])(
45 "keeps citation-only insertion for a blank comment %j",
46 (comment) => {
47 expect(formatAssistantCitationForComposer(citation, comment)).toBe(
48 `${serializeAssistantCitation(citation)} `,
49 );
50 },
51 );
52β
53 it("binds a multiline comment to its citation without adding standalone prompt text", () => {
54 const comment = 'What does "keep" mean? π\n Please show an example.';
55 const text = formatAssistantCitationForComposer(citation, ` ${comment}\n`);
56 const boundCitation = { ...citation, comment };
57 expect(text).toBe(`${serializeAssistantCitation(boundCitation)} `);
58 expect(collectAssistantCitations(text).map((entry) => entry.citation)).toEqual([boundCitation]);
59 expect(expandAssistantCitationsForProvider(text)).toMatch(/^\[assistant-quote-1\] \n\n/);
60 });
61});
62β
63describe("composerSubmissionIntentForEnter", () => {
64 it("submits plain Enter on desktop", () => {
65 expect(
66 composerSubmissionIntentForEnter({
67 isMobileViewport: false,
68 shiftKey: false,
69 modifierKey: false,
70 isDraftThread: true,
71 }),
72 ).toBe("foreground");
73 });
74β
75 it("inserts a newline for plain Enter on mobile", () => {
76 expect(
77 composerSubmissionIntentForEnter({
78 isMobileViewport: true,
79 shiftKey: false,
80 modifierKey: false,
81 isDraftThread: true,
82 }),
83 ).toBeNull();
84 });
85β
86 it("inserts a newline for Shift+Enter", () => {
87 expect(
88 composerSubmissionIntentForEnter({
89 isMobileViewport: false,
90 shiftKey: true,
91 modifierKey: false,
92 isDraftThread: true,
93 }),
94 ).toBeNull();
95 });
96β
97 it("submits a new thread in the background with Mod+Enter", () => {
98 expect(
99 composerSubmissionIntentForEnter({
100 isMobileViewport: false,
101 shiftKey: false,
102 modifierKey: true,
103 isDraftThread: true,
104 }),
105 ).toBe("background");
106 });
107β
108 it("keeps Mod+Enter in the foreground for an active thread", () => {
109 expect(
110 composerSubmissionIntentForEnter({
111 isMobileViewport: false,
112 shiftKey: false,
113 modifierKey: true,
114 isDraftThread: false,
115 }),
116 ).toBe("foreground");
117 });
118});
119β
120describe("detectComposerTrigger", () => {
121 it("detects @path trigger at cursor", () => {
122 const text = "Please check @src/com";
123 const trigger = detectComposerTrigger(text, text.length);
124β
125 expect(trigger).toEqual({
126 kind: "path",
127 query: "src/com",
128 rangeStart: "Please check ".length,
129 rangeEnd: text.length,
130 });
131 });
132β
133 it("detects slash command token while typing command name", () => {
134 const text = "/mo";
135 const trigger = detectComposerTrigger(text, text.length);
136β
137 expect(trigger).toEqual({
138 kind: "slash-command",
139 query: "mo",
140 rangeStart: 0,
141 rangeEnd: text.length,
142 });
143 });
144β
145 it("keeps /model as a slash command item", () => {
146 const text = "/model";
147 const trigger = detectComposerTrigger(text, text.length);
148β
149 expect(trigger).toEqual({
150 kind: "slash-command",
151 query: "model",
152 rangeStart: 0,
153 rangeEnd: text.length,
154 });
155 });
156β
157 it("does not keep a subcommand trigger active after /model arguments", () => {
158 const text = "/model spark";
159 const trigger = detectComposerTrigger(text, text.length);
160β
161 expect(trigger).toBeNull();
162 });
163β
164 it("detects non-model slash commands while typing", () => {
165 const text = "/pl";
166 const trigger = detectComposerTrigger(text, text.length);
167β
168 expect(trigger).toEqual({
169 kind: "slash-command",
170 query: "pl",
171 rangeStart: 0,
172 rangeEnd: text.length,
173 });
174 });
175β
176 it("keeps slash command detection active for provider commands", () => {
177 const text = "/rev";
178 const trigger = detectComposerTrigger(text, text.length);
179β
180 expect(trigger).toEqual({
181 kind: "slash-command",
182 query: "rev",
183 rangeStart: 0,
184 rangeEnd: text.length,
185 });
186 });
187β
188 it("detects $skill trigger at cursor", () => {
189 const text = "Use $gh-fi";
190 const trigger = detectComposerTrigger(text, text.length);
191β
192 expect(trigger).toEqual({
193 kind: "skill",
194 query: "gh-fi",
195 rangeStart: "Use ".length,
196 rangeEnd: text.length,
197 });
198 });
199β
200 it("detects a pull request number at a token boundary", () => {
201 const text = "Compare this with #8737";
202β
203 expect(detectComposerTrigger(text, text.length)).toEqual({
204 kind: "pull-request",
205 query: "8737",
206 rangeStart: "Compare this with ".length,
207 rangeEnd: text.length,
208 });
209 });
210β
211 it("opens pull request completion from a bare hash", () => {
212 const text = "Compare with #";
213β
214 expect(detectComposerTrigger(text, text.length)).toEqual({
215 kind: "pull-request",
216 query: "",
217 rangeStart: "Compare with ".length,
218 rangeEnd: text.length,
219 });
220 });
221β
222 it("detects a one-word pull request search", () => {
223 const text = "Compare with #composer";
224β
225 expect(detectComposerTrigger(text, text.length)).toEqual({
226 kind: "pull-request",
227 query: "composer",
228 rangeStart: "Compare with ".length,
229 rangeEnd: text.length,
230 });
231 });
232β
233 it("supports hyphenated pull request search terms", () => {
234 const text = "Find #inline-context";
235β
236 expect(detectComposerTrigger(text, text.length)).toEqual({
237 kind: "pull-request",
238 query: "inline-context",
239 rangeStart: "Find ".length,
240 rangeEnd: text.length,
241 });
242 });
243β
244 it("does not keep pull request completion active for headings or embedded hashes", () => {
245 expect(detectComposerTrigger("# Heading", "# Heading".length)).toBeNull();
246 expect(detectComposerTrigger("issue#123", "issue#123".length)).toBeNull();
247 });
248β
249 it("detects @path trigger in the middle of existing text", () => {
250 // User typed @ between "inspect " and "in this sentence"
251 const text = "Please inspect @in this sentence";
252 const cursorAfterAt = "Please inspect @".length;
253β
254 const trigger = detectComposerTrigger(text, cursorAfterAt);
255 expect(trigger).toEqual({
256 kind: "path",
257 query: "",
258 rangeStart: "Please inspect ".length,
259 rangeEnd: cursorAfterAt,
260 });
261 });
262β
263 it("detects @path trigger with query typed mid-text", () => {
264 // User typed @sr between "inspect " and "in this sentence"
265 const text = "Please inspect @srin this sentence";
266 const cursorAfterQuery = "Please inspect @sr".length;
267β
268 const trigger = detectComposerTrigger(text, cursorAfterQuery);
269 expect(trigger).toEqual({
270 kind: "path",
271 query: "sr",
272 rangeStart: "Please inspect ".length,
273 rangeEnd: cursorAfterQuery,
274 });
275 });
276β
277 it("detects trigger with true cursor even when regex-based mention detection would false-match", () => {
278 // MENTION_TOKEN_REGEX can false-match plain text like "@in" as a mention.
279 // The fix bypasses it by computing the expanded cursor from the Lexical node tree.
280 const text = "Please inspect @in this sentence";
281 const cursorAfterAt = "Please inspect @".length;
282β
283 const trigger = detectComposerTrigger(text, cursorAfterAt);
284 expect(trigger).not.toBeNull();
285 expect(trigger?.kind).toBe("path");
286 expect(trigger?.query).toBe("");
287 });
288});
289β
290describe("filterComposerPullRequestMatches", () => {
291 const entries = [
292 {
293 number: 7,
294 projectId: "project-1",
295 repository: "t3tools/t3code",
296 updatedAt: "2026-09-01T12:00:00.000Z",
297 },
298 {
299 number: 8987,
300 projectId: "project-1",
301 repository: "T3Tools/T3Code",
302 updatedAt: "2026-09-03T12:00:00.000Z",
303 },
304 {
305 number: 27,
306 projectId: "project-1",
307 repository: "t3tools/t3code",
308 updatedAt: "2026-09-02T12:00:00.000Z",
309 },
310 {
311 number: 27,
312 projectId: "project-1",
313 repository: "t3tools/t3code",
314 updatedAt: "2026-09-01T13:00:00.000Z",
315 },
316 {
317 number: 70,
318 projectId: "project-2",
319 repository: "t3tools/other",
320 updatedAt: "2026-09-04T12:00:00.000Z",
321 },
322 ];
323β
324 it("matches and de-duplicates number fragments within one repository, exact match first", () => {
325 expect(
326 filterComposerPullRequestMatches({
327 entries,
328 projectId: "project-1",
329 repository: "t3tools/t3code",
330 query: "7",
331 limit: 10,
332 }).map((entry) => entry.number),
333 ).toEqual([7, 8987, 27]);
334 });
335β
336 it("keeps an older exact match when newer substring matches would fill the limit", () => {
337 const exact = {
338 number: 7,
339 projectId: "project-1",
340 repository: "t3tools/t3code",
341 updatedAt: "2020-01-01T00:00:00.000Z",
342 };
343 const newerSubstringMatches = Array.from({ length: 12 }, (_unused, index) => ({
344 number: 700 + index,
345 projectId: "project-1",
346 repository: "t3tools/t3code",
347 updatedAt: `2026-09-${String(index + 1).padStart(2, "0")}T12:00:00.000Z`,
348 }));
349 const matches = filterComposerPullRequestMatches({
350 entries: [...newerSubstringMatches, exact],
351 projectId: "project-1",
352 repository: "t3tools/t3code",
353 query: "7",
354 limit: 10,
355 });
356 expect(matches[0]?.number).toBe(7);
357 expect(matches).toHaveLength(10);
358 });
359β
360 it("uses an empty query for a capped recent list", () => {
361 expect(
362 filterComposerPullRequestMatches({
363 entries,
364 projectId: "project-1",
365 repository: "t3tools/t3code",
366 query: "",
367 limit: 2,
368 }).map((entry) => entry.number),
369 ).toEqual([8987, 27]);
370 });
371});
372β
373describe("replaceTextRange", () => {
374 it("replaces a text range and returns new cursor", () => {
375 const replaced = replaceTextRange("hello @src", 6, 10, "");
376 expect(replaced).toEqual({
377 text: "hello ",
378 cursor: 6,
379 });
380 });
381});
382β
383describe("expandCollapsedComposerCursor", () => {
384 it("keeps cursor unchanged when no mention segment is present", () => {
385 expect(expandCollapsedComposerCursor("plain text", 5)).toBe(5);
386 });
387β
388 it("maps collapsed mention cursor to expanded text cursor", () => {
389 const text = "what's in my @AGENTS.md fsfdas";
390 const collapsedCursorAfterMention = "what's in my ".length + 2;
391 const expandedCursorAfterMention = "what's in my @AGENTS.md ".length;
392β
393 expect(expandCollapsedComposerCursor(text, collapsedCursorAfterMention)).toBe(
394 expandedCursorAfterMention,
395 );
396 });
397β
398 it("maps collapsed quoted mention cursor to expanded text cursor", () => {
399 const text = 'what is in @"My File.md" please';
400 const collapsedCursorAfterMention = "what is in ".length + 2;
401 const expandedCursorAfterMention = 'what is in @"My File.md" '.length;
402β
403 expect(expandCollapsedComposerCursor(text, collapsedCursorAfterMention)).toBe(
404 expandedCursorAfterMention,
405 );
406 });
407β
408 it("maps collapsed markdown file links to their expanded source offsets", () => {
409 const text = "what's in [AGENTS.md](AGENTS.md) please";
410 const collapsedCursorAfterMention = "what's in ".length + 2;
411 const expandedCursorAfterMention = "what's in [AGENTS.md](AGENTS.md) ".length;
412β
413 expect(expandCollapsedComposerCursor(text, collapsedCursorAfterMention)).toBe(
414 expandedCursorAfterMention,
415 );
416 });
417β
418 it("allows path trigger detection to close after selecting a mention", () => {
419 const text = "what's in my @AGENTS.md ";
420 const collapsedCursorAfterMention = "what's in my ".length + 2;
421 const expandedCursor = expandCollapsedComposerCursor(text, collapsedCursorAfterMention);
422β
423 expect(detectComposerTrigger(text, expandedCursor)).toBeNull();
424 });
425β
426 it("maps collapsed skill cursor to expanded text cursor", () => {
427 const text = "run $review-follow-up then";
428 const collapsedCursorAfterSkill = "run ".length + 2;
429 const expandedCursorAfterSkill = "run $review-follow-up ".length;
430β
431 expect(expandCollapsedComposerCursor(text, collapsedCursorAfterSkill)).toBe(
432 expandedCursorAfterSkill,
433 );
434 });
435});
436β
437describe("collapseExpandedComposerCursor", () => {
438 it("keeps cursor unchanged when no mention segment is present", () => {
439 expect(collapseExpandedComposerCursor("plain text", 5)).toBe(5);
440 });
441β
442 it("maps expanded mention cursor back to collapsed cursor", () => {
443 const text = "what's in my @AGENTS.md fsfdas";
444 const collapsedCursorAfterMention = "what's in my ".length + 2;
445 const expandedCursorAfterMention = "what's in my @AGENTS.md ".length;
446β
447 expect(collapseExpandedComposerCursor(text, expandedCursorAfterMention)).toBe(
448 collapsedCursorAfterMention,
449 );
450 });
451β
452 it("maps expanded quoted mention cursor back to collapsed cursor", () => {
453 const text = 'what is in @"My File.md" please';
454 const collapsedCursorAfterMention = "what is in ".length + 2;
455 const expandedCursorAfterMention = 'what is in @"My File.md" '.length;
456β
457 expect(collapseExpandedComposerCursor(text, expandedCursorAfterMention)).toBe(
458 collapsedCursorAfterMention,
459 );
460 });
461β
462 it("maps expanded markdown file link cursors back to collapsed offsets", () => {
463 const text = "what's in [AGENTS.md](AGENTS.md) please";
464 const collapsedCursorAfterMention = "what's in ".length + 2;
465 const expandedCursorAfterMention = "what's in [AGENTS.md](AGENTS.md) ".length;
466β
467 expect(collapseExpandedComposerCursor(text, expandedCursorAfterMention)).toBe(
468 collapsedCursorAfterMention,
469 );
470 });
471β
472 it("keeps package-like text expanded when another mention already exists earlier", () => {
473 const text = "open @AGENTS.md then @src/index.ts ";
474 const expandedCursor = text.length;
475 const collapsedCursor = collapseExpandedComposerCursor(text, expandedCursor);
476β
477 expect(collapsedCursor).toBe("open ".length + 1 + " then @src/index.ts ".length);
478 expect(expandCollapsedComposerCursor(text, collapsedCursor)).toBe(expandedCursor);
479 });
480β
481 it("collapses only genuine mentions when package-like text exists earlier", () => {
482 const text = "install @scope/pkg then @README.md ";
483 const expandedCursor = text.length;
484 const collapsedCursor = collapseExpandedComposerCursor(text, expandedCursor);
485β
486 expect(collapsedCursor).toBe("install @scope/pkg then ".length + 1 + " ".length);
487 expect(expandCollapsedComposerCursor(text, collapsedCursor)).toBe(expandedCursor);
488 });
489β
490 it("maps expanded skill cursor back to collapsed cursor", () => {
491 const text = "run $review-follow-up then";
492 const collapsedCursorAfterSkill = "run ".length + 2;
493 const expandedCursorAfterSkill = "run $review-follow-up ".length;
494β
495 expect(collapseExpandedComposerCursor(text, expandedCursorAfterSkill)).toBe(
496 collapsedCursorAfterSkill,
497 );
498 });
499});
500β
501describe("clampCollapsedComposerCursor", () => {
502 it("clamps to collapsed prompt length when mentions are present", () => {
503 const text = "open @AGENTS.md then ";
504β
505 expect(clampCollapsedComposerCursor(text, text.length)).toBe(
506 "open ".length + 1 + " then ".length,
507 );
508 expect(clampCollapsedComposerCursor(text, Number.POSITIVE_INFINITY)).toBe(
509 "open ".length + 1 + " then ".length,
510 );
511 });
512});
513β
514describe("assistant citation cursor offsets", () => {
515 it("roundtrips every collapsed offset across citations, mentions, skills, and Unicode", () => {
516 const prefix = "π(";
517 const between = "),ιͺ";
518 const after = " @AGENTS.md $review ";
519 const text = `${prefix}${citationSource}${between}${citationSource}${after}${terminalReference}!`;
520 const collapsedLength = `${prefix}β‘${between}β‘ β‘ β‘ β‘!`.length;
521 const boundaries = [
522 [prefix.length, prefix.length],
523 [prefix.length + 1, prefix.length + citationSource.length],
524 [prefix.length + 1 + between.length, prefix.length + citationSource.length + between.length],
525 [
526 prefix.length + 2 + between.length,
527 prefix.length + citationSource.length * 2 + between.length,
528 ],
529 [collapsedLength, text.length],
530 ] as const;
531β
532 for (const [collapsed, expanded] of boundaries) {
533 expect(expandCollapsedComposerCursor(text, collapsed)).toBe(expanded);
534 expect(collapseExpandedComposerCursor(text, expanded)).toBe(collapsed);
535 }
536 for (let cursor = 0; cursor <= collapsedLength; cursor += 1) {
537 expect(
538 collapseExpandedComposerCursor(text, expandCollapsedComposerCursor(text, cursor)),
539 ).toBe(cursor);
540 }
541 expect(clampCollapsedComposerCursor(text, Number.POSITIVE_INFINITY)).toBe(collapsedLength);
542 });
543β
544 it("snaps serialized offsets inside a citation to the end of its chip", () => {
545 const prefix = "επ";
546 const text = `${prefix}${citationSource}.`;
547β
548 for (const offset of [1, citationSource.length - 1, citationSource.length]) {
549 expect(collapseExpandedComposerCursor(text, prefix.length + offset)).toBe(prefix.length + 1);
550 }
551 expect(isCollapsedCursorAdjacentToInlineToken(text, prefix.length, "right")).toBe(true);
552 expect(isCollapsedCursorAdjacentToInlineToken(text, prefix.length + 1, "left")).toBe(true);
553 expect(isCollapsedCursorAdjacentToInlineToken(text, prefix.length + 2, "left")).toBe(false);
554 });
555β
556 it("deletes one collapsed citation without changing its neighbor or surrounding punctuation", () => {
557 const text = `(${citationSource}),${citationSource}!`;
558 const result = replaceTextRange(
559 text,
560 expandCollapsedComposerCursor(text, 1),
561 expandCollapsedComposerCursor(text, 2),
562 "",
563 );
564β
565 expect(result).toEqual({ text: `(),${citationSource}!`, cursor: 1 });
566 expect(collapseExpandedComposerCursor(result.text, result.text.length)).toBe("(),β‘!".length);
567 });
568});
569β
570describe("replaceTextRange trailing space consumption", () => {
571 it("double space after insertion when replacement ends with space", () => {
572 // Simulates: "and then |@AG| summarize" where | marks replacement range
573 // The replacement is "@AGENTS.md " (with trailing space)
574 // But if we don't extend rangeEnd, the existing space stays
575 const text = "and then @AG summarize";
576 const rangeStart = "and then ".length;
577 const rangeEnd = "and then @AG".length;
578β
579 // Without consuming trailing space: double space
580 const withoutConsume = replaceTextRange(text, rangeStart, rangeEnd, "@AGENTS.md ");
581 expect(withoutConsume.text).toBe("and then @AGENTS.md summarize");
582β
583 // With consuming trailing space: single space
584 const extendedEnd = text[rangeEnd] === " " ? rangeEnd + 1 : rangeEnd;
585 const withConsume = replaceTextRange(text, rangeStart, extendedEnd, "@AGENTS.md ");
586 expect(withConsume.text).toBe("and then @AGENTS.md summarize");
587 });
588});
589β
590describe("isCollapsedCursorAdjacentToInlineToken", () => {
591 it("returns false when no mention exists", () => {
592 expect(isCollapsedCursorAdjacentToInlineToken("plain text", 6, "left")).toBe(false);
593 expect(isCollapsedCursorAdjacentToInlineToken("plain text", 6, "right")).toBe(false);
594 });
595β
596 it("keeps @query typing non-adjacent while no mention pill exists", () => {
597 const text = "hello @pac";
598 expect(isCollapsedCursorAdjacentToInlineToken(text, text.length, "left")).toBe(false);
599 expect(isCollapsedCursorAdjacentToInlineToken(text, text.length, "right")).toBe(false);
600 });
601β
602 it("detects left adjacency only when cursor is directly after a mention", () => {
603 const text = "open @AGENTS.md next";
604 const mentionStart = "open ".length;
605 const mentionEnd = mentionStart + 1;
606β
607 expect(isCollapsedCursorAdjacentToInlineToken(text, mentionEnd, "left")).toBe(true);
608 expect(isCollapsedCursorAdjacentToInlineToken(text, mentionStart, "left")).toBe(false);
609 expect(isCollapsedCursorAdjacentToInlineToken(text, mentionEnd + 1, "left")).toBe(false);
610 });
611β
612 it("detects right adjacency only when cursor is directly before a mention", () => {
613 const text = "open @AGENTS.md next";
614 const mentionStart = "open ".length;
615 const mentionEnd = mentionStart + 1;
616β
617 expect(isCollapsedCursorAdjacentToInlineToken(text, mentionStart, "right")).toBe(true);
618 expect(isCollapsedCursorAdjacentToInlineToken(text, mentionEnd, "right")).toBe(false);
619 expect(isCollapsedCursorAdjacentToInlineToken(text, mentionStart - 1, "right")).toBe(false);
620 });
621β
622 it("treats context reference pills as inline tokens for adjacency checks", () => {
623 const text = `open ${terminalReference} next`;
624 const tokenStart = "open ".length;
625 const tokenEnd = tokenStart + 1;
626β
627 expect(isCollapsedCursorAdjacentToInlineToken(text, tokenEnd, "left")).toBe(true);
628 expect(isCollapsedCursorAdjacentToInlineToken(text, tokenStart, "right")).toBe(true);
629 });
630β
631 it("treats skill pills as inline tokens for adjacency checks", () => {
632 const text = "run $review-follow-up next";
633 const tokenStart = "run ".length;
634 const tokenEnd = tokenStart + 1;
635β
636 expect(isCollapsedCursorAdjacentToInlineToken(text, tokenEnd, "left")).toBe(true);
637 expect(isCollapsedCursorAdjacentToInlineToken(text, tokenStart, "right")).toBe(true);
638 });
639});
640β
641describe("parseStandaloneComposerSlashCommand", () => {
642 it("parses standalone /plan command", () => {
643 expect(parseStandaloneComposerSlashCommand(" /plan ")).toBe("plan");
644 });
645β
646 it("parses standalone /default command", () => {
647 expect(parseStandaloneComposerSlashCommand("/default")).toBe("default");
648 });
649β
650 it("ignores slash commands with extra message text", () => {
651 expect(parseStandaloneComposerSlashCommand("/plan explain this")).toBeNull();
652 });
653});