xtralab 0.14.1 → 0.15.1

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 (236) hide show
  1. package/README.md +10 -0
  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.d.ts +7 -0
  29. package/lib/customPanel/index.js +89 -0
  30. package/lib/editorBreadcrumbs/index.d.ts +3 -6
  31. package/lib/editorBreadcrumbs/index.js +10 -6
  32. package/lib/editorBreadcrumbs/widget.d.ts +17 -4
  33. package/lib/editorBreadcrumbs/widget.js +11 -17
  34. package/lib/editorIndent/index.d.ts +4 -12
  35. package/lib/editorIndent/index.js +8 -23
  36. package/lib/fileBrowser/commands.d.ts +28 -19
  37. package/lib/fileBrowser/commands.js +51 -98
  38. package/lib/fileBrowser/contents.d.ts +14 -0
  39. package/lib/fileBrowser/contents.js +28 -0
  40. package/lib/fileBrowser/dragAndDrop.d.ts +79 -0
  41. package/lib/fileBrowser/dragAndDrop.js +110 -0
  42. package/lib/fileBrowser/fileBrowser.d.ts +21 -9
  43. package/lib/fileBrowser/fileBrowser.js +211 -405
  44. package/lib/fileBrowser/gitStatus.d.ts +4 -9
  45. package/lib/fileBrowser/gitStatus.js +7 -17
  46. package/lib/fileBrowser/gitignore.d.ts +4 -17
  47. package/lib/fileBrowser/gitignore.js +4 -25
  48. package/lib/fileBrowser/icons.d.ts +7 -17
  49. package/lib/fileBrowser/icons.js +25 -80
  50. package/lib/fileBrowser/index.js +41 -10
  51. package/lib/fileBrowser/widget.d.ts +170 -53
  52. package/lib/fileBrowser/widget.js +242 -18
  53. package/lib/fileTypeIcons/index.js +0 -10
  54. package/lib/git/api.d.ts +5 -13
  55. package/lib/git/api.js +10 -36
  56. package/lib/git/askRequest.d.ts +4 -8
  57. package/lib/git/askRequest.js +6 -20
  58. package/lib/git/commands.d.ts +40 -5
  59. package/lib/git/commands.js +16 -10
  60. package/lib/git/diffModel.js +4 -0
  61. package/lib/git/diffSurface.d.ts +41 -55
  62. package/lib/git/diffSurface.js +42 -117
  63. package/lib/git/diffWidget.d.ts +81 -2
  64. package/lib/git/diffWidget.js +62 -12
  65. package/lib/git/imageDiff.d.ts +5 -6
  66. package/lib/git/imageDiff.js +18 -48
  67. package/lib/git/index.d.ts +0 -3
  68. package/lib/git/index.js +3 -8
  69. package/lib/git/notebookDiff.d.ts +110 -33
  70. package/lib/git/notebookDiff.js +52 -195
  71. package/lib/git/tokens.d.ts +73 -31
  72. package/lib/git/tokens.js +2 -3
  73. package/lib/highlight/index.d.ts +4 -10
  74. package/lib/highlight/index.js +10 -41
  75. package/lib/index.d.ts +0 -9
  76. package/lib/index.js +2 -9
  77. package/lib/launcher/agents.d.ts +55 -51
  78. package/lib/launcher/agents.js +25 -54
  79. package/lib/launcher/availability.d.ts +3 -9
  80. package/lib/launcher/availability.js +3 -9
  81. package/lib/launcher/commands.d.ts +7 -32
  82. package/lib/launcher/commands.js +14 -45
  83. package/lib/launcher/dashboard.d.ts +19 -24
  84. package/lib/launcher/dashboard.js +21 -67
  85. package/lib/launcher/editorRegistry.d.ts +10 -22
  86. package/lib/launcher/editorRegistry.js +14 -18
  87. package/lib/launcher/editors.d.ts +39 -45
  88. package/lib/launcher/editors.js +8 -34
  89. package/lib/launcher/icons.d.ts +0 -12
  90. package/lib/launcher/icons.js +14 -37
  91. package/lib/launcher/index.js +12 -55
  92. package/lib/launcher/invocation.d.ts +4 -10
  93. package/lib/launcher/invocation.js +7 -22
  94. package/lib/launcher/registry.d.ts +9 -7
  95. package/lib/launcher/registry.js +9 -7
  96. package/lib/launcher/schemaDefaults.d.ts +2 -9
  97. package/lib/launcher/schemaDefaults.js +37 -13
  98. package/lib/launcher/tokens.d.ts +10 -22
  99. package/lib/launcher/tokens.js +5 -8
  100. package/lib/menuBar/index.d.ts +3 -10
  101. package/lib/menuBar/index.js +11 -28
  102. package/lib/menus/index.d.ts +3 -9
  103. package/lib/menus/index.js +14 -30
  104. package/lib/omnibox/files.d.ts +2 -4
  105. package/lib/omnibox/files.js +5 -11
  106. package/lib/omnibox/index.d.ts +4 -14
  107. package/lib/omnibox/index.js +9 -27
  108. package/lib/omnibox/model.d.ts +38 -10
  109. package/lib/omnibox/model.js +15 -33
  110. package/lib/omnibox/recents.d.ts +15 -17
  111. package/lib/omnibox/recents.js +12 -17
  112. package/lib/omnibox/tokens.d.ts +5 -10
  113. package/lib/omnibox/tokens.js +2 -6
  114. package/lib/omnibox/widget.d.ts +11 -7
  115. package/lib/omnibox/widget.js +8 -16
  116. package/lib/searchReplace/index.d.ts +4 -20
  117. package/lib/searchReplace/index.js +7 -27
  118. package/lib/showOutput/index.d.ts +3 -12
  119. package/lib/showOutput/index.js +6 -22
  120. package/lib/sidebar/index.d.ts +4 -13
  121. package/lib/sidebar/index.js +73 -46
  122. package/lib/terminalNotifications/index.d.ts +4 -10
  123. package/lib/terminalNotifications/index.js +6 -20
  124. package/lib/terminals/agentTerminals.d.ts +12 -5
  125. package/lib/terminals/agentTerminals.js +25 -44
  126. package/lib/terminals/detection.d.ts +4 -8
  127. package/lib/terminals/detection.js +4 -8
  128. package/lib/terminals/index.d.ts +0 -33
  129. package/lib/terminals/index.js +24 -102
  130. package/lib/terminals/model.d.ts +64 -139
  131. package/lib/terminals/model.js +80 -220
  132. package/lib/terminals/tokens.d.ts +11 -22
  133. package/lib/terminals/tokens.js +2 -2
  134. package/lib/terminals/widget.d.ts +72 -38
  135. package/lib/terminals/widget.js +173 -73
  136. package/lib/topBar/icons.d.ts +3 -8
  137. package/lib/topBar/icons.js +3 -8
  138. package/lib/topBar/index.d.ts +4 -11
  139. package/lib/topBar/index.js +10 -38
  140. package/lib/walkthrough/index.d.ts +4 -9
  141. package/lib/walkthrough/index.js +6 -20
  142. package/lib/walkthrough/panel.d.ts +40 -9
  143. package/lib/walkthrough/panel.js +4 -10
  144. package/package.json +2 -2
  145. package/schema/launcher.json +2 -2
  146. package/schema/sidebar.json +47 -7
  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 +119 -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 +70 -98
  165. package/src/fileBrowser/contents.ts +33 -0
  166. package/src/fileBrowser/dragAndDrop.ts +188 -0
  167. package/src/fileBrowser/fileBrowser.tsx +259 -440
  168. package/src/fileBrowser/gitStatus.ts +7 -17
  169. package/src/fileBrowser/gitignore.ts +4 -25
  170. package/src/fileBrowser/icons.ts +25 -80
  171. package/src/fileBrowser/index.ts +43 -10
  172. package/src/fileBrowser/widget.tsx +344 -64
  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 +70 -10
  177. package/src/git/diffModel.ts +25 -0
  178. package/src/git/diffSurface.tsx +71 -159
  179. package/src/git/diffWidget.tsx +104 -14
  180. package/src/git/imageDiff.tsx +45 -51
  181. package/src/git/index.ts +3 -8
  182. package/src/git/notebookDiff.tsx +211 -238
  183. package/src/git/tokens.ts +73 -31
  184. package/src/highlight/index.ts +10 -41
  185. package/src/index.ts +2 -9
  186. package/src/launcher/agents.ts +74 -92
  187. package/src/launcher/availability.ts +3 -9
  188. package/src/launcher/commands.ts +14 -51
  189. package/src/launcher/dashboard.tsx +49 -88
  190. package/src/launcher/editorRegistry.ts +21 -29
  191. package/src/launcher/editors.ts +39 -58
  192. package/src/launcher/icons.ts +15 -37
  193. package/src/launcher/index.ts +12 -55
  194. package/src/launcher/invocation.ts +7 -22
  195. package/src/launcher/registry.ts +9 -7
  196. package/src/launcher/schemaDefaults.ts +43 -13
  197. package/src/launcher/tokens.ts +10 -22
  198. package/src/menuBar/index.ts +11 -28
  199. package/src/menus/index.ts +14 -30
  200. package/src/omnibox/files.ts +10 -14
  201. package/src/omnibox/index.ts +9 -27
  202. package/src/omnibox/model.ts +50 -38
  203. package/src/omnibox/recents.ts +17 -22
  204. package/src/omnibox/tokens.ts +5 -10
  205. package/src/omnibox/widget.tsx +14 -19
  206. package/src/searchReplace/index.ts +7 -27
  207. package/src/showOutput/index.ts +6 -22
  208. package/src/sidebar/index.ts +103 -52
  209. package/src/terminalNotifications/index.ts +42 -25
  210. package/src/terminals/agentTerminals.ts +25 -49
  211. package/src/terminals/detection.ts +4 -8
  212. package/src/terminals/index.ts +31 -102
  213. package/src/terminals/model.ts +130 -246
  214. package/src/terminals/tokens.ts +11 -22
  215. package/src/terminals/widget.tsx +229 -113
  216. package/src/topBar/icons.ts +3 -8
  217. package/src/topBar/index.ts +21 -44
  218. package/src/walkthrough/index.ts +6 -20
  219. package/src/walkthrough/panel.ts +40 -10
  220. package/style/about.css +2 -7
  221. package/style/askAgent.css +8 -40
  222. package/style/base.css +25 -73
  223. package/style/chrome.css +108 -308
  224. package/style/commandBar.css +4 -20
  225. package/style/customPanel.css +6 -0
  226. package/style/git.css +22 -184
  227. package/style/highlight.css +1 -3
  228. package/style/index.js +1 -0
  229. package/style/launcher.css +6 -70
  230. package/style/omnibox.css +2 -14
  231. package/style/showOutput.css +0 -6
  232. package/style/sidebar.css +29 -9
  233. package/style/tabs.css +5 -13
  234. package/style/terminals.css +18 -123
  235. package/style/topBar.css +2 -22
  236. package/style/walkthrough.css +0 -8
