File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,14 +160,10 @@ export const Manager = {
160160 currentText : '' ,
161161 } , query )
162162 const actions = await this . listAction ( request )
163- const actionFullNameMap = new Map < string , ActionRecord > ( )
164- for ( const a of actions ) {
165- actionFullNameMap . set ( a . fullName , a )
166- }
167163 let action : ActionRecord = null
168164 if ( typeof keywordsOrAction === 'string' ) {
169165 const uniqueRemover = new Set < string > ( )
170- const results = await this . searchActions ( uniqueRemover , actionFullNameMap , {
166+ const results = await this . searchActions ( uniqueRemover , actions , {
171167 ...query ,
172168 keywords : keywordsOrAction ,
173169 } )
Original file line number Diff line number Diff line change @@ -427,10 +427,13 @@ export const ManagerPluginEvent = {
427427 currentImage : '' ,
428428 currentText : '' ,
429429 } , query )
430- // console.log('redirect', {keywordsOrAction, query})
431430 const action = await Manager . searchOneAction ( keywordsOrAction , query )
431+ console . log ( 'redirect' , { keywordsOrAction, query, action} )
432432 if ( ! action ) {
433- return false
433+ ManagerPluginEvent . showToast ( context , {
434+ body : '未找到相关操作,请检查关键词或操作名称是否正确' ,
435+ } )
436+ return
434437 }
435438 await Manager . openAction ( action )
436439 } ,
You can’t perform that action at this time.
0 commit comments