chore: test list tabs (#208)

This commit is contained in:
Pavel Feldman 2025-04-17 00:58:02 -07:00 committed by GitHub
parent 7e4a964b0a
commit 4b261286bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 66 additions and 58 deletions

View file

@ -28,12 +28,18 @@ const listTabs: Tool = {
inputSchema: zodToJsonSchema(z.object({})),
},
handle: async () => {
handle: async context => {
await context.ensureTab();
return {
code: [`// <internal code to list tabs>`],
action: async () => ({}),
captureSnapshot: false,
waitForNetwork: false,
resultOverride: {
content: [{
type: 'text',
text: await context.listTabsMarkdown(),
}],
},
};
},
};
@ -60,7 +66,6 @@ const selectTab: ToolFactory = captureSnapshot => ({
return {
code,
action: async () => ({}),
captureSnapshot,
waitForNetwork: false
};
@ -91,7 +96,6 @@ const newTab: ToolFactory = captureSnapshot => ({
];
return {
code,
action: async () => ({}),
captureSnapshot,
waitForNetwork: false
};
@ -119,7 +123,6 @@ const closeTab: ToolFactory = captureSnapshot => ({
];
return {
code,
action: async () => ({}),
captureSnapshot,
waitForNetwork: false
};