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

Function handleDiff

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

484}
485
486async function handleDiff(
487 ix: IInstantiationService,
488 sessionId: string,
489 req: { id: string; body: unknown },
490 reply: { send(payload: unknown): unknown },
491): Promise<void> {
492 const parsed = fsDiffRequestSchema.safeParse(req.body ?? {});
493 if (!parsed.success) {
494 reply.send(buildValidationEnvelope(parsed.error.issues, req.id));
495 return;
496 }
497 const body: FsDiffRequest = parsed.data;
498 const data = await ix.invokeFunction((a) =>
499 a.get(IFsGitService).diff(sessionId, body),
500 );
501 reply.send(okEnvelope(data, req.id));
502}
503
504async function handleOpen(
505 ix: IInstantiationService,

Callers 1

registerFsRoutesFunction · 0.85

Calls 6

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

Tested by

no test coverage detected