fix(minecraft): fix repl results not feeding to llm
This commit is contained in:
@@ -84,7 +84,7 @@ describe('brain no-action follow-up', () => {
|
||||
expect(queuedEvent).toMatchObject({
|
||||
type: 'system_alert',
|
||||
source: { type: 'system', id: 'brain:no_action_followup' },
|
||||
payload: { reason: 'no_actions' },
|
||||
payload: { reason: 'no_actions', returnValue: '2' },
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -472,8 +472,12 @@ export class Brain {
|
||||
const actionDefs = new Map(this.deps.taskExecutor.getAvailableActions().map(action => [action.name, action]))
|
||||
let turnCancellationToken: CancellationToken | undefined
|
||||
|
||||
const codeToEvaluate = this.planner.canEvaluateAsExpression(result)
|
||||
? `return (\n${result}\n)`
|
||||
: result
|
||||
|
||||
const runResult = await this.planner.evaluate(
|
||||
result,
|
||||
codeToEvaluate,
|
||||
this.deps.taskExecutor.getAvailableActions(),
|
||||
{
|
||||
event,
|
||||
|
||||
Reference in New Issue
Block a user