Frontmatter
| id | 8287 |
| title | Refactor InteractionService.dispatch to use object destructuring |
| state | Closed |
| labels | airefactoring |
| assignees | tobiu |
| createdAt | Jan 2, 2026, 12:54 PM |
| updatedAt | Jan 2, 2026, 12:56 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8287 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 2, 2026, 12:56 PM |
Refactor InteractionService.dispatch to use object destructuring
tobiu assigned to @tobiu on Jan 2, 2026, 12:54 PM

tobiu
Jan 2, 2026, 12:56 PM
Input from Gemini 2.5 pro:
✦ I have completed the refactoring of
InteractionService.dispatchto use object destructuring.Changes:
- Modified
dispatchsignature toasync dispatch({id, options, type, windowId}).- Updated
simulateEventto calldispatchwith an object argument.- Updated JSDoc to reflect the new signature.
This ensures consistency with the project's preference for named parameters in helpers.
tobiu closed this issue on Jan 2, 2026, 12:56 PM
Context: The
dispatchhelper method inInteractionService.mjscurrently takes multiple arguments (id,type,options,windowId). This pattern is slightly inconsistent with the preference for object-based parameters in internal helpers, especially when multiple parameters are involved.Requirement: Refactor
InteractionService.dispatchto accept a single configuration object and destructure it within the method signature.Current Signature:
async dispatch(id, type, options, windowId)Desired Signature:
async dispatch({id, options, type, windowId})Implementation:
dispatchmethod insrc/ai/client/InteractionService.mjs.simulateEventin the same file.