xtralab 0.15.0 → 0.15.2

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 (237) hide show
  1. package/README.md +65 -30
  2. package/lib/about/icons.d.ts +0 -5
  3. package/lib/about/icons.js +0 -5
  4. package/lib/about/index.d.ts +4 -8
  5. package/lib/about/index.js +6 -17
  6. package/lib/agentSessions.d.ts +9 -29
  7. package/lib/agentSessions.js +2 -7
  8. package/lib/askAgent/editorSelection.d.ts +20 -26
  9. package/lib/askAgent/editorSelection.js +11 -26
  10. package/lib/askAgent/icons.d.ts +2 -3
  11. package/lib/askAgent/icons.js +2 -3
  12. package/lib/askAgent/index.d.ts +4 -26
  13. package/lib/askAgent/index.js +54 -158
  14. package/lib/askAgent/popup.d.ts +12 -16
  15. package/lib/askAgent/popup.js +18 -37
  16. package/lib/askAgent/prompt.d.ts +3 -5
  17. package/lib/askAgent/prompt.js +6 -19
  18. package/lib/askAgent/queue.d.ts +11 -21
  19. package/lib/askAgent/queue.js +9 -19
  20. package/lib/askAgent/queuePanel.d.ts +13 -18
  21. package/lib/askAgent/queuePanel.js +15 -37
  22. package/lib/askAgent/targetPicker.d.ts +2 -9
  23. package/lib/askAgent/targetPicker.js +6 -11
  24. package/lib/askAgent/tokens.d.ts +32 -46
  25. package/lib/askAgent/tokens.js +4 -6
  26. package/lib/commandBar/index.d.ts +4 -13
  27. package/lib/commandBar/index.js +21 -39
  28. package/lib/customPanel/index.js +15 -0
  29. package/lib/editorBreadcrumbs/index.d.ts +3 -6
  30. package/lib/editorBreadcrumbs/index.js +10 -6
  31. package/lib/editorBreadcrumbs/widget.d.ts +17 -4
  32. package/lib/editorBreadcrumbs/widget.js +11 -17
  33. package/lib/editorIndent/index.d.ts +4 -12
  34. package/lib/editorIndent/index.js +8 -23
  35. package/lib/fileBrowser/commands.d.ts +29 -19
  36. package/lib/fileBrowser/commands.js +83 -97
  37. package/lib/fileBrowser/contents.d.ts +3 -0
  38. package/lib/fileBrowser/dragAndDrop.d.ts +17 -4
  39. package/lib/fileBrowser/dragAndDrop.js +2 -7
  40. package/lib/fileBrowser/fileBrowser.d.ts +19 -9
  41. package/lib/fileBrowser/fileBrowser.js +70 -222
  42. package/lib/fileBrowser/gitStatus.d.ts +16 -10
  43. package/lib/fileBrowser/gitStatus.js +31 -30
  44. package/lib/fileBrowser/gitignore.d.ts +4 -17
  45. package/lib/fileBrowser/gitignore.js +4 -25
  46. package/lib/fileBrowser/icons.d.ts +7 -17
  47. package/lib/fileBrowser/icons.js +25 -80
  48. package/lib/fileBrowser/index.js +2 -4
  49. package/lib/fileBrowser/widget.d.ts +141 -48
  50. package/lib/fileBrowser/widget.js +102 -4
  51. package/lib/fileTypeIcons/index.js +0 -10
  52. package/lib/git/api.d.ts +5 -13
  53. package/lib/git/api.js +10 -36
  54. package/lib/git/askRequest.d.ts +4 -8
  55. package/lib/git/askRequest.js +6 -20
  56. package/lib/git/commands.d.ts +45 -5
  57. package/lib/git/commands.js +20 -13
  58. package/lib/git/diffModel.js +4 -0
  59. package/lib/git/diffPreferences.d.ts +90 -0
  60. package/lib/git/diffPreferences.js +107 -0
  61. package/lib/git/diffProvider.js +10 -2
  62. package/lib/git/diffSurface.d.ts +64 -63
  63. package/lib/git/diffSurface.js +72 -213
  64. package/lib/git/diffTheme.d.ts +7 -0
  65. package/lib/git/diffTheme.js +23 -0
  66. package/lib/git/diffWidget.d.ts +70 -14
  67. package/lib/git/diffWidget.js +100 -94
  68. package/lib/git/imageDiff.d.ts +14 -6
  69. package/lib/git/imageDiff.js +19 -75
  70. package/lib/git/index.d.ts +0 -3
  71. package/lib/git/index.js +44 -10
  72. package/lib/git/notebookDiff.d.ts +110 -33
  73. package/lib/git/notebookDiff.js +55 -197
  74. package/lib/git/tokens.d.ts +73 -31
  75. package/lib/git/tokens.js +2 -3
  76. package/lib/highlight/index.d.ts +4 -10
  77. package/lib/highlight/index.js +10 -41
  78. package/lib/index.d.ts +0 -9
  79. package/lib/index.js +0 -9
  80. package/lib/launcher/agents.d.ts +55 -51
  81. package/lib/launcher/agents.js +15 -57
  82. package/lib/launcher/availability.d.ts +3 -9
  83. package/lib/launcher/availability.js +3 -9
  84. package/lib/launcher/commands.d.ts +7 -32
  85. package/lib/launcher/commands.js +14 -45
  86. package/lib/launcher/dashboard.d.ts +19 -24
  87. package/lib/launcher/dashboard.js +21 -67
  88. package/lib/launcher/editorRegistry.d.ts +10 -22
  89. package/lib/launcher/editorRegistry.js +14 -18
  90. package/lib/launcher/editors.d.ts +39 -45
  91. package/lib/launcher/editors.js +8 -34
  92. package/lib/launcher/icons.d.ts +0 -12
  93. package/lib/launcher/icons.js +5 -39
  94. package/lib/launcher/index.js +12 -55
  95. package/lib/launcher/invocation.d.ts +4 -10
  96. package/lib/launcher/invocation.js +7 -22
  97. package/lib/launcher/registry.d.ts +9 -7
  98. package/lib/launcher/registry.js +9 -7
  99. package/lib/launcher/tokens.d.ts +10 -22
  100. package/lib/launcher/tokens.js +5 -8
  101. package/lib/menuBar/index.d.ts +3 -10
  102. package/lib/menuBar/index.js +11 -28
  103. package/lib/menus/index.d.ts +3 -9
  104. package/lib/menus/index.js +14 -30
  105. package/lib/omnibox/files.d.ts +2 -4
  106. package/lib/omnibox/files.js +5 -11
  107. package/lib/omnibox/index.d.ts +4 -14
  108. package/lib/omnibox/index.js +9 -27
  109. package/lib/omnibox/model.d.ts +38 -10
  110. package/lib/omnibox/model.js +15 -33
  111. package/lib/omnibox/recents.d.ts +15 -17
  112. package/lib/omnibox/recents.js +12 -17
  113. package/lib/omnibox/tokens.d.ts +5 -10
  114. package/lib/omnibox/tokens.js +2 -6
  115. package/lib/omnibox/widget.d.ts +11 -7
  116. package/lib/omnibox/widget.js +8 -16
  117. package/lib/searchReplace/index.d.ts +4 -20
  118. package/lib/searchReplace/index.js +7 -27
  119. package/lib/showOutput/index.d.ts +3 -12
  120. package/lib/showOutput/index.js +6 -22
  121. package/lib/sidebar/index.d.ts +4 -7
  122. package/lib/sidebar/index.js +5 -12
  123. package/lib/terminalNotifications/index.d.ts +4 -10
  124. package/lib/terminalNotifications/index.js +6 -20
  125. package/lib/terminals/agentTerminals.d.ts +12 -5
  126. package/lib/terminals/agentTerminals.js +25 -44
  127. package/lib/terminals/detection.d.ts +4 -8
  128. package/lib/terminals/detection.js +4 -8
  129. package/lib/terminals/index.d.ts +0 -35
  130. package/lib/terminals/index.js +12 -101
  131. package/lib/terminals/model.d.ts +64 -139
  132. package/lib/terminals/model.js +80 -220
  133. package/lib/terminals/tokens.d.ts +11 -22
  134. package/lib/terminals/tokens.js +2 -2
  135. package/lib/terminals/widget.d.ts +43 -13
  136. package/lib/terminals/widget.js +33 -18
  137. package/lib/topBar/icons.d.ts +3 -8
  138. package/lib/topBar/icons.js +3 -8
  139. package/lib/topBar/index.d.ts +4 -11
  140. package/lib/topBar/index.js +10 -38
  141. package/lib/walkthrough/index.d.ts +4 -9
  142. package/lib/walkthrough/index.js +6 -20
  143. package/lib/walkthrough/panel.d.ts +40 -9
  144. package/lib/walkthrough/panel.js +4 -10
  145. package/package.json +5 -3
  146. package/schema/git-diff-preferences.json +42 -0
  147. package/src/about/icons.ts +0 -5
  148. package/src/about/index.tsx +6 -17
  149. package/src/agentSessions.ts +9 -29
  150. package/src/askAgent/editorSelection.ts +22 -29
  151. package/src/askAgent/icons.ts +2 -3
  152. package/src/askAgent/index.ts +54 -158
  153. package/src/askAgent/popup.tsx +23 -45
  154. package/src/askAgent/prompt.ts +6 -19
  155. package/src/askAgent/queue.ts +13 -24
  156. package/src/askAgent/queuePanel.tsx +21 -46
  157. package/src/askAgent/targetPicker.tsx +5 -15
  158. package/src/askAgent/tokens.ts +32 -46
  159. package/src/commandBar/index.ts +24 -39
  160. package/src/customPanel/index.ts +15 -0
  161. package/src/editorBreadcrumbs/index.ts +10 -6
  162. package/src/editorBreadcrumbs/widget.ts +23 -17
  163. package/src/editorIndent/index.ts +17 -23
  164. package/src/fileBrowser/commands.ts +119 -96
  165. package/src/fileBrowser/contents.ts +3 -0
  166. package/src/fileBrowser/dragAndDrop.ts +17 -7
  167. package/src/fileBrowser/fileBrowser.tsx +86 -230
  168. package/src/fileBrowser/gitStatus.ts +36 -33
  169. package/src/fileBrowser/gitignore.ts +4 -25
  170. package/src/fileBrowser/icons.ts +25 -80
  171. package/src/fileBrowser/index.ts +2 -4
  172. package/src/fileBrowser/widget.tsx +171 -50
  173. package/src/fileTypeIcons/index.ts +0 -10
  174. package/src/git/api.ts +10 -36
  175. package/src/git/askRequest.ts +6 -20
  176. package/src/git/commands.ts +83 -11
  177. package/src/git/diffModel.ts +25 -0
  178. package/src/git/diffPreferences.ts +192 -0
  179. package/src/git/diffProvider.tsx +11 -2
  180. package/src/git/diffSurface.tsx +165 -286
  181. package/src/git/diffTheme.ts +24 -0
  182. package/src/git/diffWidget.tsx +194 -134
  183. package/src/git/imageDiff.tsx +56 -84
  184. package/src/git/index.ts +54 -10
  185. package/src/git/notebookDiff.tsx +214 -240
  186. package/src/git/tokens.ts +73 -31
  187. package/src/highlight/index.ts +10 -41
  188. package/src/index.ts +0 -9
  189. package/src/launcher/agents.ts +64 -95
  190. package/src/launcher/availability.ts +3 -9
  191. package/src/launcher/commands.ts +14 -51
  192. package/src/launcher/dashboard.tsx +49 -88
  193. package/src/launcher/editorRegistry.ts +21 -29
  194. package/src/launcher/editors.ts +39 -58
  195. package/src/launcher/icons.ts +5 -39
  196. package/src/launcher/index.ts +12 -55
  197. package/src/launcher/invocation.ts +7 -22
  198. package/src/launcher/registry.ts +9 -7
  199. package/src/launcher/tokens.ts +10 -22
  200. package/src/menuBar/index.ts +11 -28
  201. package/src/menus/index.ts +14 -30
  202. package/src/omnibox/files.ts +10 -14
  203. package/src/omnibox/index.ts +9 -27
  204. package/src/omnibox/model.ts +50 -38
  205. package/src/omnibox/recents.ts +17 -22
  206. package/src/omnibox/tokens.ts +5 -10
  207. package/src/omnibox/widget.tsx +14 -19
  208. package/src/searchReplace/index.ts +7 -27
  209. package/src/showOutput/index.ts +6 -22
  210. package/src/sidebar/index.ts +20 -12
  211. package/src/terminalNotifications/index.ts +42 -25
  212. package/src/terminals/agentTerminals.ts +25 -49
  213. package/src/terminals/detection.ts +4 -8
  214. package/src/terminals/index.ts +12 -101
  215. package/src/terminals/model.ts +130 -246
  216. package/src/terminals/tokens.ts +11 -22
  217. package/src/terminals/widget.tsx +48 -31
  218. package/src/topBar/icons.ts +3 -8
  219. package/src/topBar/index.ts +21 -44
  220. package/src/walkthrough/index.ts +6 -20
  221. package/src/walkthrough/panel.ts +40 -10
  222. package/style/about.css +2 -7
  223. package/style/askAgent.css +8 -40
  224. package/style/base.css +9 -45
  225. package/style/chrome.css +108 -308
  226. package/style/commandBar.css +4 -20
  227. package/style/customPanel.css +1 -4
  228. package/style/git.css +26 -186
  229. package/style/highlight.css +1 -3
  230. package/style/launcher.css +6 -70
  231. package/style/omnibox.css +2 -14
  232. package/style/showOutput.css +0 -6
  233. package/style/sidebar.css +29 -9
  234. package/style/tabs.css +5 -13
  235. package/style/terminals.css +6 -53
  236. package/style/topBar.css +2 -22
  237. package/style/walkthrough.css +0 -8
