Skip to content

Commit eacfb55

Browse files
Sisyphean-aclaude
andcommitted
fix(resourceManager): auto-dismiss file copy notification
复制文件到剪贴板的成功提示改用 withProgress 通知,1.5 秒后自动消失, 无需手动关闭。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b6c3687 commit eacfb55

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/features/resourceManager/commands.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,13 @@ export class ResourceCommands {
214214
}
215215

216216
const fileName = path.basename(filePath);
217-
vscode.window.showInformationMessage(`文件已复制到剪贴板: ${fileName}`);
217+
void vscode.window.withProgress(
218+
{
219+
location: vscode.ProgressLocation.Notification,
220+
title: `文件已复制到剪贴板: ${fileName}`,
221+
},
222+
() => new Promise<void>((resolve) => setTimeout(resolve, 1500)),
223+
);
218224
Logger.info(`已复制文件到剪贴板: ${filePath}`);
219225
} catch (error) {
220226
Logger.error("复制文件到剪贴板失败", error);

0 commit comments

Comments
 (0)