MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / handleStat

Function handleStat

packages/server/src/routes/fs.ts:380–394  ·  view source on GitHub ↗
(
  ix: IInstantiationService,
  sessionId: string,
  req: { id: string; body: unknown },
  reply: { send(payload: unknown): unknown },
)

Source from the content-addressed store, hash-verified

378}
379
380async function handleStat(
381 ix: IInstantiationService,
382 sessionId: string,
383 req: { id: string; body: unknown },
384 reply: { send(payload: unknown): unknown },
385): Promise<void> {
386 const parsed = fsStatRequestSchema.safeParse(req.body ?? {});
387 if (!parsed.success) {
388 reply.send(buildValidationEnvelope(parsed.error.issues, req.id));
389 return;
390 }
391 const body: FsStatRequest = parsed.data;
392 const data = await ix.invokeFunction((a) => a.get(IFsService).stat(sessionId, body));
393 reply.send(okEnvelope(data, req.id));
394}
395
396async function handleStatMany(
397 ix: IInstantiationService,

Callers 1

registerFsRoutesFunction · 0.85

Calls 6

okEnvelopeFunction · 0.90
buildValidationEnvelopeFunction · 0.70
sendMethod · 0.65
invokeFunctionMethod · 0.65
statMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected