import type { FileResult } from "$lib/api/lexicons/types/org/tangled/temp/search/searchCode";

// the wire types are the generated lexicon's. `Chunk.highlights` are byte offsets
// into `Chunk.content`, which is what chunks.ts splits on.
export type {
	Chunk,
	FileResult,
	Highlight
} from "$lib/api/lexicons/types/org/tangled/temp/search/searchCode";

// the lexicon returns only repoDid, so the load has to resolve owner/slug/ref for
// the blob links — these three fields are that enrichment step
export interface CodeResult extends FileResult {
	ownerHandle: string;
	repoName: string;
	ref: string;
}