@@ -1,10 +1,7 @@
1
1
  /*
2
- * Ask-agent surfaces (xtralab:ask-agent): the floating "Ask agent" pill that
3
- * follows a code selection, the prompt popup it (or the diff gutter "+"
4
- * button) opens, and the right-sidebar queue panel that reviews queued
5
- * prompts. The pill and popup are attached to `document.body`, outside the
6
- * shell, and carry `jp-ThemedContainer` so theme variables resolve; the
7
- * queue panel lives inside the shell.
2
+ * Ask-agent surfaces (xtralab:ask-agent): selection pill, prompt popup and
3
+ * right-sidebar queue panel. The pill and popup attach to `document.body`
4
+ * and carry `jp-ThemedContainer` so theme variables resolve.
8
5
  */
9
6
 
10
7
  .jp-xtralab-AskAgent-pill {
@@ -97,10 +94,6 @@
97
94
  color: var(--jp-ui-font-color2);
98
95
  }
99
96
 
100
- /*
101
- * Target chips: "New terminal" plus one chip per terminal with a running
102
- * agent. Present only while at least one agent terminal is running.
103
- */
104
97
  .jp-xtralab-AskAgent-targets {
105
98
  display: flex;
106
99
  flex-wrap: wrap;
@@ -213,14 +206,8 @@
213
206
  height: 16px;
214
207
  }
