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

Function handleRead

packages/server/src/routes/fs.ts:346–360  ·  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

344}
345
346async function handleRead(
347 ix: IInstantiationService,
348 sessionId: string,
349 req: { id: string; body: unknown },
350 reply: { send(payload: unknown): unknown },
351): Promise<void> {
352 const parsed = fsReadRequestSchema.safeParse(req.body ?? {});
353 if (!parsed.success) {
354 reply.send(buildValidationEnvelope(parsed.error.issues, req.id));
355 return;
356 }
357 const body: FsReadRequest = parsed.data;
358 const data = await ix.invokeFunction((a) => a.get(IFsService).read(sessionId, body));
359 reply.send(okEnvelope(data, req.id));
360}
361
362async function handleListMany(
363 ix: IInstantiationService,

Callers 1

registerFsRoutesFunction · 0.85

Calls 6

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

Tested by

no test coverage detected