@xuda.io/ai_module 1.1.3587 → 1.1.3588

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 +15 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1898,6 +1898,21 @@ export const delete_ai_chat = async function (req) {
1898
1898
  return { code: -3, data: err.message };
1899
1899
  }
1900
1900
  };
1901
+ export const archive_ai_chat = async function (req) {
1902
+ let { conversation_id, uid } = req;
1903
+
1904
+ const app_id = await account_module.get_account_default_project_id(uid);
1905
+ try {
1906
+ let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
1907
+ conversation_doc.stat = 5;
1908
+ conversation_doc.ts = Date.now();
1909
+ const data = await db_module.save_app_couch_doc(app_id, conversation_doc);
1910
+
1911
+ return { code: 3, data };
1912
+ } catch (err) {
1913
+ return { code: -3, data: err.message };
1914
+ }
1915
+ };
1901
1916
 
1902
1917
  export const create_studio_app = async function (subject) {
1903
1918
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3587",
3
+ "version": "1.1.3588",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",