Skip to content

Parse quoted image path mentions without losing whitespace or false-positive matches - #889

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7666-image-path-wrappers
Sep 11, 2026
Merged

Parse quoted image path mentions without losing whitespace or false-positive matches#889
TheGreatAxios merged 2 commits into
mainfrom
cl-7666-image-path-wrappers

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Recognizes balanced quoted and backticked image path mentions without losing inner whitespace
  • Guards against apostrophe and prose-quote false positives when scanning for image path mentions

Verification

  • bun run typecheck, bun run build, and 29/29 focused tests for this change pass
  • bun run check passes lint, typecheck, and build; the full test run hits 4 pre-existing failures unrelated to this change (createOptimizedContextStore torn-tail/hook, assembleChatAgent EROFS)

Fixes CL-7666

@linear-code

linear-code Bot commented Sep 11, 2026

Copy link
Copy Markdown

CL-7666

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Approve

Quoted image-path mentions keep inner whitespace; contractions and prose quotes do not steal wrappers.

No findings.

Notes

Critic timed out twice on xAI; this is the orchestrator read of origin/main...origin/cl-7666-image-path-wrappers only (not the dirty local tree). GitHub blocks approve on own PRs, so this is a comment with an approve verdict.

Unquoted unmatched openers stay line-bounded. Quoted file:// decodes; quoted backslashes stay literal.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic · Approve

Director timed out; parent re-read the three-dot diff. scanImagePathLine + looksLikeQuotedImagePath + quoted vs unquoted normalize.

No blocking or should-fix findings.

Notes

  • don't / what's skip ' after a word char; prose "look at /tmp/shot.png" still finds the absolute path.
  • Relative unquoted paths with spaces still rejected (./relative path.png → []).

@TheGreatAxios
TheGreatAxios force-pushed the cl-7666-image-path-wrappers branch 3 times, most recently from 334cec0 to 29f1028 Compare September 11, 2026 03:16
macOS screenshot paths often arrive single-quoted with spaces and
narrow no-break spaces; the old whole-prompt regex could not own a
balanced wrapper, so those mentions never became attachments.
Contractions were pairing with later path quotes, and prose-quoted
sentences were resolving as bogus relative paths. Only treat path-
shaped wrappers as wrappers, and still find absolute paths inside
ordinary quotes.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7666-image-path-wrappers branch from 29f1028 to 6f8bc42 Compare September 11, 2026 03:19
@TheGreatAxios
TheGreatAxios merged commit b3b1233 into main Sep 11, 2026
9 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-7666-image-path-wrappers branch September 11, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant