diegosouzapw/OmniRoute · error · Error

Local corpus is not configured. Set a root in Settings > Con

Error message

Local corpus is not configured. Set a root in Settings > Context Sources

What it means

Error "Local corpus is not configured. Set a root in Settings > Context Sources" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/localCorpus/configured.ts:15

import { getLocalCorpusRoot } from "../db/localCorpus";
import { getDefaultLocalCorpusStatus, LocalCorpusIndex } from "./index";

let sharedRoot: string | null = null;
let sharedIndex: LocalCorpusIndex | null = null;

export function resetLocalCorpusIndex(): void {
  sharedRoot = null;
  sharedIndex = null;
}

function getConfiguredIndex(): LocalCorpusIndex {
  const rootPath = getLocalCorpusRoot();
  if (!rootPath) {
    throw new Error("Local corpus is not configured. Set a root in Settings > Context Sources");
  }
  if (!sharedIndex || sharedRoot !== rootPath) {
    sharedRoot = rootPath;
    sharedIndex = new LocalCorpusIndex(rootPath);
  }
  return sharedIndex;
}

export function getConfiguredLocalCorpusStatus() {
  return getLocalCorpusRoot() ? getConfiguredIndex().getStatus() : getDefaultLocalCorpusStatus();
}

export async function searchConfiguredLocalCorpus(
  query: string,
  options: { limit?: number; refresh?: boolean } = {}
) {
  return getConfiguredIndex().search(query, options);
}

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/localCorpus/configured.ts:15 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/2cb4e875d9140f4b. Report an issue: GitHub.