Commit 7edb738
committed
improvement(kb-connectors): multi-select fields + Slack bot/app message extraction
Adds multi-value support to KB connector configuration fields and applies it
across 8 connectors: Jira (projects), Confluence (spaces), Slack (channels),
Microsoft Teams (channels), Google Calendar (calendars), Gmail (labels),
Notion (databases), and Linear (teams + projects). Each connector emits
byte-identical externalId for legacy single-value configs so existing rows
reconcile in place via the sync engine's externalId-keyed matching.
Framework changes:
- ConnectorConfigField gains `multi?: boolean`
- New `parseMultiValue` helper in @/connectors/utils
- useConnectorConfigFields state model upgraded to string|string[]
- ConnectorSelectorField renders Combobox in multi-select mode when `field.multi`
- Add/edit connector modals handle array values end-to-end
Per-connector specifics:
- Jira: JQL `project in (...)` for 2+ keys, `project = X` for one
- Confluence: routes through CQL `space in (...)` when multi; v2 fast path stays
for single+no-label; also fixes selector returning space.id instead of space.key
- Slack: loops per channel emitting one document each; extracts text from
attachments and Block Kit blocks (incl. nested attachment.blocks where GitHub
embeds PR bodies); contentHash bumped to slack-v2: to force one-time re-embed
- Microsoft Teams: loops per channel within a single team
- Google Calendar: compound cursor across calendars; single-calendar keeps
legacy externalId/contentHash for zero-churn
- Gmail: (label:A OR label:B) with quoted-form for labels with spaces
- Notion: sequential walk via JSON compound cursor; single-DB keeps bare cursor
- Linear: GraphQL IdComparator.in for multi, eq for single1 parent 21c956c commit 7edb738
15 files changed
Lines changed: 1012 additions & 353 deletions
File tree
- apps/sim
- app/workspace/[workspaceId]/knowledge/[id]
- components
- add-connector-modal
- connector-selector-field
- edit-connector-modal
- hooks
- connectors
- confluence
- gmail
- google-calendar
- jira
- linear
- microsoft-teams
- notion
- slack
- hooks/selectors/providers/confluence
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | | - | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
161 | | - | |
162 | 163 | | |
| 164 | + | |
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
172 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
173 | 181 | | |
174 | 182 | | |
175 | 183 | | |
| |||
370 | 378 | | |
371 | 379 | | |
372 | 380 | | |
373 | | - | |
374 | | - | |
| 381 | + | |
| 382 | + | |
375 | 383 | | |
376 | 384 | | |
377 | 385 | | |
| |||
385 | 393 | | |
386 | 394 | | |
387 | 395 | | |
388 | | - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
389 | 401 | | |
390 | 402 | | |
391 | 403 | | |
392 | 404 | | |
393 | 405 | | |
394 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
395 | 411 | | |
396 | 412 | | |
397 | 413 | | |
| |||
Lines changed: 42 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | | - | |
14 | | - | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | | - | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
76 | 105 | | |
77 | 106 | | |
78 | 107 | | |
79 | | - | |
80 | | - | |
| 108 | + | |
| 109 | + | |
81 | 110 | | |
82 | 111 | | |
83 | 112 | | |
| |||
96 | 125 | | |
97 | 126 | | |
98 | 127 | | |
99 | | - | |
| 128 | + | |
100 | 129 | | |
101 | 130 | | |
102 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
103 | 136 | | |
104 | 137 | | |
105 | | - | |
| 138 | + | |
106 | 139 | | |
107 | 140 | | |
108 | 141 | | |
109 | 142 | | |
110 | | - | |
| 143 | + | |
111 | 144 | | |
112 | 145 | | |
113 | 146 | | |
| |||
Lines changed: 66 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
64 | 90 | | |
65 | 91 | | |
66 | 92 | | |
| |||
96 | 122 | | |
97 | 123 | | |
98 | 124 | | |
99 | | - | |
100 | | - | |
| 125 | + | |
| 126 | + | |
101 | 127 | | |
102 | 128 | | |
103 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
104 | 135 | | |
105 | 136 | | |
106 | 137 | | |
107 | 138 | | |
108 | 139 | | |
109 | 140 | | |
110 | 141 | | |
111 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
112 | 157 | | |
113 | 158 | | |
114 | 159 | | |
| |||
147 | 192 | | |
148 | 193 | | |
149 | 194 | | |
150 | | - | |
| 195 | + | |
151 | 196 | | |
152 | 197 | | |
153 | 198 | | |
| |||
169 | 214 | | |
170 | 215 | | |
171 | 216 | | |
172 | | - | |
| 217 | + | |
173 | 218 | | |
174 | | - | |
| 219 | + | |
175 | 220 | | |
176 | 221 | | |
177 | 222 | | |
| |||
276 | 321 | | |
277 | 322 | | |
278 | 323 | | |
279 | | - | |
| 324 | + | |
280 | 325 | | |
281 | 326 | | |
282 | 327 | | |
283 | 328 | | |
284 | | - | |
| 329 | + | |
285 | 330 | | |
286 | 331 | | |
287 | 332 | | |
| |||
344 | 389 | | |
345 | 390 | | |
346 | 391 | | |
347 | | - | |
348 | | - | |
| 392 | + | |
| 393 | + | |
349 | 394 | | |
350 | 395 | | |
351 | 396 | | |
| |||
359 | 404 | | |
360 | 405 | | |
361 | 406 | | |
362 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
363 | 412 | | |
364 | 413 | | |
365 | 414 | | |
366 | 415 | | |
367 | 416 | | |
368 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
369 | 422 | | |
370 | 423 | | |
371 | 424 | | |
| |||
0 commit comments