215
208
 
216
- /*
217
- * `margin-left: auto` keeps the action buttons pinned right even when the
218
- * agent radiogroup is absent (an existing session is the selected target,
219
- * so the agent choice is implied and the row is not rendered). The
220
- * "Send to %1" label embeds the session title, which the running agent may
221
- * grow long via its xterm title escape, so the buttons shrink and ellipsize
222
- * rather than overflowing the popup.
223
- */
209
+ /* `margin-left: auto` pins the actions right when the agent radiogroup is absent;
210
+ * the xterm-growable session title makes the buttons shrink and ellipsize. */
224
211
  .jp-xtralab-AskAgent-actions {
225
212
  display: flex;
226
213
  flex: 0 1 auto;
@@ -256,7 +243,6 @@
256
243
  background: var(--jp-layout-color2);
257
244
  }
258
245
 
259
- /* The popup's send button and the panel's batch-send button match. */
260
246
  .jp-xtralab-AskAgent-submit,
261
247
  .jp-xtralab-AskAgentQueue-send {
262
248
  flex: 0 1 auto;
@@ -279,8 +265,7 @@
279
265
  opacity: 0.5;
280
266
  }
281
267
 
282
- /* Inset panel-background ring so keyboard focus stays visible on the
283
- * brand fill. */
268
+ /* Inset panel-background ring keeps keyboard focus visible on the brand fill. */
284
269
  .jp-xtralab-AskAgent-submit:focus-visible,
