mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-03 17:44:34 +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:
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|||||||
- Fix regression while using localdocs with server API ([#3410](https://github.com/nomic-ai/gpt4all/pull/3410))
|
- Fix regression while using localdocs with server API ([#3410](https://github.com/nomic-ai/gpt4all/pull/3410))
|
||||||
- Don't show system messages in server chat view ([#3411](https://github.com/nomic-ai/gpt4all/pull/3411))
|
- Don't show system messages in server chat view ([#3411](https://github.com/nomic-ai/gpt4all/pull/3411))
|
||||||
- Fix `codesign --verify` failure on macOS ([#3413](https://github.com/nomic-ai/gpt4all/pull/3413))
|
- Fix `codesign --verify` failure on macOS ([#3413](https://github.com/nomic-ai/gpt4all/pull/3413))
|
||||||
|
- Code Interpreter: Fix console.log not accepting a single string after v3.7.0 ([#3426](https://github.com/nomic-ai/gpt4all/pull/3426))
|
||||||
|
|
||||||
## [3.7.0] - 2025-01-21
|
## [3.7.0] - 2025-01-21
|
||||||
|
|
||||||
|
@@ -102,7 +102,9 @@ void CodeInterpreterWorker::request(const QString &code)
|
|||||||
auto consoleObject = m_engine.evaluate(uR"(
|
auto consoleObject = m_engine.evaluate(uR"(
|
||||||
class Console {
|
class Console {
|
||||||
log(...args) {
|
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');
|
throw new Error('console.log string formatting not supported');
|
||||||
let cat = '';
|
let cat = '';
|
||||||
for (const arg of args) {
|
for (const arg of args) {
|
||||||
|
Reference in New Issue
Block a user