@xuda.io/ai_module 1.1.3586 → 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.
- package/index.mjs +15 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1873,7 +1873,6 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1873
1873
|
export const delete_ai_chat = async function (req) {
|
|
1874
1874
|
let { conversation_id, uid } = req;
|
|
1875
1875
|
|
|
1876
|
-
// const project_db = await get_account_project_db(uid);
|
|
1877
1876
|
const app_id = await account_module.get_account_default_project_id(uid);
|
|
1878
1877
|
try {
|
|
1879
1878
|
let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
|
|
@@ -1899,6 +1898,21 @@ export const delete_ai_chat = async function (req) {
|
|
|
1899
1898
|
return { code: -3, data: err.message };
|
|
1900
1899
|
}
|
|
1901
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
|
+
};
|
|
1902
1916
|
|
|
1903
1917
|
export const create_studio_app = async function (subject) {
|
|
1904
1918
|
try {
|