shaynhornik opened a new pull request, #9149:
URL: https://github.com/apache/texera/pull/9149

   ### What changes were proposed in this PR?
   
   Tools in `settings.disabledTools` were shown as `enabled: false` by 
`system-info`, but `sendMessage` still passed every tool to `generateText`, so 
the agent could call a disabled tool and it ran.
   
   `sendMessage` now passes only the enabled tools, through a small 
`getEnabledTools()` helper. `this.tools` is unchanged, so `getSystemInfo()` 
still lists every tool with its `enabled` flag.
   
   ### Any related issues, documentation, discussions?
   
   Closes #9122
   
   ### How was this PR tested?
   
   Two new tests in `texera-agent.spec.ts`, both using the `ai/test` mock model:
   
   - With `modifyOperator` disabled, the model call gets only `deleteOperator` 
and `addOperator`, and system info still lists `modifyOperator` as disabled.
   - With `deleteOperator` disabled, a model that calls it anyway does not 
delete the operator.
   
   Both fail without the change. Locally: `bun test` (312 pass), `tsc --noEmit` 
and `prettier --check` are clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5). I reviewed and tested the 
change.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to