@@ -26,6 +26,9 @@ export interface ReplayOptions {
2626 outputType ?: OutputType ;
2727 includeArchived ?: boolean ;
2828 groupByTeamPrefix ?: string ;
29+ /** When set, appends `--regex-hint <term>` to the replay command so the
30+ * result set from a regex query can be reproduced exactly. */
31+ regexHint ?: string ;
2932}
3033
3134// ─── Replay command ───────────────────────────────────────────────────────────
@@ -39,7 +42,7 @@ export function buildReplayCommand(
3942 // Fix: forward all input options so the replay command is fully reproducible — see issue #11
4043 options : ReplayOptions = { } ,
4144) : string {
42- const { format, outputType, includeArchived, groupByTeamPrefix } = options ;
45+ const { format, outputType, includeArchived, groupByTeamPrefix, regexHint } = options ;
4346 const parts : string [ ] = [
4447 `github-code-search ${ JSON . stringify ( query ) } --org ${ org } --no-interactive` ,
4548 ] ;
@@ -85,6 +88,9 @@ export function buildReplayCommand(
8588 if ( groupByTeamPrefix ) {
8689 parts . push ( `--group-by-team-prefix ${ groupByTeamPrefix } ` ) ;
8790 }
91+ if ( regexHint ) {
92+ parts . push ( `--regex-hint ${ JSON . stringify ( regexHint ) } ` ) ;
93+ }
8894
8995 return `# Replay:\n${ parts . join ( " \\\n " ) } ` ;
9096}
@@ -253,7 +259,7 @@ export function buildOutput(
253259 excludedExtractRefs : Set < string > ,
254260 format : OutputFormat ,
255261 outputType : OutputType = "repo-and-matches" ,
256- extraOptions : Pick < ReplayOptions , "includeArchived" | "groupByTeamPrefix" > = { } ,
262+ extraOptions : Pick < ReplayOptions , "includeArchived" | "groupByTeamPrefix" | "regexHint" > = { } ,
257263) : string {
258264 const options : ReplayOptions = { format, outputType, ...extraOptions } ;
259265 if ( format === "json" ) {
0 commit comments