mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-22 11:58:55 +00:00
codeinterpreter: permit console.log with single string arg (#3426)
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
@@ -102,7 +102,9 @@ void CodeInterpreterWorker::request(const QString &code)
|
||||
auto consoleObject = m_engine.evaluate(uR"(
|
||||
class Console {
|
||||
log(...args) {
|
||||
if (args.length && typeof args[0] === 'string')
|
||||
if (args.length == 0)
|
||||
return;
|
||||
if (args.length >= 2 && typeof args[0] === 'string')
|
||||
throw new Error('console.log string formatting not supported');
|
||||
let cat = '';
|
||||
for (const arg of args) {
|
||||
|
Reference in New Issue
Block a user