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",
"mainBinaryName": "RisuAI",
"version": "145.2.0",
"version": "145.3.0",
"identifier": "co.aiclient.risu",
"plugins": {
"updater": {

View File

@@ -38,38 +38,7 @@
const onClick = () => {
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){
let failed = false
for(const set of db.banCharacterset){
console.log(set)
const checkRegex = new RegExp(`\\p{Script=${set}}`, 'gu')
if(checkRegex.test(da.result)){
return {
type: 'fail',
result: 'Banned character found'
trys += 1
if(trys > db.requestRetrys){
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 { OobaChatCompletionRequestParams } from '../model/ooba';
export let appVer = "145.2.0"
export let appVer = "145.3.0"
export let webAppSubVer = ''

View File

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