Strategy pattern in backend (mock for patent and projects for now)

This commit is contained in:
Kazgatari
2026-07-13 10:31:20 +02:00
parent 2bacb8e0f9
commit 4e66e581e1
5 changed files with 1001 additions and 6 deletions
@@ -38,6 +38,18 @@ export class SearchResultsStateService {
() => this._payload()?.manualKeywords ?? [],
);
// Compute parallel keywords and topic names for trend dashboard strategies
readonly keywordsList = computed(() => this.keywords());
readonly topicsList = computed(() => {
const ext = this.extractedKeywords();
const man = this.manualKeywords();
const all = [...ext, ...man];
return this.keywords().map((kw) => {
const match = all.find((e) => e.llm_keyword?.keyword === kw);
return match?.topic_mapping?.topic?.display_name ?? kw;
});
});
setPayload(payload: SearchResultsPayload): void {
this._payload.set(payload);
}