Forward abort signal to slash suggestions

Update the slash suggestion handler to accept an AbortSignal and pass it through to defaultSlashSuggestions. This enables cancellation of in-flight async suggestion calls (avoids race conditions and wasted work) in components/kibo-ui/editor/index.tsx.
This commit is contained in:
2026-07-11 01:24:31 +08:00
parent 6d87e76ebb
commit d1d77e8683
+2 -2
View File
@@ -600,8 +600,8 @@ export const EditorProvider = ({
Subscript,
Slash.configure({
suggestion: {
items: async ({ editor, query }) => {
const items = await defaultSlashSuggestions({ editor, query });
items: async ({ editor, query, signal }) => {
const items = await defaultSlashSuggestions({ editor, query, signal });
if (!query) {
return items;