Title: fix(agent): drop tool-row values left from a previous operation by waleedlatif1 · Pull Request #10080 · simstudioai/sim · GitHub
Open Graph Title: fix(agent): drop tool-row values left from a previous operation by waleedlatif1 · Pull Request #10080 · simstudioai/sim
X Title: fix(agent): drop tool-row values left from a previous operation by waleedlatif1 · Pull Request #10080 · simstudioai/sim
Description: Summary An Agent tool row keeps its stored values when the user switches the row's operation, but it renders only the sub-blocks the new operation's condition shows. A value written only by now-hidden sub-blocks stayed out of sight. createLLMToolSchema also withheld that param from the model, because the user had "provided" it. The value still reached the block mapper and the vendor at execution. Four cases with the real block configs: Checkr: geo ID left over from Get Geo, row switched to List Candidates. The candidate list gets an invisible geo filter. Checkr: tags left over from Set Report Tags, row switched to Order Report. The old tags get attached to the new report. Trello: archive status left over from Update Card, row switched to Update List. The model can no longer set closed. Once mappers fall back to tool-call args, the list gets archived. CB Insights: websites left over from Look Up Organizations, row switched to Search Firmographics. Results get filtered by a field the user can't see. Fix omitConditionHiddenParams(subBlocks, params, operation) in lib/workflows/tool-input/hidden-params.ts drops a stored value only when every sub-block that writes it is decidably hidden under { ...params, operation }. The writers are sub-blocks matching the value's id or canonical id, widened to the whole basic/advanced group. Every unclear case keeps the value: The operation must be one of the block's own operation option ids. Otherwise a clause on operation is undecided. A clause on another field is decided only when the row holds a scalar value for that field. A stored 'true'/'5' is also tried as a boolean or number. A function condition goes through a Proxy that watches which fields it reads. If it reads an undecided field, nothing is dropped. Example: Video Generator gates settings on model, which the model supplies at call time. Credential and password fields, reactiveCondition fields, and params no sub-block writes are always kept. Applied at: transformBlockTool, before the schema, providerTool.params and the transform. This covers Agent and Pi tool rows, including rows saved before this change. The model now sees the param again when it is user-or-llm. Pi's projected-provenance copy keeps the same keys, the way the agent handler's copy already did. Human-in-the-loop v2 notification tools (prepareNotificationToolParams). v1 is unchanged on purpose. getParamsForToolOperation when the editor switches operations, so rows stop collecting stale values. It now takes the selected operation. Canvas execution is not affected. The serializer already drops sub-blocks whose condition is false (shouldSerializeSubBlock). Review An independent read-only reviewer ran the helper against the real tool-row renderer (getSubBlocksForToolInput). It covered every block with tools, including github, slack, gmail, google_sheets, table, file, notion, hubspot, jira, trello, checkr, cbinsights, airtable, salesforce and microsoft_teams, across every operation. For each operation it tried each option value of each dropdown, switch and checkbox, with values typed and as strings, and stored under both the sub-block id and the canonical id. That came to about 117k combinations and about 1M rendered fields. No visible value was dropped. Tests The new cases in providers/utils.test.ts run the real transform and prepareToolExecution with the real block configs: Four stale-value cases: Trello, CB Insights, and both Checkr cases. Each fails when the transformBlockTool guard is reverted. The operation-switch case fails when the getParamsForToolOperation guard is reverted. Cases that must keep their value: a canonical pair stored under the basic member, the advanced member, or the canonical id; a pure tool param; and an operation the block doesn't list. bun run test passes for providers/utils.test.ts, tools/index.test.ts, the agent, HITL and Pi handler suites, and the custom-block and tool-input suites. 🤖 Generated with Claude Code
Open Graph Description: Summary An Agent tool row keeps its stored values when the user switches the row's operation, but it renders only the sub-blocks the new operation's condition shows. A value written only by...
X Description: Summary An Agent tool row keeps its stored values when the user switches the row's operation, but it renders only the sub-blocks the new operation's condition shows. A value written...
Opengraph URL: https://github.com/simstudioai/sim/pull/10080
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:24b7a1ed-b7db-85c7-71c9-a64cea3c12e7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E1DE:D2A45:3F5DF0:56A551:6AFB998F |
| html-safe-nonce | 95bad176beca61d6e2705bd5b5c7a6ceb4607c9950ec79b8174a3d6c161f8ffe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMURFOkQyQTQ1OjNGNURGMDo1NkE1NTE6NkFGQjk5OEYiLCJ2aXNpdG9yX2lkIjoiNzYxMzk3MzI0NTA5MTA5Mjg3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 657e78df3f7545acc411c19014785ecf875dfc373b584f1f6e41b6ccc63a4ce1 |
| hovercard-subject-tag | pull_request:5330254934 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/10080/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary An Agent tool row keeps its stored values when the user switches the row's operation, but it renders only the sub-blocks the new operation's condition shows. A value written only by... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3cefd19a936819d82cfb5279d50fb56fe79cb9ec30f0f807e04e89b0c58ffae1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 606800bdb1b81d125fc845bdcc262c9fe063fc8f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width