@@ -14,18 +14,12 @@ import { IWalkthroughMedia, IWalkthroughStep, WalkthroughPanel } from './panel';
14
14
 
15
15
  const PLUGIN_ID = 'xtralab:walkthrough';
16
16
 
17
- /**
18
- * Append a step to the read-only walkthrough panel.
19
- */
20
17
  const WALKTHROUGH_COMMAND = 'xtralab:walkthrough';
21
18
 
22
19
  const HIGHLIGHT_LINES_COMMAND = 'xtralab:highlight-lines';
23
20
 
24
21
  const PANEL_ID = 'xtralab-walkthrough';
25
22
 
26
- /**
27
- * Pull a `{ mimeType, data }` media object out of a JSON command argument.
28
- */
29
23
  function readMedia(value: unknown): IWalkthroughMedia | undefined {
30
24
  if (
31
25
  value &&
@@ -54,15 +48,10 @@ function toLine(value: unknown): number | undefined {
54
48
  }
55
49
 
56
50
  /**
57
- * Contribute `xtralab:walkthrough`: build a persistent, read-only walkthrough
58
- * in the right side area instead of narrating only in the agent's chat.
59
- *
60
- * Each call appends a step (Markdown prose, an optional embedded visual, and an
61
- * optional code reference). When a step names a file, the editor follows along
62
- * (opening it full-width in the main area, no split) and its lines are
63
- * highlighted; the step also keeps a button so the user can jump back to it
64
- * later. The panel accumulates the whole tour beside the code, so the user can
65
- * read at their own pace rather than chasing the chat.
51
+ * Contributes `xtralab:walkthrough`: each call appends a step (Markdown prose,
52
+ * optional visual, optional code reference) to a persistent read-only panel in
53
+ * the right side area, so the tour accumulates beside the code instead of
54
+ * scrolling away in the agent's chat.
66
55
  */
67
56
  const plugin: JupyterFrontEndPlugin<void> = {
68
57
  id: PLUGIN_ID,
@@ -89,9 +78,8 @@ const plugin: JupyterFrontEndPlugin<void> = {
89
78
  panel.title.icon = tocIcon;
90
79
  panel.title.label = trans.__('Walkthrough');
91
80
  panel.title.caption = trans.__('Walkthrough');
92
- // Closable so it gets a close button if the user drags it out of the
93
- // side area into the main document area. Closing disposes it; the next
94
- // xtralab:walkthrough call recreates it back in the side area.
81
+ // Closable so a drag into the main area gets a close button; closing
82
+ // disposes, and the next call recreates the panel in the side area.
95
83
  panel.title.closable = true;
96
84
  labShell.add(panel, 'right', { rank: 1000, type: 'Walkthrough' });
97
85
  const created = panel;
@@ -188,11 +176,9 @@ const plugin: JupyterFrontEndPlugin<void> = {
188
176
  );
189
177
  }
190
178
 
191
- // Reveal the panel, then render the step into it.
192
179
  labShell.activateById(current.id);
193
180
  await current.addStep(step);
194
181
 
195
- // Let the editor follow the newest step.
196
182
  if (path && args['reveal'] !== false) {
197
183
  await commands.execute(HIGHLIGHT_LINES_COMMAND, {
198
184
  path,
@@ -15,7 +15,13 @@ const HIGHLIGHT_LINES_COMMAND = 'xtralab:highlight-lines';
15
15
  * A rich visual embedded in a step (rendered through the rendermime registry).
16
16
  */
17
17
  export interface IWalkthroughMedia {
18
+ /**
19
+ * The MIME type of the media payload.
20
+ */
18
21
  mimeType: string;
22
+ /**
23
+ * The payload handed to the renderer for the MIME type.
24
+ */
19
25
  data: ReadonlyPartialJSONValue;
20
26
  }
21
27
 
@@ -23,30 +29,56 @@ export interface IWalkthroughMedia {
23
29
  * One step of a walkthrough. Every field is optional, but a step needs at least one.
24
30
  */
25
31
  export interface IWalkthroughStep {
32
+ /**
33
+ * A heading rendered above the step content.
34
+ */
26
35
  title?: string;
36
+ /**
37
+ * The body of the step, rendered as Markdown.
38
+ */
27
39
  body?: string;
40
+ /**
41
+ * A rich visual rendered after the body.
42
+ */
28
43
  media?: IWalkthroughMedia;
44
+ /**
45
+ * The file the step points at; when set, the step renders a jump link.
46
+ */
29
47
  path?: string;
48
+ /**
49
+ * The first line to highlight when the jump link is followed.
50
+ */
30
51
  line?: number;
52
+ /**
53
+ * The last line of the highlighted range.
54
+ */
31
55
  endLine?: number;
32
56
  }
33
57
 
34
58
  export namespace WalkthroughPanel {
59
+ /**
60
+ * The instantiation options for a walkthrough panel.
61
+ */
35
62
  export interface IOptions {
63
+ /**
64
+ * The rendermime registry used to render step bodies and media.
65
+ */
36
66
  rendermime: IRenderMimeRegistry;
67
+ /**
68
+ * The command registry used to execute the jump-to-line command.
69
+ */
37
70
  commands: CommandRegistry;
71
+ /**
72
+ * The translation bundle for UI strings.
73
+ */
38
74
  trans: TranslationBundle;
39
75
  }
40
76
  }
41
77
 
42
78
  /**
43
79
  * A read-only, scrollable column of walkthrough steps for the side area.
44
- *
45
- * The agent appends steps as it narrates, so the explanation lives beside the
46
- * code the user is looking at and persists for them to read at their own pace,
47
- * rather than scrolling away in the chat. Each step renders Markdown (with code
48
- * snippets, Mermaid, math), can embed a rich visual, and can offer a button
49
- * that opens the referenced file and highlights its lines.
80
+ * The agent appends steps as it narrates, so the explanation persists beside
81
+ * the code instead of scrolling away in the chat.
50
82
  */
51
83
  export class WalkthroughPanel extends Panel {
52
84
  constructor(options: WalkthroughPanel.IOptions) {
@@ -67,9 +99,8 @@ export class WalkthroughPanel extends Panel {
67
99
  }
68
100
 
69
101
  /**
70
- * Dispose on close (e.g. the close button when the panel has been dragged to
71
- * the main area) rather than leaving a detached, reusable widget behind. The
72
- * next `xtralab:walkthrough` call recreates the panel in the side area.
102
+ * Dispose on close (e.g. after a drag to the main area) instead of leaving a
103
+ * detached widget; the next `xtralab:walkthrough` call recreates the panel.
73
104
  */
74
105
  protected onCloseRequest(msg: Message): void {
75
106
  super.onCloseRequest(msg);
@@ -103,7 +134,6 @@ export class WalkthroughPanel extends Panel {
103
134
  card.addWidget(this._jumpButton(step.path, step.line, step.endLine));
104
135
  }
105
136
 
106
- // Bring the newest step into view.
107
137
  this.node.scrollTop = this.node.scrollHeight;
108
138
  }
109
139
 
package/style/about.css CHANGED
@@ -1,10 +1,5 @@
1
- /*
2
- * About dialog (xtralab:about). The header block is the dialog title, so it
3
- * inherits the jp-Dialog-header type (size2/600 under chrome.css) — the
4
- * wordmark scales up from there and the version line drops back to body
5
- * size, weight and a muted color.
6
- */
7
-
1
+ /* The header block is the dialog title, so it inherits the jp-Dialog-header
2
+ * type (size2/600 under chrome.css). */
8
3
  .jp-xtralab-About-header {
9
4
  display: flex;
10
5
  align-items: center;
@@ -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,22 +1,22 @@
1
- /*
2
- See the JupyterLab Developer Guide for useful CSS Patterns:
3
-
4
- https://jupyterlab.readthedocs.io/en/stable/developer/css.html
5
- */
1
+ /* Rules live on the section class below, so they travel when the tree moves. */
2
+ .jp-xtralab-FileBrowserPanel {
3
+ display: flex;
4
+ flex-direction: column;
5
+ min-width: 200px;
6
+ overflow: hidden;
7
+ }
6
8
 
7
9
  .jp-xtralab-FileBrowser {
8
10
  display: flex;
11
+ flex: 1 1 auto;
9
12
  flex-direction: column;
10
13
  min-width: 200px;
14
+ min-height: 0;
11
15
  overflow: hidden;
12
16
  background-color: var(--jp-layout-color1);
13
17
 
14
- /*
15
- * Map @pierre/trees CSS variables to the active JupyterLab theme. The
16
- * `*-override` variants take precedence over the library's defaults, so
17
- * these values track the JupyterLab theme automatically — no JS needed
18
- * when the theme switches.
19
- */
18
+ /* Map @pierre/trees variables to the JupyterLab theme; the `*-override`
19
+ variants beat the library defaults, so theme switches need no JS. */
20
20
  --trees-bg-override: var(--jp-layout-color1);
21
21
  --trees-bg-muted-override: var(--jp-layout-color2);
22
22
  --trees-fg-override: var(--jp-ui-font-color1);
@@ -35,32 +35,16 @@
35
35
  --trees-font-family-override: var(--jp-ui-font-family);
36
36
  --trees-font-size-override: var(--jp-ui-font-size1);
37
37
 
38
- /*
39
- * Push the search box, the scroll wrapper, and every row inside the
40
- * tree away from the sidebar edge. `--trees-padding-inline` is the
41
- * outer gutter the @pierre/trees host uses for the search box and the
42
- * scroll container, and the row strip sits inside that gutter — so
43
- * matching the 12px the JupyterLab toolbar uses on its sides keeps
44
- * the toolbar buttons, the search bar, and the row hover/selection
45
- * highlights vertically aligned. Row content padding stays at the
46
- * default 4px so the icon → text rhythm doesn't change.
47
- */
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. */
48
40
  --trees-padding-inline-override: 12px;
49
41
  --trees-item-padding-x-override: 4px;
50
42
 
51
- /* Must carry a length unit. The library subtracts this from
52
- `--trees-padding-inline` inside a `calc()`; a unitless `0` makes the
53
- subtraction type-invalid, the whole padding-inline rule drops out,
54
- 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. */
55
45
  --trees-item-margin-x-override: 0px;
56
46
  }
57
47
 
58
- /*
59
- * Match the spacing the default file browser uses around its top toolbar
60
- * (8px above, 12px on each side, flush with the content below). Without
61
- * this, the toolbar inherits jp-Toolbar's default border + padding which
62
- * looks heavier than the rest of the JupyterLab sidebar.
63
- */
64
48
  .jp-xtralab-FileBrowser-toolbar.jp-Toolbar {
65
49
  flex: 0 0 auto;
66
50
  height: auto;
@@ -85,12 +69,8 @@
85
69
  width: 28px;
86
70
  }
87
71
 
88
- /*
89
- * Promote the "new launcher" button to the same blue, wider call-to-action
90
- * the default file browser uses for `launcher:create`. The selectors mirror
91
- * the rules in `@jupyterlab/launcher-extension/style/base.css`, but target
92
- * our own command id and toolbar wrapper class.
93
- */
72
+ /* Same blue call-to-action the default file browser gives `launcher:create`;
73
+ * selectors mirror `@jupyterlab/launcher-extension/style/base.css`. */
94
74
  .jp-xtralab-FileBrowser-toolbar
95
75
  > .jp-Toolbar-item
96
76
  .jp-ToolbarButtonComponent[data-command='xtralab:new-launcher'] {
@@ -129,46 +109,18 @@
129
109
  min-height: 0;
130
110
  }
131
111
 
132
- .jp-xtralab-FileBrowser file-tree-container {
112
+ .jp-xtralab-FileBrowser-accordion {
133
113
  flex: 1 1 auto;
134
114
  min-height: 0;
135
115
  }
136
116
 
137
- /*
138
- * Drag image shown next to the cursor while dragging files out of the
139
- * tree. Mirrors the visual weight of the default file browser's drag
140
- * preview without depending on its DOM.
141
- */
142
- .jp-xtralab-DragImage {
143
- position: absolute;
144
- display: flex;
145
- align-items: center;
146
- gap: 4px;
147
- padding: 2px 6px;
148
- background-color: var(--jp-layout-color1);
149
- border: 1px solid var(--jp-border-color2);
150
- border-radius: 6px;
151
- color: var(--jp-ui-font-color1);
152
- font-family: var(--jp-ui-font-family);
153
- font-size: var(--jp-ui-font-size1);
154
- pointer-events: none;
155
- }
156
-
157
- .jp-xtralab-DragImage-icon {
158
- display: inline-flex;
159
- align-items: center;
117
+ .jp-AccordionPanel-title > .jp-xtralab-FileBrowser-toolbar {
118
+ flex: 0 1 auto;
119
+ min-width: 0;
120
+ overflow: hidden;
160
121
  }
161
122
 
162
- .jp-xtralab-DragImage-count {
163
- display: inline-flex;
164
- align-items: center;
165
- justify-content: center;
166
- min-width: 16px;
167
- height: 16px;
168
- padding: 0 4px;
169
- background-color: var(--jp-brand-color1);
170
- border-radius: 8px;
171
- color: var(--jp-ui-inverse-font-color1);
172
- font-size: var(--jp-ui-font-size0);
173
- line-height: 1;
123
+ .jp-xtralab-FileBrowser file-tree-container {
124
+ flex: 1 1 auto;
125
+ min-height: 0;
174
126
  }