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

Function patchFsAction

packages/server/src/openapi/transforms.ts:162–178  ·  view source on GitHub ↗
(paths: Record<string, unknown>)

Source from the content-addressed store, hash-verified

160}
161
162function patchFsAction(paths: Record<string, unknown>): void {
163 const operation = getOperation(paths, '/api/v1/sessions/{session_id}/{tail}', 'post');
164 if (operation === undefined) return;
165
166 operation['description'] = appendDescription(
167 operation['description'],
168 'The request and response schemas depend on the `fs:<action>` path tail and are represented as OpenAPI `oneOf` unions.',
169 );
170 operation['requestBody'] = {
171 required: true,
172 content: jsonContent(fsActionRequestSchema),
173 };
174 setResponse(operation, '200', {
175 description: 'Filesystem action response',
176 content: jsonContent(fsActionResponseSchema),
177 });
178}
179
180function patchFsDownload(paths: Record<string, unknown>): void {
181 const operation = getOperation(paths, '/api/v1/sessions/{session_id}/fs/{*}', 'get');

Callers 1

transformOpenApiDocumentFunction · 0.85

Calls 4

getOperationFunction · 0.85
appendDescriptionFunction · 0.85
jsonContentFunction · 0.85
setResponseFunction · 0.85

Tested by

no test coverage detected