types.ts
 1  // types.ts - shared types for the repoprompt-cli extension
 2  
 3  export interface RpCliConfig {
 4    // Optional read_file caching (pi-readcache-like behavior)
 5    readcacheReadFile?: boolean; // default: false
 6  
 7    // Optional context UX: automatically update RepoPrompt selection based on read_file calls
 8    // (tracks read slices/full files so chat has context without manual selection)
 9    autoSelectReadSlices?: boolean; // default: true
10  
11    // Lines shown in collapsed rp_exec output previews
12    collapsedMaxLines?: number; // default: 15
13  }
14  
15  export interface RpCliBindingEntryData {
16    windowId: number;
17    tab: string;
18    workspaceId?: string;
19    workspaceName?: string;
20    workspaceRoots?: string[];
21  }
22  
23  export interface AutoSelectionEntryRangeData {
24    start_line: number;
25    end_line: number;
26  }
27  
28  export interface AutoSelectionEntrySliceData {
29    path: string;
30    ranges: AutoSelectionEntryRangeData[];
31  }
32  
33  export interface AutoSelectionEntryData {
34    windowId: number;
35    tab?: string;
36    workspaceId?: string;
37    workspaceName?: string;
38    workspaceRoots?: string[];
39    fullPaths: string[];
40    slicePaths: AutoSelectionEntrySliceData[];
41  }