()
| 262 | } |
| 263 | |
| 264 | const currentMention = () => { |
| 265 | const textarea = refs.textarea |
| 266 | if (!textarea) return |
| 267 | if (!split.mention) return |
| 268 | if (textarea.selectionStart !== textarea.selectionEnd) return |
| 269 | |
| 270 | const end = textarea.selectionStart |
| 271 | const match = textarea.value.slice(0, end).match(/@(\S*)$/) |
| 272 | if (!match) return |
| 273 | |
| 274 | return { |
| 275 | query: match[1] ?? "", |
| 276 | start: end - match[0].length, |
| 277 | end, |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | const syncMention = () => { |
| 282 | const item = currentMention() |
no outgoing calls
no test coverage detected