Add module assets
This commit is contained in:
@@ -9,7 +9,7 @@ import { CurrentCharacter, CurrentChat, SizeStore, selectedCharID } from './stor
|
||||
import { calcString } from './process/infunctions';
|
||||
import { findCharacterbyId, getPersonaPrompt, getUserIcon, getUserName, parseKeyValue, sfc32, sleep, uuidtoNumber } from './util';
|
||||
import { getInlayImage, writeInlayImage } from './process/files/image';
|
||||
import { getModuleLorebooks } from './process/modules';
|
||||
import { getModuleAssets, getModuleLorebooks } from './process/modules';
|
||||
import { HypaProcesser } from './process/memory/hypamemory';
|
||||
import { generateAIImage } from './process/stableDiff';
|
||||
import { requestChatData } from './process/request';
|
||||
@@ -281,6 +281,16 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c
|
||||
}
|
||||
}
|
||||
}
|
||||
const moduleAssets = getModuleAssets()
|
||||
if(moduleAssets.length > 0){
|
||||
for(const asset of moduleAssets){
|
||||
const assetPath = await getFileSrc(asset[1])
|
||||
assetPaths[asset[0].toLocaleLowerCase()] = {
|
||||
path: assetPath,
|
||||
ext: asset[2]
|
||||
}
|
||||
}
|
||||
}
|
||||
const videoExtention = ['mp4', 'webm', 'avi', 'm4p', 'm4v']
|
||||
let needsSourceAccess = false
|
||||
data = data.replaceAll(assetRegex, (full:string, type:string, name:string) => {
|
||||
|
||||
Reference in New Issue
Block a user