MCPcopy Create free account
hub / github.com/cortexkit/magic-context / loadEmbedDetail

Function loadEmbedDetail

packages/plugin/src/tui/data/context-db.ts:237–251  ·  view source on GitHub ↗
(sessionId: string, directory: string)

Source from the content-addressed store, hash-verified

235
236/** Fetch embedding coverage status for `/ctx-embed` via RPC. */
237export async function loadEmbedDetail(sessionId: string, directory: string): Promise<EmbedDetail> {
238 if (!rpcClient) return EMPTY_EMBED_DETAIL;
239 try {
240 const result = await rpcClient.call<EmbedDetail>("embed-detail", {
241 sessionId,
242 directory,
243 });
244 if ((result as unknown as Record<string, unknown>).error) {
245 return EMPTY_EMBED_DETAIL;
246 }
247 return result;
248 } catch {
249 return EMPTY_EMBED_DETAIL;
250 }
251}
252
253/** Get compartment count via RPC. */
254export async function getCompartmentCount(sessionId: string): Promise<number> {

Callers 1

showEmbedDialogFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected