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

Function patchFsDownload

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

Source from the content-addressed store, hash-verified

178}
179
180function patchFsDownload(paths: Record<string, unknown>): void {
181 const operation = getOperation(paths, '/api/v1/sessions/{session_id}/fs/{*}', 'get');
182 if (operation === undefined) return;
183
184 setResponse(operation, '200', {
185 description: 'Binary workspace file download',
186 headers: {
187 'content-disposition': headerString(),
188 'content-length': headerInteger(),
189 etag: headerString(),
190 'last-modified': headerString(),
191 },
192 content: {
193 'application/octet-stream': {
194 schema: binarySchema,
195 },
196 },
197 });
198 setResponse(operation, '206', {
199 description: 'Partial binary workspace file download',
200 headers: {
201 'content-disposition': headerString(),
202 'content-length': headerInteger(),
203 'content-range': headerString(),
204 etag: headerString(),
205 'last-modified': headerString(),
206 },
207 content: {
208 'application/octet-stream': {
209 schema: binarySchema,
210 },
211 },
212 });
213 setResponse(operation, '304', {
214 description: 'Not modified',
215 headers: {
216 etag: headerString(),
217 },
218 });
219}
220
221function patchQuestionResolveOrDismiss(paths: Record<string, unknown>): void {
222 const operation = getOperation(paths, '/api/v1/sessions/{session_id}/questions/{tail}', 'post');

Callers 1

transformOpenApiDocumentFunction · 0.85

Calls 4

getOperationFunction · 0.85
setResponseFunction · 0.85
headerIntegerFunction · 0.85
headerStringFunction · 0.70

Tested by

no test coverage detected