chore: generalize status & action as code (#188)

This commit is contained in:
Pavel Feldman
2025-04-15 12:54:45 -07:00
committed by GitHub
parent 4a19e18999
commit 795a9d578a
12 changed files with 187 additions and 88 deletions

View File

@@ -35,8 +35,11 @@ const uploadFile: ToolFactory = captureSnapshot => ({
const tab = context.currentTab();
return await tab.runAndWait(async () => {
await tab.submitFileChooser(validatedParams.paths);
const code = [
`// <internal code to chose files ${validatedParams.paths.join(', ')}`,
];
return { code };
}, {
status: `Chose files ${validatedParams.paths.join(', ')}`,
captureSnapshot,
noClearFileChooser: true,
});