@xuda.io/ai_module 1.1.3546 → 1.1.3547

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +18 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1777,6 +1777,24 @@ export const get_ai_chats = async function (req, job_id, headers) {
1777
1777
  opt.selector.shared_from_uid = { $gt: null };
1778
1778
  }
1779
1779
 
1780
+ if (search) {
1781
+ opt.selector = {
1782
+ ...opt.selector,
1783
+ $or: [
1784
+ {
1785
+ title: {
1786
+ $regex: `(?i)${search}`,
1787
+ },
1788
+ },
1789
+ {
1790
+ _id: {
1791
+ $regex: `(?i)${search}`,
1792
+ },
1793
+ },
1794
+ ],
1795
+ };
1796
+ }
1797
+
1780
1798
  const app_id = await account_module.get_account_default_project_id(uid);
1781
1799
 
1782
1800
  ////// FROM - IN
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3546",
3
+ "version": "1.1.3547",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",