searchTextsKey

tcmts.cli.pages.searchTextsKey · #bj537rtr · term · runs anywhere

What code search's texts are of, as [searchTexts] keeps them: the codebase (one process can serve several: an editor's), the branch and its last history entry (every change to what it shows, text versions included, makes one), and whether documents are read (a session doesn't keep them).

import type { Codebase } from "#codebase/tcmts/cli/codebase";

export function searchTextsKey(cb: Codebase): string {
  return `${cb.lay.dbFile}|${cb.sessionDir ?? ""}|${cb.store.branch().name}@${cb.store.logHead()}`;
}

uses

used by