285
270
  .jp-xtralab-AskAgentQueue-send:focus-visible {
286
271
  outline: var(--jp-border-width) solid var(--jp-layout-color1);
@@ -292,11 +277,7 @@
292
277
  background: var(--jp-brand-color0);
293
278
  }
294
279
 
295
- /*
296
- * Queue panel (right side area): the queued prompts awaiting a batch send,
297
- * each with a jump-to-code context line, a snippet preview and an editable
298
- * instruction, above a footer that picks the target and sends everything.
299
- */
280
+ /* Queue panel (right side area): queued prompts awaiting a batch send. */
300
281
  .jp-xtralab-AskAgentQueue {
301
282
  display: flex;
302
283
  background: var(--jp-layout-color1);
@@ -317,9 +298,6 @@
317
298
  color: var(--jp-ui-font-color2);
318
299
  }
319
300
 
320
- /* `min-height: 0` lets the list shrink below its content height (a flex
321
- * item's default min-height is its content), so a long queue scrolls here
322
- * instead of pushing the footer out of the panel. */
323
301
  .jp-xtralab-AskAgentQueue-list {
324
302
  display: flex;
325
303
  flex: 1 1 auto;
@@ -409,8 +387,6 @@
409
387
  height: 14px;
410
388
  }
411
389
 
