Skip to content

Commit

Permalink
add similar search
Browse files Browse the repository at this point in the history
  • Loading branch information
Jicheng Lu committed Nov 15, 2024
1 parent 02aa068 commit 22f4bbb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/lib/helpers/types/agentTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* @property {import('$commonTypes').Pagination} pager - Pagination
* @property {string} [type]
* @property {string} [agentName]
* @property {string} [similarName]
* @property {boolean} [isPublic]
* @property {boolean} [disabled]
* @property {string[]} [agentIds]
Expand Down
1 change: 1 addition & 0 deletions src/lib/helpers/types/pluginTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @typedef {Object} PluginFilter
* @property {import('$commonTypes').Pagination} pager - Pagination
* @property {string[]} [names] - The plugin names
* @property {string} [similarName] - The plugin similar name
*/

export default {};
2 changes: 1 addition & 1 deletion src/routes/page/agent/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
filter = {
pager: { page: firstPage, size: pageSize, count: 0 },
agentName: event.payload || null
similarName: event.payload || null
};
getPagedAgents();
});
Expand Down
3 changes: 1 addition & 2 deletions src/routes/page/plugin/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@
unsubscriber = globalEventStore.subscribe((/** @type {import('$commonTypes').GlobalEvent} */ event) => {
if (event.name !== GlobalEvent.Search) return;
const names = event.payload ? [event.payload] : undefined;
filter = {
pager: { page: firstPage, size: pageSize, count: 0 },
names: names
similarName: event.payload || null
};
getPagedPlugins();
});
Expand Down

0 comments on commit 22f4bbb

Please sign in to comment.