You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add progress notification handling in TestMcpToolCommand
- Updated `displayResult` to show progress notifications and warn on missing notifications for streaming tools.
- Integrated `ProgressNotifier` to track and display progress during tool execution.
- Enhanced streaming tool handling with clearer user feedback on operation progress.
// Check if this was a streaming tool that should have sent notifications
54
+
if ($tool && $tool->isStreaming() && empty($sentNotifications)) {
55
+
$this->io->newLine();
56
+
$this->io->warning('No progress notifications were sent by this streaming tool. Consider adding progress notifications to improve user experience during long-running operations.');
57
+
}
39
58
}
40
59
41
60
protectedfunctionconfigure(): void
@@ -85,8 +104,20 @@ private function testTool(): int
85
104
json_encode($inputData, JSON_PRETTY_PRINT),
86
105
]);
87
106
try {
107
+
// Track progress notifications if this is a streaming tool
108
+
$sentNotifications = [];
109
+
if ($tool->isStreaming()) {
110
+
$progressNotifier = newProgressNotifier(
111
+
'test-progress-token',
112
+
function (array$notification) use (&$sentNotifications) {
0 commit comments