412
- /* Clamped preview of the selected code; the context line above jumps to
413
- * the real thing. */
414
390
  .jp-xtralab-AskAgentQueue-snippet {
415
391
  display: -webkit-box;
416
392
  margin: 0;
@@ -448,14 +424,10 @@
448
424
  color: var(--jp-ui-font-color3);
449
425
  }
450
426
 
451
- /* An emptied-out instruction blocks the batch send; make the gap visible. */
452
427
  .jp-xtralab-AskAgentQueue-instruction[aria-invalid='true'] {
453
428
  border-color: var(--jp-warn-color1);
454
429
  }
455
430
 
456
- /* Each prompt's own destination — the agent icon plus a select whose
457
- * closed text names the action ("Terminal 2 · Claude", "New terminal ·
458
- * Codex"), so a mixed queue can be scanned without opening dropdowns. */
459
431
  .jp-xtralab-AskAgentQueue-itemTargetRow {
460
432
  display: flex;
461
433
  gap: 6px;
@@ -474,8 +446,6 @@
474
446
  height: 16px;
475
447
  }
476
448
 
477
- /* The select is core's jp-HTMLSelect (the notebook-toolbar dropdown);
478
- * these rules only make it fill the row and ellipsize long labels. */
479
449
  .jp-xtralab-AskAgentQueue-itemTarget {
480
450
  flex: 1 1 auto;
481
451
  min-width: 0;
@@ -488,9 +458,7 @@
488
458
  white-space: nowrap;
489
459
  }
490
460
 
491
- /* A destination that has gone away (closed terminal, removed agent)
492
- * blocks the send; make the gap visible despite the borderless default.
493
- * The doubled-up class outweighs core's `.jp-HTMLSelect.jp-DefaultStyle
461
+ /* The doubled-up class outweighs core's `.jp-HTMLSelect.jp-DefaultStyle
494
462
  * select` border reset regardless of stylesheet order. */
