mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-06-13 18:31:16 +08:00
Align custom world info rendering with ST runtime
This commit is contained in:
@@ -940,6 +940,7 @@ export async function evalTaskEjsTemplate(content, renderCtx, extraEnv = {}) {
|
||||
_: utilityLib,
|
||||
console,
|
||||
...templateRuntimeEnv,
|
||||
stat_data: renderCtx.variableState?.cacheVars?.stat_data,
|
||||
user: templateAliases.user,
|
||||
char: templateAliases.char,
|
||||
persona:
|
||||
@@ -963,6 +964,9 @@ export async function evalTaskEjsTemplate(content, renderCtx, extraEnv = {}) {
|
||||
get variables() {
|
||||
return renderCtx.variableState.cacheVars;
|
||||
},
|
||||
get stat_data() {
|
||||
return renderCtx.variableState?.cacheVars?.stat_data;
|
||||
},
|
||||
get lastUserMessageId() {
|
||||
if (typeof chat.findLastIndex === "function") {
|
||||
return chat.findLastIndex((message) => message?.is_user);
|
||||
|
||||
Reference in New Issue
Block a user