* All type checks pass. The fix is complete.
**Summary:** Fixed the issue in `frontend/src/components/ui/wysiwyg/plugins/file-tag-typeahead-plugin.tsx:117-122`. When selecting a tag or file from the typeahead menu, the code now checks if the replaced text started with whitespace and preserves it by prepending a space to the inserted content.
* Done. The more elegant fix is now in place - a single line change in the `triggerFn`:
```typescript
replaceableString: match[0].slice(match[0].indexOf('@')),
```
This excludes the preceding space from `replaceableString` at the source, so the `onSelectOption` handler remains simple with no conditional logic.