status
Check the undo system's current state: view checkpoint count, stack size, and whether undo operations are available.
Instructions
Get current status of the undo system (checkpoint count, number of checkpoints in the stack, and whether undo is possible)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:69-76 (registration)Registers the 'status' tool with its name, description, and input schema (no parameters required).{ name: "status", description: "Get current status of the undo system (checkpoint count, number of checkpoints in the stack, and whether undo is possible)", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:143-153 (handler)The main handler for the 'status' tool in the CallToolRequestSchema switch statement. It calls changeTracker.getStatus() and formats a text response with checkpoint count and undo availability.case "status": { const status = changeTracker.getStatus(); return { content: [ { type: "text", text: `📊 Undo System Status:\nCheckpoints: ${status.checkpointCount}\nCan Undo: ${status.canUndo}`, }, ], }; }
- src/changeTracker.ts:177-188 (helper)Core implementation of status logic in ChangeTracker class. Deduplicates checkpoints and returns the count and whether undo is possible.getStatus(): { checkpointCount: number; canUndo: boolean; } { // Deduplicate checkpoints before returning status this.deduplicateCheckpoints(); return { checkpointCount: this.undoStack.length, canUndo: this.undoStack.length > 0, }; }