generated from discourse/discourse-plugin-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: Move semantic search from connector to component (#1048)
- Loading branch information
1 parent
11d0f60
commit b6cefd1
Showing
2 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...scripts/discourse/connectors/full-page-search-below-search-header/ai-full-page-search.gjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Component from "@glimmer/component"; | ||
import AiSemanticSearch from "../../components/ai-full-page-search"; | ||
|
||
export default class AiFullPageSearchConnector extends Component { | ||
static shouldRender(_args, { siteSettings }) { | ||
return siteSettings.ai_embeddings_semantic_search_enabled; | ||
} | ||
|
||
<template> | ||
<AiSemanticSearch | ||
@sortOrder={{@outletArgs.sortOrder}} | ||
@searchTerm={{@outletArgs.search}} | ||
@searchType={{@outletArgs.type}} | ||
@addSearchResults={{@outletArgs.addSearchResults}} | ||
/> | ||
</template> | ||
} |