akpm-knowledge-base-chat 2.0.14 → 2.0.15

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/CDN/akb-chat.js +4 -4
  2. package/package.json +1 -1
package/CDN/akb-chat.js CHANGED
@@ -1,4 +1,4 @@
1
- /* Version: 2.0.14 */
1
+ /* Version: 2.0.15 */
2
2
  var co = Object.defineProperty;
3
3
  var Ws = (t) => {
4
4
  throw TypeError(t);
@@ -3498,8 +3498,8 @@ const jd = async (t) => {
3498
3498
  });
3499
3499
  if (!s.ok)
3500
3500
  return console.error("Failed to fetch documents"), null;
3501
- const i = await s.json(), a = i.result[0].file_name;
3502
- let o = i.result[0].file_content;
3501
+ const i = await s.json();
3502
+ let a = i.result[0].file_name, o = i.result[0].file_content;
3503
3503
  if (a.endsWith(".akd")) {
3504
3504
  const u = `${Ed(e)}/api/download/${t.split("_")[1]}?token=${n}&envId=aks_${t.split("_")[0]}`, d = await fetch(u, {
3505
3505
  method: "GET",
@@ -3510,7 +3510,7 @@ const jd = async (t) => {
3510
3510
  if (!d.ok)
3511
3511
  throw new Error(`Failed to fetch document: ${d.status} - ${d.statusText}`);
3512
3512
  let p = await d.json();
3513
- console.log("FILE FOUND", p), o = p.result[0].file_content;
3513
+ console.log("FILE FOUND", p), a = a.replace(".akd", ".pdf"), o = p.result[0].file_content;
3514
3514
  }
3515
3515
  const c = Uint8Array.from(atob(o), (u) => u.charCodeAt(0)), l = new Blob([c], { type: "application/octet-stream" });
3516
3516
  return new File([l], a);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "akpm-knowledge-base-chat",
3
3
  "private": false,
4
- "version": "2.0.14",
4
+ "version": "2.0.15",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "CDN"