2024-08-28 00:28:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
export const pathQueryParamName = "path";
|
|
|
|
|
export const repoQueryParamName = "repo";
|
|
|
|
|
|
|
|
|
|
export type GetSourceResponse = {
|
|
|
|
|
content: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ZoektMatch {
|
|
|
|
|
URL: string,
|
|
|
|
|
FileName: string,
|
|
|
|
|
LineNum: number,
|
|
|
|
|
Fragments: {
|
|
|
|
|
Pre: string,
|
|
|
|
|
Match: string,
|
|
|
|
|
Post: string
|
|
|
|
|
}[]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ZoektFileMatch {
|
|
|
|
|
FileName: string,
|
|
|
|
|
Repo: string,
|
|
|
|
|
Language: string,
|
|
|
|
|
Matches: ZoektMatch[],
|
|
|
|
|
URL: string,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ZoektResult {
|
|
|
|
|
QueryStr: string,
|
|
|
|
|
FileMatches: ZoektFileMatch[] | null,
|
|
|
|
|
Stats: {
|
|
|
|
|
// Duration in nanoseconds
|
|
|
|
|
Duration: number,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ZoektSearchResponse {
|
|
|
|
|
result: ZoektResult,
|
2024-08-28 04:00:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type KeymapType = "default" | "vim";
|