Skip to content

Commit

Permalink
1.93.3 (#345)
Browse files Browse the repository at this point in the history
# PR Checklist
- [ ] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [ ] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
  • Loading branch information
kwaroran authored Apr 7, 2024
2 parents 00131a5 + 93c2e0c commit 2fcdc81
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "RisuAI",
"version": "1.93.2"
"version": "1.93.3"
},
"tauri": {
"allowlist": {
Expand Down
22 changes: 17 additions & 5 deletions src/lib/ChatScreens/DefaultChatScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
let messageInput:string = ''
let messageInputTranslate:string = ''
let openMenu = false
let loadPages = 30
let loadPages = 10
let lastLoadedChatId = ''
let autoMode = false
let rerolls:Message[][] = []
let rerollid = -1
Expand All @@ -48,6 +49,17 @@
return sendMain(true)
}
function getLoadPages(){
if(!$CurrentChat.id){
$CurrentChat.id = v4()
}
if($CurrentChat.id !== lastLoadedChatId){
lastLoadedChatId = $CurrentChat.id
loadPages = 10
}
return loadPages
}
async function sendMain(continueResponse:boolean) {
let selectedChar = $selectedCharID
if($doingChat){
Expand Down Expand Up @@ -374,7 +386,7 @@
mergedCanvas.remove();
}
alertNormal(language.screenshotSaved)
loadPages = 15
loadPages = 10
} catch (error) {
console.error(error)
alertError("Error while taking screenshot")
Expand All @@ -397,7 +409,7 @@
//@ts-ignore
const scrolled = (e.target.scrollHeight - e.target.clientHeight + e.target.scrollTop)
if(scrolled < 100 && $CurrentChat.message.length > loadPages){
loadPages += 15
loadPages += 10
}
}}>
<div class="flex items-end mt-2 mb-2 w-full">
Expand Down Expand Up @@ -517,7 +529,7 @@
)} {send}/>
{/if}

{#each messageForm($CurrentChat.message, loadPages) as chat, i}
{#each messageForm($CurrentChat.message, getLoadPages()) as chat, i}
{#if chat.role === 'char'}
{#if $CurrentCharacter.type !== 'group'}
<Chat
Expand Down Expand Up @@ -561,7 +573,7 @@
/>
{/if}
{/each}
{#if $CurrentChat.message.length <= loadPages}
{#if $CurrentChat.message.length <= getLoadPages()}
{#if $CurrentCharacter.type !== 'group'}
<Chat
character={$CurrentSimpleCharacter}
Expand Down
3 changes: 2 additions & 1 deletion src/ts/storage/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.93.2"
export let appVer = "1.93.3"
export let webAppSubVer = ''

export function setDatabase(data:Database){
Expand Down Expand Up @@ -873,6 +873,7 @@ export interface Chat{
isStreaming?:boolean
scriptstate?:{[key:string]:string|number|boolean}
modules?:string[]
id?:string
}

export interface Message{
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.93.2"}
{"version":"1.93.3"}

0 comments on commit 2fcdc81

Please sign in to comment.