495
463
  .jp-xtralab-AskAgentQueue-itemTarget.jp-HTMLSelect select[aria-invalid='true'] {
496
464
  border: var(--jp-border-width) solid var(--jp-warn-color1);
package/style/base.css CHANGED
@@ -1,12 +1,4 @@
1
- /*
2
- See the JupyterLab Developer Guide for useful CSS Patterns:
3
-
4
- https://jupyterlab.readthedocs.io/en/stable/developer/css.html
5
- */
6
-
7
- /*
8
- * Rules live on the section class below, so they travel when the tree moves.
9
- */
1
+ /* Rules live on the section class below, so they travel when the tree moves. */
10
2
  .jp-xtralab-FileBrowserPanel {
11
3
  display: flex;
12
4
  flex-direction: column;
@@ -23,12 +15,8 @@
23
15
  overflow: hidden;
24
16
  background-color: var(--jp-layout-color1);
25
17
 
26
- /*
27
- * Map @pierre/trees CSS variables to the active JupyterLab theme. The
28
- * `*-override` variants take precedence over the library's defaults, so
29
- * these values track the JupyterLab theme automatically — no JS needed
30
- * when the theme switches.
31
- */
18
+ /* Map @pierre/trees variables to the JupyterLab theme; the `*-override`
19
+ variants beat the library defaults, so theme switches need no JS. */
32
20
  --trees-bg-override: var(--jp-layout-color1);
33
21
  --trees-bg-muted-override: var(--jp-layout-color2);
34
22
  --trees-fg-override: var(--jp-ui-font-color1);
@@ -47,32 +35,16 @@
47
35
  --trees-font-family-override: var(--jp-ui-font-family);
48
36
  --trees-font-size-override: var(--jp-ui-font-size1);
49
37
 
50
- /*
51
- * Push the search box, the scroll wrapper, and every row inside the
52
- * tree away from the sidebar edge. `--trees-padding-inline` is the
53
- * outer gutter the @pierre/trees host uses for the search box and the
54
- * scroll container, and the row strip sits inside that gutter — so
55
- * matching the 12px the JupyterLab toolbar uses on its sides keeps
56
- * the toolbar buttons, the search bar, and the row hover/selection
57
- * highlights vertically aligned. Row content padding stays at the
58
- * default 4px so the icon → text rhythm doesn't change.
59
- */
38
+ /* 12px matches the JupyterLab toolbar's side padding, so the search box,
39
+ row highlights and toolbar buttons align; row content keeps the 4px default. */
60
40
  --trees-padding-inline-override: 12px;
61
41
  --trees-item-padding-x-override: 4px;
62
42
 
63
- /* Must carry a length unit. The library subtracts this from
64
- `--trees-padding-inline` inside a `calc()`; a unitless `0` makes the
65
- subtraction type-invalid, the whole padding-inline rule drops out,
66
- and the rows snap back to the sidebar edge. */
43
+ /* Must carry a unit: the library subtracts this inside a `calc()`, and a
44
+ unitless `0` makes the whole padding-inline rule drop out. */
67
45
  --trees-item-margin-x-override: 0px;
68
46
  }
69
47
 
70
- /*
71
- * Match the spacing the default file browser uses around its top toolbar
72
- * (8px above, 12px on each side, flush with the content below). Without
73
- * this, the toolbar inherits jp-Toolbar's default border + padding which
74
- * looks heavier than the rest of the JupyterLab sidebar.
75
- */
76
48
  .jp-xtralab-FileBrowser-toolbar.jp-Toolbar {
77
49
  flex: 0 0 auto;
78
50
  height: auto;
@@ -97,12 +69,8 @@
97
69
  width: 28px;
98
70
  }
99
71
 
100
- /*
101
- * Promote the "new launcher" button to the same blue, wider call-to-action
102
- * the default file browser uses for `launcher:create`. The selectors mirror
103
- * the rules in `@jupyterlab/launcher-extension/style/base.css`, but target
104
- * our own command id and toolbar wrapper class.
105
- */
72
+ /* Same blue call-to-action the default file browser gives `launcher:create`;
73
+ * selectors mirror `@jupyterlab/launcher-extension/style/base.css`. */
106
74
  .jp-xtralab-FileBrowser-toolbar
107
75
  > .jp-Toolbar-item
108
76
  .jp-ToolbarButtonComponent[data-command='xtralab:new-launcher'] {
@@ -146,10 +114,6 @@
146
114
  min-height: 0;
147
115
  }
148
116
 
149
- /*
150
- * In an accordion the toolbar shares the title row, so it must be able to
151
- * shrink.
152
- */
153
117
  .jp-AccordionPanel-title > .jp-xtralab-FileBrowser-toolbar {
154
118
  flex: 0 1 auto;
155
119
  min-width: 0;