Skip to content

Commit eeecc09

Browse files
committed
fix continue
1 parent 3e8bb32 commit eeecc09

1 file changed

Lines changed: 28 additions & 43 deletions

File tree

src/mcp/tools.ts

Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -229,67 +229,52 @@ const tools: ToolDef[] = [
229229
},
230230
{
231231
name: 'continue',
232-
description: 'Continue execution of a thread',
233-
inputSchema: {
234-
type: 'object',
235-
properties: { threadId: { type: 'number', description: 'Thread ID' } },
236-
required: ['threadId'],
237-
},
238-
handler: async (a) => {
239-
const r = await requestWithTimeout(activeSession(), 'continue', a);
240-
return { content: [{ type: 'text', text: JSON.stringify(r ?? {}) }] };
232+
description: 'Continue execution',
233+
inputSchema: { type: 'object', properties: {}, required: [] },
234+
handler: async () => {
235+
activeSession();
236+
await vscode.commands.executeCommand('workbench.action.debug.continue');
237+
return { content: [{ type: 'text', text: JSON.stringify({ success: true }) }] };
241238
},
242239
},
243240
{
244241
name: 'pause',
245-
description: 'Pause a running thread',
246-
inputSchema: {
247-
type: 'object',
248-
properties: { threadId: { type: 'number', description: 'Thread ID' } },
249-
required: ['threadId'],
250-
},
251-
handler: async (a) => {
252-
const r = await requestWithTimeout(activeSession(), 'pause', a);
253-
return { content: [{ type: 'text', text: JSON.stringify(r ?? {}) }] };
242+
description: 'Pause execution',
243+
inputSchema: { type: 'object', properties: {}, required: [] },
244+
handler: async () => {
245+
activeSession();
246+
await vscode.commands.executeCommand('workbench.action.debug.pause');
247+
return { content: [{ type: 'text', text: JSON.stringify({ success: true }) }] };
254248
},
255249
},
256250
{
257251
name: 'step_over',
258-
description: 'Step over (next line) in a thread',
259-
inputSchema: {
260-
type: 'object',
261-
properties: { threadId: { type: 'number', description: 'Thread ID' } },
262-
required: ['threadId'],
263-
},
264-
handler: async (a) => {
265-
const r = await requestWithTimeout(activeSession(), 'next', a);
266-
return { content: [{ type: 'text', text: JSON.stringify(r ?? {}) }] };
252+
description: 'Step over (next line)',
253+
inputSchema: { type: 'object', properties: {}, required: [] },
254+
handler: async () => {
255+
activeSession();
256+
await vscode.commands.executeCommand('workbench.action.debug.stepOver');
257+
return { content: [{ type: 'text', text: JSON.stringify({ success: true }) }] };
267258
},
268259
},
269260
{
270261
name: 'step_in',
271262
description: 'Step into a function call',
272-
inputSchema: {
273-
type: 'object',
274-
properties: { threadId: { type: 'number', description: 'Thread ID' } },
275-
required: ['threadId'],
276-
},
277-
handler: async (a) => {
278-
const r = await requestWithTimeout(activeSession(), 'stepIn', a);
279-
return { content: [{ type: 'text', text: JSON.stringify(r ?? {}) }] };
263+
inputSchema: { type: 'object', properties: {}, required: [] },
264+
handler: async () => {
265+
activeSession();
266+
await vscode.commands.executeCommand('workbench.action.debug.stepInto');
267+
return { content: [{ type: 'text', text: JSON.stringify({ success: true }) }] };
280268
},
281269
},
282270
{
283271
name: 'step_out',
284272
description: 'Step out of the current function',
285-
inputSchema: {
286-
type: 'object',
287-
properties: { threadId: { type: 'number', description: 'Thread ID' } },
288-
required: ['threadId'],
289-
},
290-
handler: async (a) => {
291-
const r = await requestWithTimeout(activeSession(), 'stepOut', a);
292-
return { content: [{ type: 'text', text: JSON.stringify(r ?? {}) }] };
273+
inputSchema: { type: 'object', properties: {}, required: [] },
274+
handler: async () => {
275+
activeSession();
276+
await vscode.commands.executeCommand('workbench.action.debug.stepOut');
277+
return { content: [{ type: 'text', text: JSON.stringify({ success: true }) }] };
293278
},
294279
},
295280
{

0 commit comments

Comments
 (0)