Pi: Fix Pinecone vector-search output options. The Pinecone block expose... - #6064
Pi: Fix Pinecone vector-search output options.
The Pinecone block expose...#6064BillLeoutsakosvl346 wants to merge 1 commit into
Conversation
The Pinecone block expose...
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview The Pinecone block maps the Reviewed by Cursor Bugbot for commit fd9e9b7. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fd9e9b7. Configure here.
| : [] | ||
| result.includeValues = options.includes('includeValues') | ||
| result.includeMetadata = options.includes('includeMetadata') | ||
| } |
There was a problem hiding this comment.
Checkbox options never reach query
High Severity
The new mapper reads params.options as an array of selected IDs, but checkbox-list stores each choice as a boolean under the option id (includeValues / includeMetadata), and those keys are dropped during block param extraction. UI selections never set the tool flags, so search always sends both as false after the hardcoded true defaults were removed.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit fd9e9b7. Configure here.
| if (params.options != null && params.options !== '') { | ||
| const options = Array.isArray(params.options) | ||
| ? params.options | ||
| : typeof params.options === 'string' | ||
| ? JSON.parse(params.options) | ||
| : [] | ||
| result.includeValues = options.includes('includeValues') | ||
| result.includeMetadata = options.includes('includeMetadata') | ||
| } |
There was a problem hiding this comment.
When a user enables Include Values and/or Include Metadata on a Pinecone search_vector block, CheckboxList persists booleans under the option ids includeValues/includeMetadata and never writes a selected-ID array on params.options. extractBlockParams only emits declared subBlock ids, so this branch never runs and search_vector always sends includeValues/includeMetadata as false (replacing the previous hardcoded true), so checked options never change the Pinecone query body.
Knowledge Base Used: Blocks Module
Greptile SummaryWires Pinecone vector-search Include Values/Metadata from tool params instead of hardcoded true, adds block-side options mapping, and adds unit tests for body flag combinations.
Confidence Score: 2/5Not safe to merge: Include Values/Metadata checkboxes still do not drive the Pinecone query, and the hardcoded-true path was replaced with always-false defaults. CheckboxList persists per-option booleans under option ids while the new params path expects a selected-ID array on options that is never populated; extractBlockParams does not surface those option keys, so search always sends includeValues/includeMetadata false after this change. Files Needing Attention: apps/sim/blocks/blocks/pinecone.ts, apps/sim/tools/pinecone/search_vector.ts
|
| Filename | Overview |
|---|---|
| apps/sim/blocks/blocks/pinecone.ts | Options-array mapping does not match CheckboxList storage or extractBlockParams, so UI selections never set include flags. |
| apps/sim/tools/pinecone/search_vector.ts | Correctly reads include flags with false defaults, but receives no true values from the broken block mapping path. |
| apps/sim/tools/pinecone/search_vector.test.ts | Covers tool body combinations only; misses block params and checkbox serialization. |
Reviews (1): Last reviewed commit: "Pi: Fix Pinecone vector-search output op..." | Re-trigger Greptile


Task
Fix Pinecone vector-search output options.
The Pinecone block exposes Include Values and Include Metadata checkboxes for the search_vector operation, but apps/sim/tools/pinecone/search_vector.ts always sends both fields as true.
Trace how the options checkbox list is serialized and map its selected IDs to includeValues and includeMetadata in the tool parameters. Use those parameters in the Pinecone query body instead of hardcoded values.
Add focused tests covering neither option, each option individually, and both options. Do not require a live Pinecone account or API key for testing. Run the relevant tests, Biome, and TypeScript checks.
Summary
Implemented Pinecone vector-search output options.
Changes:
apps/sim/blocks/blocks/pinecone.tsparams.optionsto:includeValuesincludeMetadataapps/sim/tools/pinecone/search_vector.tstrue.falsewhen unselected.apps/sim/tools/pinecone/search_vector.test.tsValidation:
bunxis not installed in the sandbox (bunx: command not found).