chore: update version to 145.3.0

This commit is contained in:
Kwaroran
2025-01-02 03:02:54 +09:00
parent b80f15f885
commit 866996ba1e
5 changed files with 19 additions and 38 deletions

View File

@@ -29,7 +29,7 @@
}, },
"productName": "RisuAI", "productName": "RisuAI",
"mainBinaryName": "RisuAI", "mainBinaryName": "RisuAI",
"version": "145.2.0", "version": "145.3.0",
"identifier": "co.aiclient.risu", "identifier": "co.aiclient.risu",
"plugins": { "plugins": {
"updater": { "updater": {

View File

@@ -38,38 +38,7 @@
const onClick = () => { const onClick = () => {
if(specialDay === 'newYear'){ if(specialDay === 'newYear'){
const db = DBState.db
let messages = 0
let chats = 0
if(db.statistics?.newYear2024){
const markdown = `
# Happy New Year!
You've had:
- Sent over ${db.statistics.newYear2024.messages.toLocaleString()} messages
- Played over ${db.statistics.newYear2024.chats.toLocaleString()} chats
*Statistics are approximate*
`
alertMd(markdown)
return
}
db.characters.map((c) => {
c.chats.map((chat) => {
messages += chat.message.length
})
chats += c.chats.length
})
const markdown = `
# Happy New Year!
You've had:
- Sent over ${messages.toLocaleString()} messages
- Played over ${chats.toLocaleString()} chats
*Statistics are approximate*
`
db.statistics.newYear2024 = {
messages,
chats
}
alertMd(markdown)
} }
} }

View File

@@ -227,16 +227,28 @@ export async function requestChatData(arg:requestDataArgument, model:ModelModeEx
} }
if(da.type === 'success' && db.banCharacterset?.length > 0){ if(da.type === 'success' && db.banCharacterset?.length > 0){
let failed = false
for(const set of db.banCharacterset){ for(const set of db.banCharacterset){
console.log(set)
const checkRegex = new RegExp(`\\p{Script=${set}}`, 'gu') const checkRegex = new RegExp(`\\p{Script=${set}}`, 'gu')
if(checkRegex.test(da.result)){ if(checkRegex.test(da.result)){
return { trys += 1
type: 'fail', if(trys > db.requestRetrys){
result: 'Banned character found' return {
type: 'fail',
result: 'Banned character found, retry limit reached'
}
} }
failed = true
break
} }
} }
if(failed){
continue
}
} }

View File

@@ -12,7 +12,7 @@ import { defaultColorScheme, type ColorScheme } from '../gui/colorscheme';
import type { PromptItem, PromptSettings } from '../process/prompt'; import type { PromptItem, PromptSettings } from '../process/prompt';
import type { OobaChatCompletionRequestParams } from '../model/ooba'; import type { OobaChatCompletionRequestParams } from '../model/ooba';
export let appVer = "145.2.0" export let appVer = "145.3.0"
export let webAppSubVer = '' export let webAppSubVer = ''

View File

@@ -1 +1 @@
{"version":"145.2.0"} {"version":"145.3.0"}