agents-inc 0.168.0 → 0.170.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +18 -15
  3. package/dist/{chunk-JIBCVXXL.js → chunk-3G7X2WKI.js} +4 -4
  4. package/dist/{chunk-JOEA52NR.js → chunk-44TE3RKH.js} +46 -2
  5. package/dist/chunk-44TE3RKH.js.map +1 -0
  6. package/dist/{chunk-NU2K5G54.js → chunk-52HDHJ7I.js} +11 -19
  7. package/dist/chunk-52HDHJ7I.js.map +1 -0
  8. package/dist/{chunk-EH2PGPLP.js → chunk-6HNXYYVF.js} +39 -22
  9. package/dist/chunk-6HNXYYVF.js.map +1 -0
  10. package/dist/{chunk-4UKMQUAU.js → chunk-6ZRH5RHC.js} +10 -11
  11. package/dist/chunk-6ZRH5RHC.js.map +1 -0
  12. package/dist/{chunk-5JUQKGCP.js → chunk-7RDMTR64.js} +14 -34
  13. package/dist/chunk-7RDMTR64.js.map +1 -0
  14. package/dist/{chunk-3LZNY46H.js → chunk-BMRUNMPV.js} +4 -4
  15. package/dist/{chunk-VVRI35SK.js → chunk-CLPUWOSA.js} +4 -4
  16. package/dist/{chunk-VVRI35SK.js.map → chunk-CLPUWOSA.js.map} +1 -1
  17. package/dist/{chunk-TW35AEB4.js → chunk-F2BHT5C4.js} +9 -7
  18. package/dist/chunk-F2BHT5C4.js.map +1 -0
  19. package/dist/{chunk-27AVGFXH.js → chunk-F5EBEATU.js} +2 -2
  20. package/dist/{chunk-GE7NUPMI.js → chunk-HED2DAXZ.js} +3 -3
  21. package/dist/{chunk-7PYXS2QU.js → chunk-KOLDW6SF.js} +3 -3
  22. package/dist/{chunk-7PYXS2QU.js.map → chunk-KOLDW6SF.js.map} +1 -1
  23. package/dist/{chunk-C2UISKIM.js → chunk-MQ6CGZNJ.js} +109 -422
  24. package/dist/chunk-MQ6CGZNJ.js.map +1 -0
  25. package/dist/{chunk-P6I72PR3.js → chunk-NCWDK6L7.js} +115 -196
  26. package/dist/chunk-NCWDK6L7.js.map +1 -0
  27. package/dist/{chunk-VRXX4D6K.js → chunk-NEZ4OAOL.js} +1 -1
  28. package/dist/chunk-NEZ4OAOL.js.map +1 -0
  29. package/dist/chunk-NIHUOWE4.js +106 -0
  30. package/dist/chunk-NIHUOWE4.js.map +1 -0
  31. package/dist/{chunk-OI2H6M5I.js → chunk-NQW25DCF.js} +2 -2
  32. package/dist/chunk-NQW25DCF.js.map +1 -0
  33. package/dist/{chunk-ZUGH4MQG.js → chunk-OYJQUA3D.js} +3 -3
  34. package/dist/{chunk-ZUGH4MQG.js.map → chunk-OYJQUA3D.js.map} +1 -1
  35. package/dist/{chunk-AG3ZVM3B.js → chunk-PJWGTNOX.js} +186 -210
  36. package/dist/chunk-PJWGTNOX.js.map +1 -0
  37. package/dist/{chunk-HR7TK2XW.js → chunk-RIPSGNLU.js} +3 -3
  38. package/dist/chunk-RIPSGNLU.js.map +1 -0
  39. package/dist/{chunk-4DRFEYCE.js → chunk-SZYQISA2.js} +7 -7
  40. package/dist/chunk-SZYQISA2.js.map +1 -0
  41. package/dist/{chunk-W6GO2CYX.js → chunk-USVBYQSQ.js} +2 -2
  42. package/dist/{chunk-H4ZKGGTE.js → chunk-V3KTSP3Q.js} +50 -42
  43. package/dist/chunk-V3KTSP3Q.js.map +1 -0
  44. package/dist/{chunk-KTLKR4YY.js → chunk-WTWMGH2C.js} +2 -2
  45. package/dist/commands/build/marketplace.js +23 -22
  46. package/dist/commands/build/marketplace.js.map +1 -1
  47. package/dist/commands/build/plugins.js +8 -9
  48. package/dist/commands/build/plugins.js.map +1 -1
  49. package/dist/commands/compile.js +19 -20
  50. package/dist/commands/compile.js.map +1 -1
  51. package/dist/commands/doctor.js +17 -18
  52. package/dist/commands/doctor.js.map +1 -1
  53. package/dist/commands/edit.js +118 -297
  54. package/dist/commands/edit.js.map +1 -1
  55. package/dist/commands/eject.js +21 -33
  56. package/dist/commands/eject.js.map +1 -1
  57. package/dist/commands/init.js +17 -45
  58. package/dist/commands/list.js +19 -17
  59. package/dist/commands/list.js.map +1 -1
  60. package/dist/commands/new/marketplace.js +11 -11
  61. package/dist/commands/new/marketplace.js.map +1 -1
  62. package/dist/commands/search.js +12 -13
  63. package/dist/commands/search.js.map +1 -1
  64. package/dist/commands/share.js +11 -12
  65. package/dist/commands/share.js.map +1 -1
  66. package/dist/commands/uninstall.js +18 -20
  67. package/dist/commands/uninstall.js.map +1 -1
  68. package/dist/commands/update.js +8 -9
  69. package/dist/commands/update.js.map +1 -1
  70. package/dist/components/common/removal-plan-confirm.js +2 -2
  71. package/dist/components/common/scroll-affordance.js +9 -0
  72. package/dist/components/common/select-list.js +2 -3
  73. package/dist/components/common/skill-agent-summary.js +11 -0
  74. package/dist/components/common/spinner.js +1 -1
  75. package/dist/{chunk-QWFG7Y3R.js → components/common/summary-panel.js} +57 -31
  76. package/dist/components/common/summary-panel.js.map +1 -0
  77. package/dist/config-exports.js +1 -1
  78. package/dist/hooks/init.js +18 -46
  79. package/dist/hooks/init.js.map +1 -1
  80. package/dist/load-agent-defs-YMDWBFDP.js +14 -0
  81. package/dist/recompile-project-agents-SZ76WNTW.js +18 -0
  82. package/dist/{source-loader-FRJTCSDL.js → source-loader-C5SQXZXI.js} +5 -5
  83. package/dist/src/agents/meta/codex-keeper/playbook.md +2 -3
  84. package/package.json +2 -3
  85. package/src/agents/meta/codex-keeper/playbook.md +2 -3
  86. package/src/schemas/project-config.schema.json +1 -1
  87. package/assets/demo.tape +0 -266
  88. package/dist/chunk-23DNVNFP.js +0 -292
  89. package/dist/chunk-23DNVNFP.js.map +0 -1
  90. package/dist/chunk-3DIDV6H3.js +0 -268
  91. package/dist/chunk-3DIDV6H3.js.map +0 -1
  92. package/dist/chunk-4DRFEYCE.js.map +0 -1
  93. package/dist/chunk-4HWOYYY7.js +0 -92
  94. package/dist/chunk-4HWOYYY7.js.map +0 -1
  95. package/dist/chunk-4UKMQUAU.js.map +0 -1
  96. package/dist/chunk-5JUQKGCP.js.map +0 -1
  97. package/dist/chunk-6WGXTB2L.js +0 -28
  98. package/dist/chunk-6WGXTB2L.js.map +0 -1
  99. package/dist/chunk-AG3ZVM3B.js.map +0 -1
  100. package/dist/chunk-C2UISKIM.js.map +0 -1
  101. package/dist/chunk-CMJBKQUH.js +0 -23
  102. package/dist/chunk-CMJBKQUH.js.map +0 -1
  103. package/dist/chunk-DJEO3F2H.js +0 -230
  104. package/dist/chunk-DJEO3F2H.js.map +0 -1
  105. package/dist/chunk-EH2PGPLP.js.map +0 -1
  106. package/dist/chunk-GRL73YPF.js +0 -197
  107. package/dist/chunk-GRL73YPF.js.map +0 -1
  108. package/dist/chunk-H4ZKGGTE.js.map +0 -1
  109. package/dist/chunk-HI6YB7XP.js +0 -59
  110. package/dist/chunk-HI6YB7XP.js.map +0 -1
  111. package/dist/chunk-HL3GYRMR.js +0 -17
  112. package/dist/chunk-HL3GYRMR.js.map +0 -1
  113. package/dist/chunk-HR7TK2XW.js.map +0 -1
  114. package/dist/chunk-JOEA52NR.js.map +0 -1
  115. package/dist/chunk-JPMV4E4E.js +0 -118
  116. package/dist/chunk-JPMV4E4E.js.map +0 -1
  117. package/dist/chunk-JVUN6AOO.js +0 -237
  118. package/dist/chunk-JVUN6AOO.js.map +0 -1
  119. package/dist/chunk-KQ3PDARZ.js +0 -25
  120. package/dist/chunk-KQ3PDARZ.js.map +0 -1
  121. package/dist/chunk-L3W2JWBA.js +0 -168
  122. package/dist/chunk-L3W2JWBA.js.map +0 -1
  123. package/dist/chunk-LFUJCRCT.js +0 -27
  124. package/dist/chunk-LFUJCRCT.js.map +0 -1
  125. package/dist/chunk-NU2K5G54.js.map +0 -1
  126. package/dist/chunk-OI2H6M5I.js.map +0 -1
  127. package/dist/chunk-P6I72PR3.js.map +0 -1
  128. package/dist/chunk-PCFUXQJA.js +0 -317
  129. package/dist/chunk-PCFUXQJA.js.map +0 -1
  130. package/dist/chunk-PLX2FLEQ.js +0 -48
  131. package/dist/chunk-PLX2FLEQ.js.map +0 -1
  132. package/dist/chunk-QWFG7Y3R.js.map +0 -1
  133. package/dist/chunk-SLBL3WIP.js +0 -121
  134. package/dist/chunk-SLBL3WIP.js.map +0 -1
  135. package/dist/chunk-TSIU7DME.js +0 -43
  136. package/dist/chunk-TSIU7DME.js.map +0 -1
  137. package/dist/chunk-TW35AEB4.js.map +0 -1
  138. package/dist/chunk-VRXX4D6K.js.map +0 -1
  139. package/dist/chunk-W5KEYSOL.js +0 -51
  140. package/dist/chunk-W5KEYSOL.js.map +0 -1
  141. package/dist/chunk-WNLF5EDZ.js +0 -1170
  142. package/dist/chunk-WNLF5EDZ.js.map +0 -1
  143. package/dist/chunk-WTJ3AY33.js +0 -31
  144. package/dist/chunk-WTJ3AY33.js.map +0 -1
  145. package/dist/chunk-X6ZZEYO3.js +0 -53
  146. package/dist/chunk-X6ZZEYO3.js.map +0 -1
  147. package/dist/chunk-XQHZPINL.js +0 -89
  148. package/dist/chunk-XQHZPINL.js.map +0 -1
  149. package/dist/chunk-YN3SWF53.js +0 -35
  150. package/dist/chunk-YN3SWF53.js.map +0 -1
  151. package/dist/components/wizard/category-grid.js +0 -13
  152. package/dist/components/wizard/checkbox-grid.js +0 -12
  153. package/dist/components/wizard/domain-selection.js +0 -18
  154. package/dist/components/wizard/run-wizard-session.js +0 -40
  155. package/dist/components/wizard/run-wizard-session.js.map +0 -1
  156. package/dist/components/wizard/scroll-affordance.js +0 -9
  157. package/dist/components/wizard/skill-agent-summary.js +0 -13
  158. package/dist/components/wizard/source-grid.js +0 -16
  159. package/dist/components/wizard/source-grid.js.map +0 -1
  160. package/dist/components/wizard/stack-selection.js +0 -17
  161. package/dist/components/wizard/stack-selection.js.map +0 -1
  162. package/dist/components/wizard/step-agents.js +0 -18
  163. package/dist/components/wizard/step-agents.js.map +0 -1
  164. package/dist/components/wizard/step-build.js +0 -18
  165. package/dist/components/wizard/step-build.js.map +0 -1
  166. package/dist/components/wizard/step-confirm.js +0 -18
  167. package/dist/components/wizard/step-confirm.js.map +0 -1
  168. package/dist/components/wizard/step-sources.js +0 -19
  169. package/dist/components/wizard/step-sources.js.map +0 -1
  170. package/dist/components/wizard/step-stack.js +0 -18
  171. package/dist/components/wizard/step-stack.js.map +0 -1
  172. package/dist/components/wizard/summary-panel.js +0 -17
  173. package/dist/components/wizard/summary-panel.js.map +0 -1
  174. package/dist/components/wizard/toast.js +0 -9
  175. package/dist/components/wizard/toast.js.map +0 -1
  176. package/dist/components/wizard/wizard-layout.js +0 -22
  177. package/dist/components/wizard/wizard-layout.js.map +0 -1
  178. package/dist/components/wizard/wizard-tabs.js +0 -11
  179. package/dist/components/wizard/wizard-tabs.js.map +0 -1
  180. package/dist/components/wizard/wizard.js +0 -39
  181. package/dist/components/wizard/wizard.js.map +0 -1
  182. package/dist/load-agent-defs-5XMVB3MU.js +0 -14
  183. package/dist/load-agent-defs-5XMVB3MU.js.map +0 -1
  184. package/dist/recompile-project-agents-7PQWYQ6B.js +0 -18
  185. package/dist/recompile-project-agents-7PQWYQ6B.js.map +0 -1
  186. package/dist/source-loader-FRJTCSDL.js.map +0 -1
  187. package/dist/stores/wizard-store.js +0 -24
  188. package/dist/stores/wizard-store.js.map +0 -1
  189. /package/assets/{demo.gif → legacy-wizard.gif} +0 -0
  190. /package/dist/{chunk-JIBCVXXL.js.map → chunk-3G7X2WKI.js.map} +0 -0
  191. /package/dist/{chunk-3LZNY46H.js.map → chunk-BMRUNMPV.js.map} +0 -0
  192. /package/dist/{chunk-27AVGFXH.js.map → chunk-F5EBEATU.js.map} +0 -0
  193. /package/dist/{chunk-GE7NUPMI.js.map → chunk-HED2DAXZ.js.map} +0 -0
  194. /package/dist/{chunk-W6GO2CYX.js.map → chunk-USVBYQSQ.js.map} +0 -0
  195. /package/dist/{chunk-KTLKR4YY.js.map → chunk-WTWMGH2C.js.map} +0 -0
  196. /package/dist/components/{wizard → common}/scroll-affordance.js.map +0 -0
  197. /package/dist/components/{wizard → common}/skill-agent-summary.js.map +0 -0
  198. /package/dist/{components/wizard/category-grid.js.map → load-agent-defs-YMDWBFDP.js.map} +0 -0
  199. /package/dist/{components/wizard/checkbox-grid.js.map → recompile-project-agents-SZ76WNTW.js.map} +0 -0
  200. /package/dist/{components/wizard/domain-selection.js.map → source-loader-C5SQXZXI.js.map} +0 -0
