feat(kb): Adding support for more tags to the KB#2433
feat(kb): Adding support for more tags to the KB#2433icecrasher321 merged 31 commits intostagingfrom
Conversation
- Update base-tags-modal with field type selector dropdown - Update document-tags-modal with different input types per fieldType - Update knowledge-tag-filters with operator dropdown and type-specific inputs - Update search routes to support all tag slot types - Update hook to use AllTagSlot type
- Add dropdown with all field types (Text, Number, Date, Boolean) - Render different value inputs based on field type - Update slot counting to include all field types (28 total)
- Replace MAX_TAG_SLOTS with totalSlots in document-tag-entry - Add z-index to SelectContent in base-tags-modal for proper layering
- Only apply empty string check for text columns (tag1-tag7) - Numeric/date/boolean columns only check IS NOT NULL - Cast values to text for consistent output
- Replace @/components/ui imports with @/components/emcn - Use Combobox instead of Select for dropdowns - Use EMCN Switch, Button, Input, Label components - Remove unsupported 'size' prop from EMCN Button
- Change delete button from absolute to inline positioning - Add proper column width (w-10) for delete button - Add empty header cell for delete column - Apply fix to both document-tag-entry and knowledge-tag-filters
- Reset value to empty when changing type (e.g., boolean to text) - Reset value when tag name changes and type differs - Prevents 'true'/'false' from sticking in text inputs
…arch - Copy all tag types (number, date, boolean) from document to embedding records - Update processDocumentTags to handle all field types with proper type conversion - Add number/date/boolean columns to document queries in checkDocumentWriteAccess - Update chunk creation to inherit all tag types from parent document - Add getSearchResultFields helper for consistent query result selection - Support structured filters with operators (eq, gt, lt, between, etc.) - Fix search queries to include all 28 tag fields in results
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@Pbonmars-20031006 also don't forget to generate the migration using bunx drizzle-kit generate to the sql, snapshot, etc shows up [you can do that before me merge] |
|
@Pbonmars-20031006 build failing here Also, we realized that the write speed would become really slow if we have this many indices. Can we have 3 for number and 2 for date. And for text have more filters like "contains" and "starts with" if they have equivalent sql ops -- e.g. https://stackoverflow.com/questions/1069302/using-the-star-sign-in-grep |
Greptile Summary
Important Files Changed
Confidence score: 2/5
|
|
@greptile |
There was a problem hiding this comment.
Additional Comments (3)
-
apps/sim/lib/knowledge/chunks/service.ts, line 181-187 (link)logic: Return object missing typed tags - only includes text tags (tag1-tag7) but should also include number, date, and boolean tags that were assigned during creation.
-
apps/sim/app/api/knowledge/[id]/documents/route.test.ts, line 342-348 (link)logic: Missing new typed tag fields (number1-5, date1-2, boolean1-3) that were added to the main mockDocument. This inconsistency could cause test failures if the actual service returns these fields.
-
apps/sim/tools/knowledge/search.ts, line 33-41 (link)logic: Parameter schema doesn't reflect new structured format - missing fieldType, operator, tagSlot, valueTo fields that are used in the implementation
34 files reviewed, 12 comments
|
@greptile |
Summary
Adding more KB tag types + filters.
Type of Change
Testing
Tested Manually.
Checklist