spa/.claude/skills/thread-manager/dist/tools/delete-thread.js

30 lines
995 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toolHandler = exports.toolDefinition = void 0;
exports.toolDefinition = {
name: 'delete_thread',
description: 'Delete a thread and all associated data permanently.',
inputSchema: {
type: 'object',
properties: {
threadId: {
type: 'string',
description: 'ID of the thread to delete'
},
confirm: {
type: 'boolean',
description: 'Must be set to true to confirm deletion'
}
},
required: ['threadId', 'confirm']
}
};
const toolHandler = async (invocation, threadManager) => {
const { threadId, confirm } = invocation.input;
if (confirm !== true) {
return { success: false, message: "Deletion not confirmed. Please set 'confirm' to true." };
}
return await threadManager.deleteThread(threadId);
};
exports.toolHandler = toolHandler;