package/assets/demo.tape DELETED
@@ -1,266 +0,0 @@
1
- Output demo.gif
2
-
3
- Set Shell "zsh"
4
- Set FontSize 26
5
- Set FontFamily "Ubuntu Mono"
6
- Set LineHeight 1.3
7
- Set Width 1400
8
- Set Height 1200
9
- Set Padding 40
10
- Set Margin 20
11
- Set BorderRadius 8
12
- Set WindowBar Colorful
13
- Set WindowBarSize 40
14
- Set TypingSpeed 80ms
15
- Set CursorBlink true
16
- Set Framerate 60
17
- # Set Theme { "name": "One Dark", "black": "#21252b", "red": "#e06c75", "green": "#98c379", "yellow": "#c49a2a", "blue": "#61afef", "purple": "#c678dd", "cyan": "#56b6c2", "white": "#abb2bf", "brightBlack": "#767676", "brightRed": "#e06c75", "brightGreen": "#98c379", "brightYellow": "#e5c07b", "brightBlue": "#61afef", "brightPurple": "#c678dd", "brightCyan": "#56b6c2", "brightWhite": "#abb2bf", "background": "#21252b", "foreground": "#abb2bf", "cursor": "#abb2bf", "selection": "#323844" }
18
- Set Theme "OneDark"
19
-
20
-
21
- Sleep 1s
22
- Type "npx agents-inc init"
23
- Enter
24
- Sleep 3500ms
25
-
26
- # -------------------------------
27
- # STEP STACK
28
-
29
- # select react stack
30
- Down
31
- Sleep 150ms
32
- Down
33
- Sleep 150ms
34
- Down
35
- Sleep 150ms
36
- Down
37
- Sleep 900ms
38
- Enter
39
-
40
- # -------------------------------
41
- # STEP DOMAINS
42
- Sleep 900ms
43
-
44
- # select domain
45
- Down
46
-
47
- # select API
48
- Sleep 600ms
49
- Space
50
- Sleep 600ms
51
-
52
- Down
53
- Sleep 150ms
54
- Down
55
- Sleep 150ms
56
- Down
57
- Sleep 150ms
58
- Down
59
- Sleep 150ms
60
- Down
61
-
62
- # select Infrastructure
63
- Sleep 600ms
64
- Space
65
- Sleep 600ms
66
-
67
- Enter
68
-
69
- # -------------------------------
70
- # STEP SKILLS > WEB
71
- Sleep 900ms
72
-
73
- # select Client State Management > zustand
74
- Down
75
- Sleep 150ms
76
- Down
77
- Sleep 150ms
78
- Down
79
- Sleep 150ms
80
- Down
81
-
82
- Sleep 600ms
83
- Right
84
- Sleep 150ms
85
- Right
86
- Sleep 150ms
87
- Right
88
-
89
- Sleep 600ms
90
- Space
91
- Sleep 600ms
92
-
93
- # select Server State / Data Fetching > React Query
94
- Down
95
-
96
- Sleep 600ms
97
- Left
98
-
99
- Sleep 600ms
100
- Space
101
- Sleep 600ms
102
-
103
- # select Forms & Validation > zod
104
- Down
105
- Sleep 600ms
106
-
107
- Left
108
- Sleep 150ms
109
- Left
110
-
111
- Sleep 600ms
112
- Space
113
- Sleep 600ms
114
-
115
- # select API Mocking > MSW
116
- Down
117
- Sleep 150ms
118
- Down
119
- Sleep 150ms
120
- Down
121
- Sleep 150ms
122
- Down
123
-
124
- Sleep 600ms
125
- Space
126
- Sleep 600ms
127
-
128
- # select Error Handling > Error Boundaries
129
- Down
130
-
131
- Sleep 600ms
132
- Space
133
- Sleep 600ms
134
-
135
- # select Web Performance > Frontend Performance
136
- Down
137
- Sleep 150ms
138
- Down
139
- Sleep 150ms
140
- Down
141
- Sleep 150ms
142
- Down
143
- Sleep 150ms
144
- Down
145
- Sleep 150ms
146
- Down
147
- Sleep 150ms
148
- Down
149
- Sleep 150ms
150
- Down
151
- Sleep 150ms
152
- Down
153
-
154
- Sleep 600ms
155
- Space
156
- Sleep 600ms
157
-
158
- # press enter
159
- Enter
160
-
161
-
162
- # -------------------------------
163
- # STEP SKILLS > API -- SCROLL THROUGH
164
- Sleep 900ms
165
-
166
- Down
167
- Sleep 150ms
168
- Down
169
- Sleep 150ms
170
- Down
171
- Sleep 150ms
172
- Down
173
- Sleep 150ms
174
- Down
175
- Sleep 150ms
176
- Down
177
- Sleep 150ms
178
- Down
179
- Sleep 150ms
180
- Down
181
- Sleep 150ms
182
- Down
183
- Sleep 150ms
184
- Down
185
- Sleep 150ms
186
- Down
187
- Sleep 150ms
188
- Down
189
- Sleep 150ms
190
- Down
191
-
192
- Sleep 600ms
193
-
194
- Enter
195
-
196
-
197
- # -------------------------------
198
- # STEP SKILLS > INFRA
199
- Sleep 900ms
200
-
201
- Right
202
-
203
- # select CI/CD > Github Actions
204
- Sleep 600ms
205
- Space
206
- Sleep 600ms
207
-
208
- Down
209
- Sleep 150ms
210
- Down
211
-
212
- # select Configuration > Environment
213
- Sleep 600ms
214
- Space
215
- Sleep 600ms
216
-
217
- Enter
218
-
219
-
220
- # -------------------------------
221
- # STEP SKILLS > INFRA
222
- Sleep 900ms
223
-
224
- Down
225
- Sleep 150ms
226
- Down
227
-
228
- # select Meta Design > Expressive Typescript
229
- Sleep 600ms
230
- Space
231
- Sleep 600ms
232
-
233
- Enter
234
-
235
-
236
- # -------------------------------
237
- # STEP SKILLS > SHARED
238
- Sleep 900ms
239
-
240
- Enter
241
-
242
-
243
- # -------------------------------
244
- # STEP SOURCES
245
- Sleep 900ms
246
-
247
- Enter
248
-
249
-
250
- # -------------------------------
251
- # STEP AGENTS
252
- Sleep 900ms
253
-
254
- Enter
255
-
256
-
257
- # -------------------------------
258
- # STEP CONFIRM
259
- Sleep 900ms
260
-
261
- Enter
262
-
263
-
264
- # -------------------------------
265
- # POST CONFIRM
266
- Sleep 20000ms
@@ -1,292 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- ScrollAffordance
4
- } from "./chunk-7PYXS2QU.js";
5
- import {
6
- useFocusedListItem
7
- } from "./chunk-XQHZPINL.js";
8
- import {
9
- KEY_SPACE
10
- } from "./chunk-WTJ3AY33.js";
11
- import {
12
- useSectionScroll
13
- } from "./chunk-SLBL3WIP.js";
14
- import {
15
- getSkillById
16
- } from "./chunk-NU2K5G54.js";
17
- import {
18
- CLI_COLORS,
19
- INSTALL_MODE_CELL_LABELS,
20
- UI_SYMBOLS
21
- } from "./chunk-AG3ZVM3B.js";
22
-
23
- // src/cli/components/wizard/source-grid.tsx
24
- import { useCallback, useMemo } from "react";
25
- import { Box, Text, useInput } from "ink";
26
- import { jsx, jsxs } from "react/jsx-runtime";
27
- var SKILL_NAME_WIDTH = 26;
28
- var INSTALL_MODE_COL_WIDTH = 18;
29
- var SCOPE_COL_WIDTH = 11;
30
- var SCOPE_ROW_HEADERS = {
31
- global: "Global",
32
- project: "Project"
33
- };
34
- var ROW_MARKER_BLANK = " ";
35
- var SOURCE_GRID_MIN_VIEWPORT_ROWS = 1;
36
- function isRowInert(row) {
37
- return !!row.readOnly || !!row.disabled;
38
- }
39
- function rowStatusMarker(row) {
40
- if (row.readOnly) return `${UI_SYMBOLS.LOCK} `;
41
- if (row.disabled) return `${UI_SYMBOLS.REMOVED} `;
42
- if (row.added) return `${UI_SYMBOLS.ADDED} `;
43
- return ROW_MARKER_BLANK;
44
- }
45
- function rowDiffColor(row) {
46
- if (row.disabled) return CLI_COLORS.ERROR;
47
- if (row.added) return CLI_COLORS.SUCCESS;
48
- return void 0;
49
- }
50
- function rowLabelColor(row) {
51
- return rowDiffColor(row) ?? CLI_COLORS.NEUTRAL;
52
- }
53
- function focusedRowLabelColor(row) {
54
- return rowDiffColor(row) ?? CLI_COLORS.WHITE;
55
- }
56
- var SourceTag = ({ option, isFocused, readOnly, disabled }) => {
57
- if (readOnly || disabled) {
58
- return /* @__PURE__ */ jsx(Box, { width: INSTALL_MODE_COL_WIDTH, children: /* @__PURE__ */ jsxs(
59
- Text,
60
- {
61
- ...disabled && { color: CLI_COLORS.ERROR },
62
- bold: option.selected,
63
- dimColor: !disabled && !option.selected,
64
- children: [
65
- `${UI_SYMBOLS.CHEVRON_SPACER} `,
66
- INSTALL_MODE_CELL_LABELS[option.mode]
67
- ]
68
- }
69
- ) });
70
- }
71
- const textColor = option.selected ? CLI_COLORS.PRIMARY : CLI_COLORS.WHITE;
72
- const isBold = isFocused || option.selected;
73
- const prefix = isFocused ? `${UI_SYMBOLS.CHEVRON} ` : `${UI_SYMBOLS.CHEVRON_SPACER} `;
74
- return /* @__PURE__ */ jsx(Box, { width: INSTALL_MODE_COL_WIDTH, children: /* @__PURE__ */ jsxs(Text, { color: textColor, bold: isBold, dimColor: !option.selected && !isFocused, children: [
75
- prefix,
76
- INSTALL_MODE_CELL_LABELS[option.mode]
77
- ] }) });
78
- };
79
- var SourceSection = ({ row, isFocused, focusedOptionIndex }) => {
80
- const isInert = isRowInert(row);
81
- const effectiveFocused = isInert ? false : isFocused;
82
- const statusMarker = rowStatusMarker(row);
83
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
84
- /* @__PURE__ */ jsx(Box, { width: SKILL_NAME_WIDTH, children: effectiveFocused ? (
85
- // The marker sits INSIDE the highlight, and the marker's own separating space is the only
86
- // one before the name — so the band is the same width on every focused row and the name
87
- // does not shift a column when focus arrives.
88
- /* @__PURE__ */ jsxs(Text, { color: focusedRowLabelColor(row), backgroundColor: CLI_COLORS.LABEL_BG, children: [
89
- statusMarker,
90
- `${getSkillById(row.skillId).displayName} `
91
- ] })
92
- ) : /* @__PURE__ */ jsxs(Text, { color: rowLabelColor(row), dimColor: !!row.readOnly, children: [
93
- statusMarker,
94
- getSkillById(row.skillId).displayName
95
- ] }) }),
96
- /* @__PURE__ */ jsx(Box, { flexDirection: "row", flexWrap: "wrap", children: row.options.map((option, index) => /* @__PURE__ */ jsx(
97
- SourceTag,
98
- {
99
- option,
100
- isFocused: effectiveFocused && index === focusedOptionIndex,
101
- readOnly: row.readOnly,
102
- disabled: row.disabled
103
- },
104
- option.mode
105
- )) })
106
- ] });
107
- };
108
- var ScopeRowHeader = ({
109
- scope,
110
- isGroupStart
111
- }) => /* @__PURE__ */ jsx(Box, { width: SCOPE_COL_WIDTH, children: isGroupStart && /* @__PURE__ */ jsx(Text, { color: CLI_COLORS.WARNING, bold: true, children: SCOPE_ROW_HEADERS[scope] }) });
112
- function firstFocusableRowIndex(rows, startRow) {
113
- const cyclicRowOrder = rows.map((_, offset) => (startRow + offset) % rows.length);
114
- return cyclicRowOrder.find((row) => {
115
- const candidate = rows[row];
116
- return candidate && !isRowInert(candidate);
117
- }) ?? startRow;
118
- }
119
- function lastFocusableRowIndex(rows) {
120
- for (let i = rows.length - 1; i >= 0; i--) {
121
- const candidate = rows[i];
122
- if (candidate && !isRowInert(candidate)) return i;
123
- }
124
- return -1;
125
- }
126
- function groupRowsByScope(rows) {
127
- const indexed = rows.map((row, i) => ({ row, originalIndex: i }));
128
- const globalRows = indexed.filter(({ row }) => row.scope === "global");
129
- const projectRows = indexed.filter(({ row }) => row.scope !== "global");
130
- if (globalRows.length === 0 || projectRows.length === 0) return [];
131
- return [
132
- { scope: "global", rows: globalRows },
133
- { scope: "project", rows: projectRows }
134
- ];
135
- }
136
- var SourceGrid = ({
137
- rows,
138
- availableHeight = 0,
139
- onSelect,
140
- defaultFocusedRow = 0,
141
- defaultFocusedCol = 0,
142
- onFocusChange
143
- }) => {
144
- const getColCount = useCallback((row) => rows[row]?.options.length ?? 0, [rows]);
145
- const skipRow = useCallback(
146
- (row) => {
147
- const candidate = rows[row];
148
- return !!candidate && isRowInert(candidate);
149
- },
150
- [rows]
151
- );
152
- const effectiveDefaultRow = firstFocusableRowIndex(rows, defaultFocusedRow);
153
- const { focusedRow, focusedCol, currentFocus, moveFocus } = useFocusedListItem(
154
- rows.length,
155
- getColCount,
156
- {
157
- wrap: true,
158
- ...onFocusChange !== void 0 && { onChange: onFocusChange },
159
- initialRow: effectiveDefaultRow,
160
- initialCol: defaultFocusedCol,
161
- skipRow
162
- }
163
- );
164
- const {
165
- setSectionRef,
166
- setViewportRef,
167
- setContentRef,
168
- scrollEnabled,
169
- scrollTopPx,
170
- hiddenAbove,
171
- hiddenBelow,
172
- scrollBy
173
- } = useSectionScroll({
174
- sectionCount: rows.length,
175
- focusedIndex: focusedRow,
176
- availableHeight,
177
- minViewportRows: SOURCE_GRID_MIN_VIEWPORT_ROWS
178
- });
179
- const lastFocusableRow = useMemo(() => lastFocusableRowIndex(rows), [rows]);
180
- useInput(
181
- useCallback(
182
- (input, key) => {
183
- const focused = currentFocus();
184
- if (input === KEY_SPACE) {
185
- const currentRow = rows[focused.row];
186
- if (!currentRow || isRowInert(currentRow)) return;
187
- const currentOption = currentRow.options[focused.col];
188
- if (currentOption) {
189
- onSelect(currentRow.skillId, currentOption.mode);
190
- }
191
- return;
192
- }
193
- const noFocusableRow = lastFocusableRow === -1;
194
- const atLastFocusableRow = focused.row === lastFocusableRow;
195
- if (key.leftArrow) {
196
- moveFocus("left");
197
- } else if (key.rightArrow) {
198
- moveFocus("right");
199
- } else if (key.upArrow) {
200
- if (scrollEnabled && noFocusableRow && hiddenAbove > 0) {
201
- scrollBy(-1);
202
- } else {
203
- moveFocus("up");
204
- }
205
- } else if (key.downArrow) {
206
- if (scrollEnabled && (noFocusableRow || atLastFocusableRow) && hiddenBelow > 0) {
207
- scrollBy(1);
208
- } else {
209
- moveFocus("down");
210
- }
211
- }
212
- },
213
- [
214
- rows,
215
- currentFocus,
216
- onSelect,
217
- moveFocus,
218
- scrollEnabled,
219
- lastFocusableRow,
220
- hiddenAbove,
221
- hiddenBelow,
222
- scrollBy
223
- ]
224
- )
225
- );
226
- if (rows.length === 0) {
227
- return /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: /* @__PURE__ */ jsx(Text, { dimColor: true, children: "No skills to display." }) });
228
- }
229
- const noShrink = scrollEnabled ? { flexShrink: 0 } : {};
230
- const scopeGroups = groupRowsByScope(rows);
231
- const sectionElements = scopeGroups.length > 0 ? scopeGroups.map((group) => /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginTop: 1, ...noShrink, children: group.rows.map(({ row, originalIndex }, rowIndexInGroup) => /* @__PURE__ */ jsxs(
232
- Box,
233
- {
234
- flexDirection: "row",
235
- ref: (el) => setSectionRef(originalIndex, el),
236
- ...noShrink,
237
- children: [
238
- /* @__PURE__ */ jsx(ScopeRowHeader, { scope: group.scope, isGroupStart: rowIndexInGroup === 0 }),
239
- /* @__PURE__ */ jsx(
240
- SourceSection,
241
- {
242
- row,
243
- isFocused: originalIndex === focusedRow,
244
- focusedOptionIndex: focusedCol
245
- }
246
- )
247
- ]
248
- },
249
- `${row.skillId}-${row.scope ?? "default"}`
250
- )) }, group.scope)) : rows.map((row, rowIndex) => /* @__PURE__ */ jsx(
251
- Box,
252
- {
253
- ref: (el) => setSectionRef(rowIndex, el),
254
- ...noShrink,
255
- children: /* @__PURE__ */ jsx(
256
- SourceSection,
257
- {
258
- row,
259
- isFocused: rowIndex === focusedRow,
260
- focusedOptionIndex: focusedCol
261
- }
262
- )
263
- },
264
- `${row.skillId}-${row.scope ?? "default"}`
265
- ));
266
- return /* @__PURE__ */ jsxs(
267
- Box,
268
- {
269
- flexDirection: "column",
270
- ...scrollEnabled ? { height: availableHeight, overflow: "hidden" } : { flexGrow: 1 },
271
- children: [
272
- /* @__PURE__ */ jsx(Box, { ref: setViewportRef, flexDirection: "column", overflow: "hidden", flexGrow: 1, children: /* @__PURE__ */ jsx(
273
- Box,
274
- {
275
- ref: setContentRef,
276
- flexDirection: "column",
277
- marginTop: scrollTopPx > 0 ? -scrollTopPx : 0,
278
- ...noShrink,
279
- children: sectionElements
280
- }
281
- ) }),
282
- /* @__PURE__ */ jsx(ScrollAffordance, { hiddenAbove, hiddenBelow })
283
- ]
284
- }
285
- );
286
- };
287
-
288
- export {
289
- isRowInert,
290
- SourceGrid
291
- };
292
- //# sourceMappingURL=chunk-23DNVNFP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cli/components/wizard/source-grid.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { Box, Text, useInput, type Key } from \"ink\";\nimport type { InstallMode, SkillId, SkillScope } from \"../../types/index.js\";\nimport { CLI_COLORS, INSTALL_MODE_CELL_LABELS, UI_SYMBOLS } from \"../../consts.js\";\nimport { getSkillById } from \"../../lib/matrix/matrix-provider.js\";\nimport { useFocusedListItem } from \"../hooks/use-focused-list-item.js\";\nimport { useSectionScroll } from \"../hooks/use-section-scroll.js\";\nimport { KEY_SPACE } from \"./hotkeys.js\";\nimport { ScrollAffordance } from \"./scroll-affordance.js\";\n\n/**\n * Skill-name cell: the 24 columns the name itself gets, plus the fixed 2-column marker cell that\n * shares the box (see `rowStatusMarker`). Widening by exactly the marker width keeps every name\n * that fitted before the marker was reserved fitting still.\n */\nconst SKILL_NAME_WIDTH = 26;\nconst INSTALL_MODE_COL_WIDTH = 18;\n\n/**\n * Scope gutter: the column of `Global` / `Project` row headers down the left of a scope-grouped\n * grid. Present only in the grouped layout — a single-scope grid has nothing to head, and renders\n * flat with no gutter at all. The header row reserves the width but prints no caption in it: the\n * labels below already name the column, so a caption over them would only repeat them.\n */\nconst SCOPE_COL_WIDTH = 11;\n\n/** Row-header label each scope block is headed by. */\nconst SCOPE_ROW_HEADERS: Record<SkillScope, string> = {\n global: \"Global\",\n project: \"Project\",\n};\n\n/** Blank marker cell — the same two columns a `${glyph} ` marker costs, so names never shift. */\nconst ROW_MARKER_BLANK = \" \";\n\n/**\n * Sources always clips-and-signals rather than bleeding, even at the very short viewports the wizard\n * still renders at (the Sources step is squeezed by the tab bar, dropdown card and footer): a single\n * clipped row plus the overflow affordance beats a bled grid. Distinct from the grid views that fall\n * back to a flex layout below SCROLL_VIEWPORT.MIN_VIEWPORT_ROWS.\n */\nconst SOURCE_GRID_MIN_VIEWPORT_ROWS = 1;\n\n/**\n * One cell of a row's install-mode control. There is no `id`: the two cells ARE the choice, and\n * the `SkillConfig.origin` each one writes is the store's to resolve — which is what stops this\n * surface from writing an origin value nothing installs from.\n */\nexport type SourceOption = {\n mode: Exclude<InstallMode, \"mixed\">;\n selected: boolean;\n};\n\nexport type SourceRow = {\n skillId: SkillId;\n /** The row's two install-mode cells, in render order. */\n options: SourceOption[];\n scope?: SkillScope;\n readOnly?: boolean;\n /**\n * Saved skill deselected this session — still shown so the user can see what saving removes,\n * but inert. Distinct from `readOnly`, which means \"locked because it is installed globally\".\n */\n disabled?: boolean;\n /**\n * Skill selected this session but absent from the hydration snapshot. Renders inline in\n * its normal position with the info panel's added marker (`+`) in green, and stays a normal\n * selectable/editable row — unlike `disabled`/`readOnly`, an added row is NOT inert.\n */\n added?: boolean;\n};\n\n/** Rows the user cannot act on: globally locked (`readOnly`) or pending removal (`disabled`). */\nexport function isRowInert(row: SourceRow): boolean {\n return !!row.readOnly || !!row.disabled;\n}\n\n/**\n * Status marker before the skill name. Lock = \"installed globally, not yours to change here\".\n * The removal marker + red colour and the added marker + green colour mirror the info panel's\n * removed/added-diff treatment (DIFF_PREFIX/DIFF_COLOR in skill-agent-summary.tsx) so a\n * pending-removal or added row reads the same on both surfaces. The marker (not the colour) is\n * what carries the meaning in no-color terminals.\n *\n * ALWAYS two columns wide — glyph plus one separating space, or `ROW_MARKER_BLANK` on a row with no\n * status — so every skill name starts in the same column whether or not its row is marked. Same\n * contract as DIFF_PREFIX, which gives even `unchanged` a 2-char prefix. `UI_SYMBOLS.LOCK` is\n * double-width and still renders a locked row one column wider; known and accepted.\n */\nfunction rowStatusMarker(row: SourceRow): string {\n if (row.readOnly) return `${UI_SYMBOLS.LOCK} `;\n if (row.disabled) return `${UI_SYMBOLS.REMOVED} `;\n if (row.added) return `${UI_SYMBOLS.ADDED} `;\n return ROW_MARKER_BLANK;\n}\n\n/**\n * Diff colour for a row's skill name, matching the info panel's palette (DIFF_COLOR in\n * skill-agent-summary.tsx): red = pending removal, green = added. `undefined` means the row carries\n * no diff status, so each caller supplies its own default.\n */\nfunction rowDiffColor(row: SourceRow): string | undefined {\n if (row.disabled) return CLI_COLORS.ERROR;\n if (row.added) return CLI_COLORS.SUCCESS;\n return undefined;\n}\n\n/** Skill-name colour for an unfocused row: its diff colour, or the neutral default. */\nfunction rowLabelColor(row: SourceRow): string {\n return rowDiffColor(row) ?? CLI_COLORS.NEUTRAL;\n}\n\n/**\n * Skill-name colour for the FOCUSED row, which renders on the dark LABEL_BG highlight. A diff row\n * keeps its diff colour — focus is not a reason to lose the added/removed signal. An ordinary row\n * deliberately stays plain WHITE rather than falling through to `rowLabelColor`: NEUTRAL grey on\n * LABEL_BG is the low-contrast pairing, so reusing it here would dim every ordinary focused row to\n * fix rows that have no diff to show in the first place.\n */\nfunction focusedRowLabelColor(row: SourceRow): string {\n return rowDiffColor(row) ?? CLI_COLORS.WHITE;\n}\n\nexport type SourceGridProps = {\n rows: SourceRow[];\n /** Available height in terminal lines for the scrollable viewport. 0 = no constraint. */\n availableHeight?: number;\n onSelect: (skillId: SkillId, mode: Exclude<InstallMode, \"mixed\">) => void;\n /** Optional initial focus row (default: 0). Use with React `key` to reset. */\n defaultFocusedRow?: number;\n /** Optional initial focus col (default: 0). Use with React `key` to reset. */\n defaultFocusedCol?: number;\n /** Optional callback fired whenever the focused position changes */\n onFocusChange?: (row: number, col: number) => void;\n};\n\ntype SourceSectionProps = {\n row: SourceRow;\n isFocused: boolean;\n focusedOptionIndex: number;\n};\n\nconst SourceTag: React.FC<{\n option: SourceOption;\n isFocused: boolean;\n readOnly?: boolean | undefined;\n disabled?: boolean | undefined;\n}> = ({ option, isFocused, readOnly, disabled }) => {\n if (readOnly || disabled) {\n // Inert rows carry selection in the same vocabulary editable ones do — weight, plus brightness\n // on the locked row whose cells are otherwise all dimmed. Never a glyph: a check appears nowhere\n // else in the grid, and on a pending-removal row it would tick the source the row is losing. The\n // prefix slot stays a blank spacer so the source labels line up with every other row's.\n return (\n <Box width={INSTALL_MODE_COL_WIDTH}>\n <Text\n {...(disabled && { color: CLI_COLORS.ERROR })}\n bold={option.selected}\n dimColor={!disabled && !option.selected}\n >\n {`${UI_SYMBOLS.CHEVRON_SPACER} `}\n {INSTALL_MODE_CELL_LABELS[option.mode]}\n </Text>\n </Box>\n );\n }\n\n const textColor = option.selected ? CLI_COLORS.PRIMARY : CLI_COLORS.WHITE;\n const isBold = isFocused || option.selected;\n const prefix = isFocused ? `${UI_SYMBOLS.CHEVRON} ` : `${UI_SYMBOLS.CHEVRON_SPACER} `;\n\n return (\n <Box width={INSTALL_MODE_COL_WIDTH}>\n <Text color={textColor} bold={isBold} dimColor={!option.selected && !isFocused}>\n {prefix}\n {INSTALL_MODE_CELL_LABELS[option.mode]}\n </Text>\n </Box>\n );\n};\n\nconst SourceSection: React.FC<SourceSectionProps> = ({ row, isFocused, focusedOptionIndex }) => {\n const isInert = isRowInert(row);\n const effectiveFocused = isInert ? false : isFocused;\n // Unlike removal, an added row stays a normal editable row — only its marker/colour differ.\n const statusMarker = rowStatusMarker(row);\n\n return (\n <Box flexDirection=\"row\">\n <Box width={SKILL_NAME_WIDTH}>\n {effectiveFocused ? (\n // The marker sits INSIDE the highlight, and the marker's own separating space is the only\n // one before the name — so the band is the same width on every focused row and the name\n // does not shift a column when focus arrives.\n <Text color={focusedRowLabelColor(row)} backgroundColor={CLI_COLORS.LABEL_BG}>\n {statusMarker}\n {`${getSkillById(row.skillId).displayName} `}\n </Text>\n ) : (\n <Text color={rowLabelColor(row)} dimColor={!!row.readOnly}>\n {statusMarker}\n {getSkillById(row.skillId).displayName}\n </Text>\n )}\n </Box>\n\n <Box flexDirection=\"row\" flexWrap=\"wrap\">\n {row.options.map((option, index) => (\n <SourceTag\n key={option.mode}\n option={option}\n isFocused={effectiveFocused && index === focusedOptionIndex}\n readOnly={row.readOnly}\n disabled={row.disabled}\n />\n ))}\n </Box>\n </Box>\n );\n};\n\ntype ScopeGroup = {\n scope: SkillScope;\n rows: { row: SourceRow; originalIndex: number }[];\n};\n\n/**\n * One row's cell in the scope gutter. Only the first row of a block prints the block's label; every\n * other row reserves the same width empty, which is what indents the rest of the block under its\n * header.\n */\nconst ScopeRowHeader: React.FC<{ scope: SkillScope; isGroupStart: boolean }> = ({\n scope,\n isGroupStart,\n}) => (\n <Box width={SCOPE_COL_WIDTH}>\n {isGroupStart && (\n <Text color={CLI_COLORS.WARNING} bold>\n {SCOPE_ROW_HEADERS[scope]}\n </Text>\n )}\n </Box>\n);\n\n/** First focusable row index at or cyclically after `startRow`; `startRow` when every row is inert. */\nfunction firstFocusableRowIndex(rows: SourceRow[], startRow: number): number {\n const cyclicRowOrder = rows.map((_, offset) => (startRow + offset) % rows.length);\n return (\n cyclicRowOrder.find((row) => {\n const candidate = rows[row];\n return candidate && !isRowInert(candidate);\n }) ?? startRow\n );\n}\n\n/** Index of the last focusable (non-inert) row, or -1 when every row is inert. */\nfunction lastFocusableRowIndex(rows: SourceRow[]): number {\n for (let i = rows.length - 1; i >= 0; i--) {\n const candidate = rows[i];\n if (candidate && !isRowInert(candidate)) return i;\n }\n return -1;\n}\n\n/**\n * Groups rows by scope so the two blocks render separated by a blank line, each headed by its scope\n * in the gutter. Returns an empty array when all rows share the same scope: one block needs no\n * header to tell it from another, so that grid renders flat with no gutter at all.\n */\nfunction groupRowsByScope(rows: SourceRow[]): ScopeGroup[] {\n const indexed = rows.map((row, i) => ({ row, originalIndex: i }));\n const globalRows = indexed.filter(({ row }) => row.scope === \"global\");\n const projectRows = indexed.filter(({ row }) => row.scope !== \"global\");\n\n if (globalRows.length === 0 || projectRows.length === 0) return [];\n\n return [\n { scope: \"global\", rows: globalRows },\n { scope: \"project\", rows: projectRows },\n ];\n}\n\nexport const SourceGrid: React.FC<SourceGridProps> = ({\n rows,\n availableHeight = 0,\n onSelect,\n defaultFocusedRow = 0,\n defaultFocusedCol = 0,\n onFocusChange,\n}) => {\n const getColCount = useCallback((row: number): number => rows[row]?.options.length ?? 0, [rows]);\n\n const skipRow = useCallback(\n (row: number): boolean => {\n const candidate = rows[row];\n return !!candidate && isRowInert(candidate);\n },\n [rows],\n );\n\n const effectiveDefaultRow = firstFocusableRowIndex(rows, defaultFocusedRow);\n\n const { focusedRow, focusedCol, currentFocus, moveFocus } = useFocusedListItem(\n rows.length,\n getColCount,\n {\n wrap: true,\n ...(onFocusChange !== undefined && { onChange: onFocusChange }),\n initialRow: effectiveDefaultRow,\n initialCol: defaultFocusedCol,\n skipRow,\n },\n );\n\n const {\n setSectionRef,\n setViewportRef,\n setContentRef,\n scrollEnabled,\n scrollTopPx,\n hiddenAbove,\n hiddenBelow,\n scrollBy,\n } = useSectionScroll({\n sectionCount: rows.length,\n focusedIndex: focusedRow,\n availableHeight,\n minViewportRows: SOURCE_GRID_MIN_VIEWPORT_ROWS,\n });\n\n const lastFocusableRow = useMemo(() => lastFocusableRowIndex(rows), [rows]);\n\n useInput(\n useCallback(\n (input: string, key: Key) => {\n // The focus as it stands now rather than as the last render painted it: a key that\n // follows a move in the same chunk is handled before that move renders.\n const focused = currentFocus();\n\n if (input === KEY_SPACE) {\n const currentRow = rows[focused.row];\n if (!currentRow || isRowInert(currentRow)) return;\n const currentOption = currentRow.options[focused.col];\n if (currentOption) {\n onSelect(currentRow.skillId, currentOption.mode);\n }\n return;\n }\n\n // With no focusable row (every row inert — a run of locked-global rows plus the\n // pending-removal row) there is no focus to move or to anchor overscroll on, so\n // vertical keys drive the viewport directly. Otherwise, overscroll only kicks in\n // once focus sits on the last focusable row (below it are only inert rows).\n const noFocusableRow = lastFocusableRow === -1;\n const atLastFocusableRow = focused.row === lastFocusableRow;\n\n if (key.leftArrow) {\n moveFocus(\"left\");\n } else if (key.rightArrow) {\n moveFocus(\"right\");\n } else if (key.upArrow) {\n if (scrollEnabled && noFocusableRow && hiddenAbove > 0) {\n scrollBy(-1);\n } else {\n moveFocus(\"up\");\n }\n } else if (key.downArrow) {\n // Keep scrolling the viewport to reveal trailing inert rows (e.g. the\n // pending-removal row) instead of wrapping. Focus never lands on them, so the\n // viewport travels past the last focusable row (or scrolls on its own when\n // nothing is focusable).\n if (scrollEnabled && (noFocusableRow || atLastFocusableRow) && hiddenBelow > 0) {\n scrollBy(1);\n } else {\n moveFocus(\"down\");\n }\n }\n },\n [\n rows,\n currentFocus,\n onSelect,\n moveFocus,\n scrollEnabled,\n lastFocusableRow,\n hiddenAbove,\n hiddenBelow,\n scrollBy,\n ],\n ),\n );\n\n if (rows.length === 0) {\n return (\n <Box flexDirection=\"column\">\n <Text dimColor>No skills to display.</Text>\n </Box>\n );\n }\n\n const noShrink = scrollEnabled ? { flexShrink: 0 } : {};\n\n const scopeGroups = groupRowsByScope(rows);\n\n const sectionElements =\n scopeGroups.length > 0\n ? scopeGroups.map((group) => (\n <Box key={group.scope} flexDirection=\"column\" marginTop={1} {...noShrink}>\n {group.rows.map(({ row, originalIndex }, rowIndexInGroup) => (\n <Box\n key={`${row.skillId}-${row.scope ?? \"default\"}`}\n flexDirection=\"row\"\n ref={(el) => setSectionRef(originalIndex, el)}\n {...noShrink}\n >\n <ScopeRowHeader scope={group.scope} isGroupStart={rowIndexInGroup === 0} />\n <SourceSection\n row={row}\n isFocused={originalIndex === focusedRow}\n focusedOptionIndex={focusedCol}\n />\n </Box>\n ))}\n </Box>\n ))\n : rows.map((row, rowIndex) => (\n <Box\n key={`${row.skillId}-${row.scope ?? \"default\"}`}\n ref={(el) => setSectionRef(rowIndex, el)}\n {...noShrink}\n >\n <SourceSection\n row={row}\n isFocused={rowIndex === focusedRow}\n focusedOptionIndex={focusedCol}\n />\n </Box>\n ));\n\n return (\n <Box\n flexDirection=\"column\"\n {...(scrollEnabled\n ? { height: availableHeight, overflow: \"hidden\" as const }\n : { flexGrow: 1 })}\n >\n <Box ref={setViewportRef} flexDirection=\"column\" overflow=\"hidden\" flexGrow={1}>\n <Box\n ref={setContentRef}\n flexDirection=\"column\"\n marginTop={scrollTopPx > 0 ? -scrollTopPx : 0}\n {...noShrink}\n >\n {sectionElements}\n </Box>\n </Box>\n <ScrollAffordance hiddenAbove={hiddenAbove} hiddenBelow={hiddenBelow} />\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,eAAe;AAC5C,SAAS,KAAK,MAAM,gBAA0B;AAyJxC,cACE,YADF;AA3IN,IAAM,mBAAmB;AACzB,IAAM,yBAAyB;AAQ/B,IAAM,kBAAkB;AA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