Skip to content

fix(kb): doc selector#4048

Merged
icecrasher321 merged 1 commit intostagingfrom
fix/kb-doc-selector
Apr 8, 2026
Merged

fix(kb): doc selector#4048
icecrasher321 merged 1 commit intostagingfrom
fix/kb-doc-selector

Conversation

@icecrasher321
Copy link
Copy Markdown
Collaborator

Summary

KB doc selector for tools like upload chunk not keyed in

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 8, 2026 5:21pm

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 8, 2026

PR Summary

Low Risk
Low risk UI/config change that only affects how the Knowledge block populates document options in the basic selector; minimal impact outside the block configuration.

Overview
Fixes the Knowledge block’s basic document-selector configuration by explicitly wiring it to the Knowledge selector source (serviceId: 'knowledge' and selectorKey: 'knowledge.documents').

This ensures operations that require a document (e.g. upload_chunk, list_chunks, deletes/updates) can correctly populate and use the visual document picker.

Reviewed by Cursor Bugbot for commit aa879f5. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 8, 2026

Greptile Summary

This PR fixes the document-selector subblock in KnowledgeBlock by adding the missing serviceId and selectorKey properties, which are required for the selector component to resolve and display documents. Without these keys, document-dependent operations such as upload_chunk, delete_document, list_chunks, update_chunk, and delete_chunk would show an empty or non-functional document picker in basic mode.

Confidence Score: 5/5

Safe to merge — minimal, targeted fix with no risk of regression.

The change adds two missing metadata properties to a single subblock definition. It only affects the basic-mode document-selector UI, doesn't touch execution logic, and the underlying tool params/validation path is unchanged.

No files require special attention.

Vulnerabilities

No security concerns identified.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/knowledge.ts Adds serviceId and selectorKey to the documentSelector subblock so the document-selector UI properly fetches documents for chunk and document operations in basic mode.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User selects operation] --> B{Requires a document?}
    B -- yes --> C[Show documentSelector subblock]
    B -- no --> D[Skip documentSelector]
    C --> E{UI mode}
    E -- basic --> F[document-selector with serviceId and selectorKey]
    E -- advanced --> G[Manual short-input for documentId]
    F --> H[Resolved to canonicalParamId documentId]
    G --> H
    H --> I[tools.config.params validates documentId]
    I --> J[Execute knowledge tool]
Loading

Reviews (1): Last reviewed commit: "fix(kb): doc selector" | Re-trigger Greptile

@icecrasher321 icecrasher321 merged commit 650487c into staging Apr 8, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant