@@ -1215,10 +1215,14 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
1215
1215
{
1216
1216
_updateSource ? . Cancel ( ) ;
1217
1217
1218
+ App . API . LogDebug ( ClassName , $ "Start query with text: <{ QueryText } >") ;
1219
+
1218
1220
var query = await ConstructQueryAsync ( QueryText , Settings . CustomShortcuts , Settings . BuiltinShortcuts ) ;
1219
1221
1220
1222
if ( query == null ) // shortcut expanded
1221
1223
{
1224
+ App . API . LogDebug ( ClassName , $ "Clear query results") ;
1225
+
1222
1226
// Hide and clear results again because running query may show and add some results
1223
1227
Results . Visibility = Visibility . Collapsed ;
1224
1228
Results . Clear ( ) ;
@@ -1233,6 +1237,8 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
1233
1237
return ;
1234
1238
}
1235
1239
1240
+ App . API . LogDebug ( ClassName , $ "Start query with ActionKeyword <{ query . ActionKeyword } > and RawQuery <{ query . RawQuery } >") ;
1241
+
1236
1242
_updateSource = new CancellationTokenSource ( ) ;
1237
1243
1238
1244
ProgressBarVisibility = Visibility . Hidden ;
@@ -1253,6 +1259,9 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
1253
1259
1254
1260
var plugins = PluginManager . ValidPluginsForQuery ( query ) ;
1255
1261
1262
+ var validPluginNames = plugins . Select ( x => $ "<{ x . Metadata . Name } >") ;
1263
+ App . API . LogDebug ( ClassName , $ "Valid <{ plugins . Count } > plugins: { string . Join ( " " , validPluginNames ) } ") ;
1264
+
1256
1265
if ( plugins . Count == 1 )
1257
1266
{
1258
1267
PluginIconPath = plugins . Single ( ) . Metadata . IcoPath ;
@@ -1321,6 +1330,8 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
1321
1330
// Local function
1322
1331
async Task QueryTaskAsync ( PluginPair plugin , CancellationToken token )
1323
1332
{
1333
+ App . API . LogDebug ( ClassName , $ "Wait for querying plugin <{ plugin . Metadata . Name } >") ;
1334
+
1324
1335
if ( searchDelay )
1325
1336
{
1326
1337
var searchDelayTime = plugin . Metadata . SearchDelayTime ?? Settings . SearchDelayTime ;
@@ -1359,6 +1370,8 @@ async Task QueryTaskAsync(PluginPair plugin, CancellationToken token)
1359
1370
1360
1371
if ( token . IsCancellationRequested ) return ;
1361
1372
1373
+ App . API . LogDebug ( ClassName , $ "Update results for plugin <{ plugin . Metadata . Name } >") ;
1374
+
1362
1375
if ( ! _resultsUpdateChannelWriter . TryWrite ( new ResultsForUpdate ( resultsCopy , plugin . Metadata , query ,
1363
1376
token , reSelect ) ) )
1364
1377
{
@@ -1448,6 +1461,8 @@ private void RemoveOldQueryResults(Query query)
1448
1461
{
1449
1462
if ( _lastQuery ? . ActionKeyword != query ? . ActionKeyword )
1450
1463
{
1464
+ App . API . LogDebug ( ClassName , $ "Remove old results") ;
1465
+
1451
1466
Results . Clear ( ) ;
1452
1467
}
1453
1468
}
0 commit comments