You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are the -A, -B, and -C options supposed to work with semantic searches?
Based on my experiments they don't have an effect on how much is outputted. Having these work in all modes would help ck is called by agents so that the agent gets more context and can avoid having to go manually read the file as a followup task.
Acknowledging — this is in our backlog. Today -A/-B/-C apply to lexical/regex modes but not semantic, which is a real ergonomic gap given that semantic results are conceptually "a chunk near a span" and you'd want surrounding context for the same reason.
Two implementation paths:
Trivial: after we get a result span, read the file and grab N lines before/after — same as we do for regex. Easy.
Semantic-aware: instead of lexical context lines, include the neighboring chunks (the previous/next sidecar chunks). Closer to what "semantic context" actually means.
We'll likely do (1) first because it matches user expectation of the existing flags, and consider (2) separately.
Activity
runonthespot commentedon May 24, 2026
Acknowledging — this is in our backlog. Today
-A/-B/-Capply to lexical/regex modes but not semantic, which is a real ergonomic gap given that semantic results are conceptually "a chunk near a span" and you'd want surrounding context for the same reason.Two implementation paths:
We'll likely do (1) first because it matches user expectation of the existing flags, and consider (2) separately.