Skip to content

Commit

Permalink
feat: now searching completed task, and cal, when search tags
Browse files Browse the repository at this point in the history
fixes #32 fixes #31
  • Loading branch information
linonetwo committed Jun 25, 2024
1 parent 40ae625 commit c1b164e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commandpalette/configs/configs.multids
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ title: $:/plugins/linonetwo/commandpalette/configs/

TitleAlias: title caption alias
TextAlias: text keywords
TitleTextIgnoreFilter: -[field:calendarEntry[yes]]
TitleTextIgnoreFilter: -[field:calendarEntry[yes]] :filter[!field:tmo_taskState[Completed]!field:tmo_taskState[Archived]!field:tmo_taskState[Terminated]!field:tmo_taskState[Suspended]]
HideDefaultSearchBar: no
TitlePriorityText: no
SearchSystemTitle: no
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { AutocompletePlugin } from '@algolia/autocomplete-js';
import { ITiddlerFields } from 'tiddlywiki';
import { checkIsSearchTags } from '../utils/checkPrefix';
import { titleTextExclusionFilter } from '../utils/configs';
import { IContext } from '../utils/context';
import { debounced } from '../utils/debounce';
import { filterTiddlersAsync } from '../utils/filterTiddlersAsync';
Expand All @@ -13,7 +14,7 @@ export const plugin = {
return [];
}
const onSelect = (item: ITiddlerFields) => {
const filter = `[[${item.title}]] [tag[${item.title}]]`;
const filter = `[[${item.title}]] [tag[${item.title}]] ${titleTextExclusionFilter()}`;
parameters.setContext({ newQuery: '', noClose: true, noNavigate: true, filter } satisfies IContext);
};
return await debounced([{
Expand Down

0 comments on commit c1b164e

Please sign in to comment.