Skip to content

Commit 585d01e

Browse files
feat(api): api update
1 parent 2c2d91b commit 585d01e

File tree

4 files changed

+52
-17
lines changed

4 files changed

+52
-17
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-2a67e842b87576472f1969d75642637db0f0f42fc805a61ab3b880e544941595.yml
3-
openapi_spec_hash: 7cf70aa93bf241c1d1460f48182e9819
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-2701905dd453ab3f87696efb9190e8f48cb5dcbf43bb74bf3f2367e347f9868c.yml
3+
openapi_spec_hash: 124c1d143d28e6312e76a4c3eb3f21d5
44
config_hash: 935baad1727a1116efdc14e9ce6e4405

packages/mcp-server/src/tools/fixer/run-fixer.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,30 @@ export const tool: Tool = {
4545
required: ['contents', 'path'],
4646
},
4747
},
48+
fix_types: {
49+
type: 'array',
50+
title: 'Fix Types',
51+
description: 'Configuration for which fix types to apply',
52+
items: {
53+
type: 'string',
54+
title: 'FixTypeName',
55+
description: 'Enumeration of available fix types',
56+
enum: [
57+
'import_export',
58+
'string_literals',
59+
'ts_suggestions',
60+
'css',
61+
'tailwind',
62+
'react',
63+
'ai_fallback',
64+
'types',
65+
],
66+
},
67+
},
4868
fixes: {
4969
type: 'object',
5070
title: 'FixConfigObject',
51-
description: 'Configuration object for specifying which fixes to apply',
71+
description: 'DEPRECATED: legacy boolean flags for which fixes to apply.',
5272
properties: {
5373
css: {
5474
type: 'boolean',

src/resources/fixer.ts

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,21 @@ export interface FixerRunParams {
238238
files: Array<FixerRunParams.File>;
239239

240240
/**
241-
* Configuration object for specifying which fixes to apply
241+
* Configuration for which fix types to apply
242+
*/
243+
fix_types?: Array<
244+
| 'import_export'
245+
| 'string_literals'
246+
| 'ts_suggestions'
247+
| 'css'
248+
| 'tailwind'
249+
| 'react'
250+
| 'ai_fallback'
251+
| 'types'
252+
>;
253+
254+
/**
255+
* @deprecated DEPRECATED: legacy boolean flags for which fixes to apply.
242256
*/
243257
fixes?: FixerRunParams.Fixes | null;
244258

@@ -275,38 +289,38 @@ export namespace FixerRunParams {
275289
}
276290

277291
/**
278-
* Configuration object for specifying which fixes to apply
292+
* @deprecated DEPRECATED: legacy boolean flags for which fixes to apply.
279293
*/
280294
export interface Fixes {
281295
/**
282-
* Whether to fix CSS issues
296+
* @deprecated Whether to fix CSS issues
283297
*/
284-
css?: boolean;
298+
css?: boolean | null;
285299

286300
/**
287-
* Whether to fix import issues
301+
* @deprecated Whether to fix import issues
288302
*/
289-
imports?: boolean;
303+
imports?: boolean | null;
290304

291305
/**
292-
* Whether to fix React issues
306+
* @deprecated Whether to fix React issues
293307
*/
294-
react?: boolean;
308+
react?: boolean | null;
295309

296310
/**
297-
* Whether to fix string literal issues
311+
* @deprecated Whether to fix string literal issues
298312
*/
299-
stringLiterals?: boolean;
313+
stringLiterals?: boolean | null;
300314

301315
/**
302-
* Whether to fix Tailwind issues
316+
* @deprecated Whether to fix Tailwind issues
303317
*/
304-
tailwind?: boolean;
318+
tailwind?: boolean | null;
305319

306320
/**
307-
* Whether to fix TypeScript suggestions
321+
* @deprecated Whether to fix TypeScript suggestions
308322
*/
309-
tsSuggestions?: boolean;
323+
tsSuggestions?: boolean | null;
310324
}
311325

312326
/**

tests/api-resources/fixer.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ describe('resource fixer', () => {
2424
test.skip('run: required and optional params', async () => {
2525
const response = await client.fixer.run({
2626
files: [{ contents: 'contents', path: 'x' }],
27+
fix_types: ['import_export'],
2728
fixes: {
2829
css: true,
2930
imports: true,

0 commit comments

Comments
 (0)