Commit b179f36
committed
fix: Prevent duplicate task creation by refactoring webview message handling
This commit resolves an issue where tasks were being created multiple times when initiated from the webview. The root cause was in the ClineProvider's webview message handling implementation.
Removed WebviewMessageHandlers class with its large switch statement
Replaced indirect message handler setup with direct function in resolveWebviewView
Removed redundant setWebviewMessageListener method
Simplified message handling flow using command pattern consistently
Updated tests to properly mock webview message handling
Each webview message is now processed exactly once, preventing duplicate task creation and improving stability.1 parent 17b648b commit b179f36
File tree
3 files changed
+34
-1014
lines changed- src/core/webview
- __tests__
3 files changed
+34
-1014
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
337 | 345 | | |
338 | 346 | | |
339 | 347 | | |
| |||
0 commit comments