fix: refine model directive handling

This commit is contained in:
Peter Steinberger
2026-01-22 00:26:48 +00:00
parent 429a2d7849
commit 2b254a9b39
6 changed files with 55 additions and 30 deletions
+2 -2
View File
@@ -114,10 +114,10 @@ describe("extractModelDirective", () => {
});
describe("edge cases", () => {
it("preserves spacing when /model is followed by a path segment", () => {
it("absorbs path-like segments when /model includes extra slashes", () => {
const result = extractModelDirective("thats not /model gpt-5/tmp/hello");
expect(result.hasDirective).toBe(true);
expect(result.cleaned).toBe("thats not /hello");
expect(result.cleaned).toBe("thats not");
});
it("handles alias with special regex characters", () => {