Update to 1.22.1 (#137)
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "RisuAI",
|
"productName": "RisuAI",
|
||||||
"version": "1.22.0"
|
"version": "1.22.1"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ export type GroupOrder = {
|
|||||||
|
|
||||||
export function groupOrder(chars:GroupOrder[], input:string):GroupOrder[] {
|
export function groupOrder(chars:GroupOrder[], input:string):GroupOrder[] {
|
||||||
let order:GroupOrder[] = [];
|
let order:GroupOrder[] = [];
|
||||||
|
let ids:string[] = []
|
||||||
if (input) {
|
if (input) {
|
||||||
const words = getWords(input)
|
const words = getWords(input)
|
||||||
|
|
||||||
@@ -66,6 +67,7 @@ export function groupOrder(chars:GroupOrder[], input:string):GroupOrder[] {
|
|||||||
|
|
||||||
if (charNameChunks.includes(word)) {
|
if (charNameChunks.includes(word)) {
|
||||||
order.push(char);
|
order.push(char);
|
||||||
|
ids.push(char.id)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,15 +76,15 @@ export function groupOrder(chars:GroupOrder[], input:string):GroupOrder[] {
|
|||||||
|
|
||||||
const shuffled = shuffle(chars)
|
const shuffled = shuffle(chars)
|
||||||
for (const char of shuffled) {
|
for (const char of shuffled) {
|
||||||
if(order.includes(char)){
|
if(ids.includes(char.id)){
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
const chance = char.talkness ?? 0.5
|
||||||
const chance = 0.5
|
|
||||||
|
|
||||||
if (chance >= Math.random()) {
|
if (chance >= Math.random()) {
|
||||||
order.push(char);
|
order.push(char);
|
||||||
|
ids.push(char.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
|
|||||||
talkness: nowChatroom.characterActive[i] ? nowChatroom.characterTalks[i] : -1,
|
talkness: nowChatroom.characterActive[i] ? nowChatroom.characterTalks[i] : -1,
|
||||||
index: i
|
index: i
|
||||||
}
|
}
|
||||||
|
}).filter((v) => {
|
||||||
|
return v.talkness > 0
|
||||||
})
|
})
|
||||||
if(!nowChatroom.orderByOrder){
|
if(!nowChatroom.orderByOrder){
|
||||||
order = groupOrder(order, lastMessage?.data).filter((v) => {
|
order = groupOrder(order, lastMessage?.data).filter((v) => {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { defaultAutoSuggestPrompt, defaultJailbreak, defaultMainPrompt } from '.
|
|||||||
|
|
||||||
export const DataBase = writable({} as any as Database)
|
export const DataBase = writable({} as any as Database)
|
||||||
export const loadedStore = writable(false)
|
export const loadedStore = writable(false)
|
||||||
export let appVer = '1.22.0'
|
export let appVer = '1.22.1'
|
||||||
|
|
||||||
export function setDatabase(data:Database){
|
export function setDatabase(data:Database){
|
||||||
if(checkNullish(data.characters)){
|
if(checkNullish(data.characters)){
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":"1.22.0"}
|
{"version":"1.22.1"}
|
||||||
Reference in New Issue
Block a user