From 06d1090e1fbd29fb94b577283b2681afe2d5d18d Mon Sep 17 00:00:00 2001 From: kwaroran Date: Fri, 1 Dec 2023 19:47:08 +0900 Subject: [PATCH] [ver] 1.61.5 --- src-tauri/tauri.conf.json | 2 +- src/ts/plugins/embedscript.ts | 6 +++--- src/ts/plugins/embedworker.ts | 18 +++++++++++++++++- src/ts/storage/database.ts | 2 +- version.json | 2 +- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 9fd26d10..91df5db5 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "RisuAI", - "version": "1.61.4" + "version": "1.61.5" }, "tauri": { "allowlist": { diff --git a/src/ts/plugins/embedscript.ts b/src/ts/plugins/embedscript.ts index 4af50ec8..742f2b92 100644 --- a/src/ts/plugins/embedscript.ts +++ b/src/ts/plugins/embedscript.ts @@ -97,13 +97,13 @@ addWorkerFunction('setChat', async (data:Message[]) => { if(typeof dat.data !== 'string'){ return false } - if(typeof dat.saying !== 'string'){ + if(typeof dat.saying !== 'string' && dat.saying !== null && dat.saying !== undefined){ return false } - if(typeof dat.time !== 'number'){ + if(typeof dat.time !== 'number' && dat.time !== null && dat.time !== undefined){ return false } - if(typeof dat.chatId !== 'string'){ + if(typeof dat.chatId !== 'string' && dat.chatId !== null && dat.chatId !== undefined){ return false } newChat.push({ diff --git a/src/ts/plugins/embedworker.ts b/src/ts/plugins/embedworker.ts index 5f9a51d5..9765cbc8 100644 --- a/src/ts/plugins/embedworker.ts +++ b/src/ts/plugins/embedworker.ts @@ -75,7 +75,23 @@ const whitelist = [ "Element", "Text", "Comment", - 'onmessage' + 'onmessage', + "DOMParser", + "XMLSerializer", + "TextEncoder", + "TextDecoder", + "AbortController", + "AbortSignal", + "Event", + "CustomEvent", + "EventTarget", + "OffscreenCanvas", + "ImageBitmap", + "ImageBitmapRenderingContext", + "createImageBitmap", + "OffScreenCanvasRenderingContext2D", + "WebGL2RenderingContext", + "WebGLRenderingContext", ] const evaluation = globaly.eval diff --git a/src/ts/storage/database.ts b/src/ts/storage/database.ts index 7068c9ba..da90af9b 100644 --- a/src/ts/storage/database.ts +++ b/src/ts/storage/database.ts @@ -15,7 +15,7 @@ import type { OobaChatCompletionRequestParams } from '../model/ooba'; export const DataBase = writable({} as any as Database) export const loadedStore = writable(false) -export let appVer = "1.61.4" +export let appVer = "1.61.5" export let webAppSubVer = '' export function setDatabase(data:Database){ diff --git a/version.json b/version.json index a92b6543..190493a5 100644 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{"version":"1.61.4"} \ No newline at end of file +{"version":"1.61.5"} \ No newline at end of file