()
| 336 | } |
| 337 | |
| 338 | private toolContext(): ToolContext { |
| 339 | return { |
| 340 | cwd: this.options.cwd, |
| 341 | token: this.options.token, |
| 342 | getTodos: () => this.todos, |
| 343 | setTodos: (todos: string) => { |
| 344 | this.todos = todos |
| 345 | this.options.callbacks.onEvent({ type: "todos", todos }) |
| 346 | }, |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | async runTurn(userText: string): Promise<void> { |
| 351 | const { onEvent } = this.options.callbacks |