Remove console.log statements
This commit is contained in:
@@ -229,7 +229,6 @@
|
|||||||
|
|
||||||
function abortChat(){
|
function abortChat(){
|
||||||
if(abortController){
|
if(abortController){
|
||||||
console.log('abort')
|
|
||||||
abortController.abort()
|
abortController.abort()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -290,8 +289,6 @@
|
|||||||
const lastMessageInputTranslate = messageInputTranslate
|
const lastMessageInputTranslate = messageInputTranslate
|
||||||
await sleep(1500)
|
await sleep(1500)
|
||||||
if(lastMessageInputTranslate === messageInputTranslate){
|
if(lastMessageInputTranslate === messageInputTranslate){
|
||||||
console.log(lastMessageInputTranslate === messageInputTranslate)
|
|
||||||
console.log(lastMessageInputTranslate, messageInputTranslate)
|
|
||||||
translate(reverse ? messageInputTranslate : messageInput, reverse).then((translatedMessage) => {
|
translate(reverse ? messageInputTranslate : messageInput, reverse).then((translatedMessage) => {
|
||||||
if(translatedMessage){
|
if(translatedMessage){
|
||||||
if(reverse)
|
if(reverse)
|
||||||
|
|||||||
@@ -25,15 +25,10 @@
|
|||||||
btn.focus()
|
btn.focus()
|
||||||
}
|
}
|
||||||
if($alertStore.type !== 'input'){
|
if($alertStore.type !== 'input'){
|
||||||
console.log('reset input')
|
|
||||||
input = ''
|
input = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
})()
|
})()
|
||||||
|
|
||||||
alertStore.subscribe(() => {
|
|
||||||
console.log('alup')
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:window on:message={async (e) => {
|
<svelte:window on:message={async (e) => {
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
<svelte:window on:message={async (e) => {
|
<svelte:window on:message={async (e) => {
|
||||||
if(e.origin.startsWith("https://sv.risuai.xyz") || e.origin.startsWith("http://127.0.0.1")){
|
if(e.origin.startsWith("https://sv.risuai.xyz") || e.origin.startsWith("http://127.0.0.1")){
|
||||||
if(e.data.msg.type === 'drive'){
|
if(e.data.msg.type === 'drive'){
|
||||||
console.log(e.data.msg)
|
|
||||||
await loadRisuAccountData()
|
await loadRisuAccountData()
|
||||||
$DataBase.account.data.refresh_token = e.data.msg.data.refresh_token
|
$DataBase.account.data.refresh_token = e.data.msg.data.refresh_token
|
||||||
$DataBase.account.data.access_token = e.data.msg.data.access_token
|
$DataBase.account.data.access_token = e.data.msg.data.access_token
|
||||||
|
|||||||
@@ -60,7 +60,6 @@
|
|||||||
if(d){
|
if(d){
|
||||||
changeToPreset(0)
|
changeToPreset(0)
|
||||||
let botPresets = $DataBase.botPresets
|
let botPresets = $DataBase.botPresets
|
||||||
console.log(botPresets)
|
|
||||||
botPresets.splice(i, 1)
|
botPresets.splice(i, 1)
|
||||||
$DataBase.botPresets = botPresets
|
$DataBase.botPresets = botPresets
|
||||||
changeToPreset(0, false)
|
changeToPreset(0, false)
|
||||||
|
|||||||
@@ -89,7 +89,6 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if((!currentChar) || (!isEqual(currentChar.data, cha))){
|
if((!currentChar) || (!isEqual(currentChar.data, cha))){
|
||||||
console.log("updated")
|
|
||||||
if(cha.type === 'character'){
|
if(cha.type === 'character'){
|
||||||
currentChar = {
|
currentChar = {
|
||||||
type: 'character',
|
type: 'character',
|
||||||
@@ -754,7 +753,6 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for(const f of da){
|
for(const f of da){
|
||||||
console.log(f)
|
|
||||||
const img = f.data
|
const img = f.data
|
||||||
const name = f.name
|
const name = f.name
|
||||||
const extension = name.split('.').pop().toLowerCase()
|
const extension = name.split('.').pop().toLowerCase()
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ export function alertToast(msg:string){
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function alertWait(msg:string){
|
export function alertWait(msg:string){
|
||||||
console.log(msg)
|
|
||||||
alertStore.set({
|
alertStore.set({
|
||||||
'type': 'wait',
|
'type': 'wait',
|
||||||
'msg': msg
|
'msg': msg
|
||||||
|
|||||||
@@ -104,9 +104,7 @@ async function importCharacterProcess(f:{
|
|||||||
alertError(language.errors.noData)
|
alertError(language.errors.noData)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(parts[4])
|
|
||||||
const metaData:RccCardMetaData = JSON.parse(Buffer.from(parts[4], 'base64').toString('utf-8'))
|
const metaData:RccCardMetaData = JSON.parse(Buffer.from(parts[4], 'base64').toString('utf-8'))
|
||||||
console.log(metaData)
|
|
||||||
if(metaData.usePassword){
|
if(metaData.usePassword){
|
||||||
const password = await alertInput(language.inputCardPassword)
|
const password = await alertInput(language.inputCardPassword)
|
||||||
if(!password){
|
if(!password){
|
||||||
@@ -813,7 +811,6 @@ export async function getRisuHub(arg:{
|
|||||||
if(da.status !== 200){
|
if(da.status !== 200){
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
console.log(da)
|
|
||||||
return da.json()
|
return da.json()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return[]
|
return[]
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ export async function addCharEmotion(charId:number) {
|
|||||||
}
|
}
|
||||||
let db = get(DataBase)
|
let db = get(DataBase)
|
||||||
for(const f of selected){
|
for(const f of selected){
|
||||||
console.log(f)
|
|
||||||
const img = f.data
|
const img = f.data
|
||||||
const imgp = await saveImage(img)
|
const imgp = await saveImage(img)
|
||||||
const name = f.name.replace('.png','').replace('.webp','')
|
const name = f.name.replace('.png','').replace('.webp','')
|
||||||
@@ -130,7 +129,6 @@ export async function exportChat(page:number){
|
|||||||
const chat = db.characters[selectedID].chats[page]
|
const chat = db.characters[selectedID].chats[page]
|
||||||
const char = db.characters[selectedID]
|
const char = db.characters[selectedID]
|
||||||
const date = new Date().toJSON();
|
const date = new Date().toJSON();
|
||||||
console.log(mode)
|
|
||||||
if(mode === '0'){
|
if(mode === '0'){
|
||||||
const stringl = Buffer.from(JSON.stringify({
|
const stringl = Buffer.from(JSON.stringify({
|
||||||
type: 'risuChat',
|
type: 'risuChat',
|
||||||
@@ -441,7 +439,6 @@ export async function makeGroupImage() {
|
|||||||
// Return the image URI
|
// Return the image URI
|
||||||
|
|
||||||
const uri = canvas.toDataURL()
|
const uri = canvas.toDataURL()
|
||||||
console.log(uri)
|
|
||||||
canvas.remove()
|
canvas.remove()
|
||||||
db.characters[charID].image = await saveImage(dataURLtoBuffer(uri));
|
db.characters[charID].image = await saveImage(dataURLtoBuffer(uri));
|
||||||
setDatabase(db)
|
setDatabase(db)
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ async function createBotFromWebMain(prompt:string):Promise<creationResult>{
|
|||||||
}
|
}
|
||||||
const searchDom = new DOMParser()
|
const searchDom = new DOMParser()
|
||||||
const searchDoc = searchDom.parseFromString(Buffer.from(bd.data).toString('utf-8'), 'text/html')
|
const searchDoc = searchDom.parseFromString(Buffer.from(bd.data).toString('utf-8'), 'text/html')
|
||||||
console.log(searchDoc)
|
|
||||||
const links = searchDoc.querySelectorAll(".link-text")
|
const links = searchDoc.querySelectorAll(".link-text")
|
||||||
let url = ''
|
let url = ''
|
||||||
const fandomURL = /(.+?)\.fandom\.com\/wiki\//g
|
const fandomURL = /(.+?)\.fandom\.com\/wiki\//g
|
||||||
@@ -50,7 +49,6 @@ async function createBotFromWebMain(prompt:string):Promise<creationResult>{
|
|||||||
}
|
}
|
||||||
const surl = new URL(lurl)
|
const surl = new URL(lurl)
|
||||||
const charname = surl.pathname.split("/")[2].toLocaleLowerCase()
|
const charname = surl.pathname.split("/")[2].toLocaleLowerCase()
|
||||||
console.log(charname)
|
|
||||||
if(charname.includes('main') ||charname.includes('home') || charname.includes('wiki')){
|
if(charname.includes('main') ||charname.includes('home') || charname.includes('wiki')){
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c
|
|||||||
data = data.replaceAll(assetRegex, (full:string, type:string, name:string) => {
|
data = data.replaceAll(assetRegex, (full:string, type:string, name:string) => {
|
||||||
name = name.toLocaleLowerCase()
|
name = name.toLocaleLowerCase()
|
||||||
if(type === 'emotion'){
|
if(type === 'emotion'){
|
||||||
console.log(emoPaths, name)
|
|
||||||
const path = emoPaths[name]
|
const path = emoPaths[name]
|
||||||
if(!path){
|
if(!path){
|
||||||
return ''
|
return ''
|
||||||
@@ -615,8 +614,6 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
|||||||
return "[Cannot get time, previous message was sent in older version]"
|
return "[Cannot get time, previous message was sent in older version]"
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(message.time)
|
|
||||||
console.log(previous_message.time)
|
|
||||||
let duration = message.time - previous_message.time
|
let duration = message.time - previous_message.time
|
||||||
//output time in format like 10:30:00
|
//output time in format like 10:30:00
|
||||||
let seconds = Math.floor(duration / 1000)
|
let seconds = Math.floor(duration / 1000)
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ export const PngChunk = {
|
|||||||
const len = data[pos] * 0x1000000 + data[pos+1] * 0x10000 + data[pos+2] * 0x100 + data[pos+3]
|
const len = data[pos] * 0x1000000 + data[pos+1] * 0x10000 + data[pos+2] * 0x100 + data[pos+3]
|
||||||
const type = data.slice(pos+4,pos+8)
|
const type = data.slice(pos+4,pos+8)
|
||||||
const typeString = new TextDecoder().decode(type)
|
const typeString = new TextDecoder().decode(type)
|
||||||
console.log(typeString, len)
|
|
||||||
if(arg.checkCrc){
|
if(arg.checkCrc){
|
||||||
const crc = data[pos+8+len] * 0x1000000 + data[pos+9+len] * 0x10000 + data[pos+10+len] * 0x100 + data[pos+11+len]
|
const crc = data[pos+8+len] * 0x1000000 + data[pos+9+len] * 0x10000 + data[pos+10+len] * 0x100 + data[pos+11+len]
|
||||||
const crcCheck = crc32(data.slice(pos+4,pos+8+len))
|
const crcCheck = crc32(data.slice(pos+4,pos+8+len))
|
||||||
@@ -120,7 +119,6 @@ export const PngChunk = {
|
|||||||
const len = data[pos] * 0x1000000 + data[pos+1] * 0x10000 + data[pos+2] * 0x100 + data[pos+3]
|
const len = data[pos] * 0x1000000 + data[pos+1] * 0x10000 + data[pos+2] * 0x100 + data[pos+3]
|
||||||
const type = data.slice(pos+4,pos+8)
|
const type = data.slice(pos+4,pos+8)
|
||||||
const typeString = new TextDecoder().decode(type)
|
const typeString = new TextDecoder().decode(type)
|
||||||
console.log(typeString, len)
|
|
||||||
if(arg.checkCrc){
|
if(arg.checkCrc){
|
||||||
const crc = data[pos+8+len] * 0x1000000 + data[pos+9+len] * 0x10000 + data[pos+10+len] * 0x100 + data[pos+11+len]
|
const crc = data[pos+8+len] * 0x1000000 + data[pos+9+len] * 0x10000 + data[pos+10+len] * 0x100 + data[pos+11+len]
|
||||||
const crcCheck = crc32(data.slice(pos+4,pos+8+len))
|
const crcCheck = crc32(data.slice(pos+4,pos+8+len))
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ function updateCurrentCharacter(){
|
|||||||
ShowVN.set(currentChar?.viewScreen === 'vn')
|
ShowVN.set(currentChar?.viewScreen === 'vn')
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Character updated")
|
|
||||||
CurrentCharacter.set(cloneDeep(currentChar))
|
CurrentCharacter.set(cloneDeep(currentChar))
|
||||||
const simp = createSimpleCharacter(currentChar)
|
const simp = createSimpleCharacter(currentChar)
|
||||||
|
|
||||||
|
|||||||
@@ -236,8 +236,6 @@ export async function strongBan(data:string, bias:{[key:number]:number}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('strongBan', performance.now() - performace)
|
|
||||||
console.log('added', Object.keys(bias).length - length)
|
|
||||||
localStorage.setItem('strongBan_' + data, JSON.stringify(bias))
|
localStorage.setItem('strongBan_' + data, JSON.stringify(bias))
|
||||||
return bias
|
return bias
|
||||||
}
|
}
|
||||||
@@ -162,8 +162,6 @@ function readFileAsUint8Array(file) {
|
|||||||
export async function changeFullscreen(){
|
export async function changeFullscreen(){
|
||||||
const db = get(DataBase)
|
const db = get(DataBase)
|
||||||
const isFull = await appWindow.isFullscreen()
|
const isFull = await appWindow.isFullscreen()
|
||||||
console.log(isFull)
|
|
||||||
console.log(db.fullScreen)
|
|
||||||
if(db.fullScreen && (!isFull)){
|
if(db.fullScreen && (!isFull)){
|
||||||
await appWindow.setFullscreen(true)
|
await appWindow.setFullscreen(true)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ class voiceDetector{
|
|||||||
const dataArray = new Uint8Array(this.analyser.frequencyBinCount);
|
const dataArray = new Uint8Array(this.analyser.frequencyBinCount);
|
||||||
this.analyser.getByteTimeDomainData(dataArray);
|
this.analyser.getByteTimeDomainData(dataArray);
|
||||||
const volume = dataArray.reduce((acc, val) => acc + val, 0) / dataArray.length;
|
const volume = dataArray.reduce((acc, val) => acc + val, 0) / dataArray.length;
|
||||||
console.log(volume);
|
|
||||||
if (Date.now() - start > 10000) {
|
if (Date.now() - start > 10000) {
|
||||||
this.mediaRecorder.stop();
|
this.mediaRecorder.stop();
|
||||||
clearInterval(this.intervalID);
|
clearInterval(this.intervalID);
|
||||||
|
|||||||
Reference in New Issue
Block a user