mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: update logging for coding attempts
This commit is contained in:
parent
d835ccfd7c
commit
7c4f91e24c
@ -138,12 +138,11 @@ export class CodeSandbox {
|
|||||||
const generation = await this.generateCode(problem, attempts);
|
const generation = await this.generateCode(problem, attempts);
|
||||||
const { code } = generation;
|
const { code } = generation;
|
||||||
|
|
||||||
logDebug(`Coding attempt ${i + 1}:`, { code });
|
|
||||||
// Evaluate the code
|
// Evaluate the code
|
||||||
const result = this.evaluateCode(code);
|
const result = this.evaluateCode(code);
|
||||||
logDebug(`Coding attempt ${i + 1} success:`, { result });
|
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
logInfo('Coding success:', { problem, result });
|
||||||
return {
|
return {
|
||||||
solution: {
|
solution: {
|
||||||
code,
|
code,
|
||||||
@ -153,7 +152,7 @@ export class CodeSandbox {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
logError('Coding error:', { error: result.error });
|
logWarning('Coding error:', { error: result.error });
|
||||||
|
|
||||||
// Store the failed attempt
|
// Store the failed attempt
|
||||||
attempts.push({
|
attempts.push({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user