Skip to content

Commit 7f69be1

Browse files
committed
delint
1 parent e50874b commit 7f69be1

File tree

3 files changed

+30
-24
lines changed

3 files changed

+30
-24
lines changed

src/client/index.test.ts

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -813,17 +813,20 @@ test('should handle tool list changed notification with auto refresh', async ()
813813
tools: []
814814
}));
815815

816-
const client = new Client({
817-
name: 'test-client',
818-
version: '1.0.0',
819-
}, {
820-
toolListChangedOptions: {
821-
autoRefresh: true,
822-
onToolListChanged: (err, tools) => {
823-
notifications.push([err, tools]);
816+
const client = new Client(
817+
{
818+
name: 'test-client',
819+
version: '1.0.0'
820+
},
821+
{
822+
toolListChangedOptions: {
823+
autoRefresh: true,
824+
onToolListChanged: (err, tools) => {
825+
notifications.push([err, tools]);
826+
}
824827
}
825828
}
826-
});
829+
);
827830

828831
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
829832

@@ -897,17 +900,20 @@ test('should handle tool list changed notification with manual refresh', async (
897900
tools: []
898901
}));
899902

900-
const client = new Client({
901-
name: 'test-client',
902-
version: '1.0.0',
903-
}, {
904-
toolListChangedOptions: {
905-
autoRefresh: false,
906-
onToolListChanged: (err, tools) => {
907-
notifications.push([err, tools]);
903+
const client = new Client(
904+
{
905+
name: 'test-client',
906+
version: '1.0.0'
907+
},
908+
{
909+
toolListChangedOptions: {
910+
autoRefresh: false,
911+
onToolListChanged: (err, tools) => {
912+
notifications.push([err, tools]);
913+
}
908914
}
909915
}
910-
});
916+
);
911917

912918
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
913919

src/client/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export type ClientOptions = ProtocolOptions & {
8383
/**
8484
* Configure automatic refresh behavior for tool list changed notifications
8585
*
86-
* @example
86+
* @example
8787
* ```ts
8888
* {
8989
* autoRefresh: true,
@@ -105,7 +105,7 @@ export type ClientOptions = ProtocolOptions & {
105105
* autoRefresh: false,
106106
* onToolListChanged: (err, tools) => {
107107
* // err is always null when autoRefresh is false
108-
*
108+
*
109109
* // Manually refresh the tool list
110110
* const result = await this.listTools();
111111
* console.log('Tool list changed:', result.tools);
@@ -487,7 +487,7 @@ export class Client<
487487
const toolListChangedOptions: ToolListChangedOptions = {
488488
autoRefresh: !!options.autoRefresh,
489489
debounceMs: options.debounceMs ?? 300,
490-
onToolListChanged: options.onToolListChanged,
490+
onToolListChanged: options.onToolListChanged
491491
};
492492
this._toolListChangedOptions = toolListChangedOptions;
493493
this.setNotificationHandler(ToolListChangedNotificationSchema, () => {
@@ -496,12 +496,12 @@ export class Client<
496496
toolListChangedOptions.onToolListChanged?.(null, null);
497497
return;
498498
}
499-
499+
500500
// Clear any pending debounce timer
501501
if (this._toolListChangedDebounceTimer) {
502502
clearTimeout(this._toolListChangedDebounceTimer);
503503
}
504-
504+
505505
// Set up debounced refresh
506506
this._toolListChangedDebounceTimer = setTimeout(async () => {
507507
let tools: Tool[] | null = null;

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ export const ToolListChangedOptionsSchema = z.object({
10651065
*
10661066
* If `autoRefresh` is true, this callback will be called with updated tool list.
10671067
*/
1068-
onToolListChanged: z.function(z.tuple([z.instanceof(Error).nullable(), z.array(ToolSchema).nullable()]), z.void()),
1068+
onToolListChanged: z.function(z.tuple([z.instanceof(Error).nullable(), z.array(ToolSchema).nullable()]), z.void())
10691069
});
10701070

10711071
export type ToolListChangedOptions = z.infer<typeof ToolListChangedOptionsSchema>;

0 commit comments

Comments
 (0)