@@ -32,7 +32,7 @@ import { addOwnTokenToArgs, findCurrentArgument, } from 'uiSrc/pages/workbench/u
32
32
import { getRange , getRediSearchSignutureProvider , } from 'uiSrc/pages/workbench/utils/monaco'
33
33
import { CursorContext } from 'uiSrc/pages/workbench/types'
34
34
import { asSuggestionsRef , getCommandsSuggestions , isIndexComplete } from 'uiSrc/pages/workbench/utils/suggestions'
35
- import { COMMANDS_TO_GET_INDEX_INFO , EmptySuggestionsIds , } from 'uiSrc/pages/workbench/constants'
35
+ import { COMMANDS_TO_GET_INDEX_INFO , COMPOSITE_ARGS , EmptySuggestionsIds , } from 'uiSrc/pages/workbench/constants'
36
36
import { useDebouncedEffect } from 'uiSrc/services'
37
37
import { fetchRedisearchInfoAction } from 'uiSrc/slices/browser/redisearch'
38
38
import { findSuggestionsByArg } from 'uiSrc/pages/workbench/utils/searchSuggestions'
@@ -111,9 +111,11 @@ const Query = (props: Props) => {
111
111
[ commands ]
112
112
)
113
113
114
- const COMPOSITE_ARGS = useMemo ( ( ) => commands
115
- . filter ( ( command ) => command . name && command . name . includes ( ' ' ) )
116
- . map ( ( { name } ) => name ) ,
114
+ const compositeTokens = useMemo ( ( ) =>
115
+ commands
116
+ . filter ( ( command ) => command . token && command . token . includes ( ' ' ) )
117
+ . map ( ( { token } ) => token )
118
+ . concat ( ...COMPOSITE_ARGS ) ,
117
119
[ commands ] )
118
120
119
121
const { instanceId = '' } = useParams < { instanceId : string } > ( )
@@ -342,7 +344,7 @@ const Query = (props: Props) => {
342
344
e . position ,
343
345
REDIS_COMMANDS_SPEC ,
344
346
REDIS_COMMANDS_ARRAY ,
345
- COMPOSITE_ARGS as string [ ]
347
+ compositeTokens as string [ ]
346
348
)
347
349
handleSuggestions ( editor , command )
348
350
handleDslSyntax ( e , command )
0 commit comments