fix: refine model directive handling

This commit is contained in:
Peter Steinberger
2026-01-22 00:26:48 +00:00
parent 8255e4649c
commit 1cce83b21e
6 changed files with 55 additions and 30 deletions

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", () => {