mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-09 00:08:53 +01:00
Enable more of the IO library in Lua sandbox
Also changes the Lua warning color to red.
This commit is contained in:
parent
28e86563b8
commit
11f9866dbe
@ -1018,7 +1018,7 @@ def lua_warn(msg):
|
|||||||
if(vars.lua_logname != vars.lua_koboldbridge.logging_name):
|
if(vars.lua_logname != vars.lua_koboldbridge.logging_name):
|
||||||
vars.lua_logname = vars.lua_koboldbridge.logging_name
|
vars.lua_logname = vars.lua_koboldbridge.logging_name
|
||||||
print(colors.BLUE + lua_log_format_name(vars.lua_logname) + ":" + colors.END, file=sys.stderr)
|
print(colors.BLUE + lua_log_format_name(vars.lua_logname) + ":" + colors.END, file=sys.stderr)
|
||||||
print(colors.YELLOW + msg.replace("\033", "") + colors.END)
|
print(colors.RED + msg.replace("\033", "") + colors.END)
|
||||||
|
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
# Decode tokens into a string using current tokenizer
|
# Decode tokens into a string using current tokenizer
|
||||||
|
@ -1509,6 +1509,11 @@ return function(_python, _bridged)
|
|||||||
ult = math.ult,
|
ult = math.ult,
|
||||||
},
|
},
|
||||||
io = {
|
io = {
|
||||||
|
stdin = io.stdin,
|
||||||
|
stdout = io.stdout,
|
||||||
|
stderr = io.stderr,
|
||||||
|
input = io.input,
|
||||||
|
output = io.output,
|
||||||
read = io.read,
|
read = io.read,
|
||||||
write = io.write,
|
write = io.write,
|
||||||
flush = io.flush,
|
flush = io.flush,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user