feat(runs): add deleting files from a run
- add DELETE /scenarios/:id/runs/:runId/files/:fileId and the delete_run_file MCP tool; the stored file is removed once no scenario or run references it - add a delete button with confirmation to the run detail files table - bump version to 1.17.0
This commit is contained in:
1 parent
ac12301818
commit
1c5c906cbb
12 files changed
+249
-5
No files matched your search
@@ -1556,6 +1556,37 @@ export class McpService {
|
||||
},
|
||||
);
|
||||
|
||||
server.registerTool(
|
||||
"delete_run_file",
|
||||
{
|
||||
description:
|
||||
"Delete a file from a run. The stored file is removed once nothing else references it",
|
||||
inputSchema: {
|
||||
scenarioId: z.uuid().describe("Scenario ID"),
|
||||
runId: z.uuid().describe("Run ID"),
|
||||
fileId: z.uuid().describe("File ID (from list_run_files)"),
|
||||
},
|
||||
},
|
||||
async ({ scenarioId, runId, fileId }) => {
|
||||
try {
|
||||
await this.scenarioService.deleteRunFile(scenarioId, runId, fileId);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
type: "text" as const,
|
||||
text: `File ${fileId} deleted from run ${runId}`,
|
||||
},
|
||||
],
|
||||
};
|
||||
} catch (err) {
|
||||
return {
|
||||
isError: true,
|
||||
content: [{ type: "text" as const, text: (err as Error).message }],
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
server.registerTool(
|
||||
"get_run_file_content",
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user