jupyterlab_ai_code_assistants_extension 1.0.17 → 1.0.21

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.
@@ -3,7 +3,8 @@ export declare const assistantsIcon: LabIcon;
3
3
  export declare const starFilledIcon: LabIcon;
4
4
  export declare const refreshIcon: LabIcon;
5
5
  export declare const removeIcon: LabIcon;
6
- export declare const warningIcon: LabIcon;
6
+ export declare const cleanupIcon: LabIcon;
7
+ export declare const shieldIcon: LabIcon;
7
8
  export declare const addIcon: LabIcon;
8
9
  export declare const branchIcon: LabIcon;
9
10
  export declare const switchIcon: LabIcon;
package/lib/core/icons.js CHANGED
@@ -37,21 +37,32 @@ export const removeIcon = new LabIcon({
37
37
  name: `${ICON_PREFIX}:remove`,
38
38
  svgstr: removeSvgStr
39
39
  });
40
- // Marks the unsafe launch variants. A shield reads as "protected", which is
41
- // the inverse of what these entries do, so the caution triangle carries them
42
- // instead. Material "warning" outline.
40
+ // `Clean Up Parallel Sessions` - deletes several at once, so it wears the
41
+ // sweep variant of the trash glyph (Material "delete_sweep"), same family as
42
+ // `Remove from ...`'s plain trash but visibly the bulk one (user direction
43
+ // 2026-08-11, replacing the shared danger marker it wore under DEF-45).
44
+ const cleanupSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
45
+ <path class="jp-icon3" fill="#616161" d="M15 16h4v2h-4zm0-8h7v2h-7zm0 4h6v2h-6zM3 18c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V8H3v10zM14 5h-3l-1-1H6L5 5H2v2h12z"/>
46
+ </svg>`;
47
+ export const cleanupIcon = new LabIcon({
48
+ name: `${ICON_PREFIX}:cleanup`,
49
+ svgstr: cleanupSvgStr
50
+ });
51
+ // Marks the unsafe launch variants. The shield is the established marker for
52
+ // an action that touches the permission system (the UAC pattern), and it is
53
+ // what the reference implementation used; Material "shield" half-fill, kept
54
+ // per user direction 2026-08-11 over the earlier caution triangle.
43
55
  //
44
- // 16x16 and `jp-icon-warn0`, like every other icon in these menus and unlike
45
- // them in colour: authored at 13x13 in `jp-icon3` it rendered smaller than
46
- // its neutral siblings AND in the identical grey, measured rgb(97,97,97) in
47
- // the light theme and rgb(189,189,189) in the dark one - the one glyph whose
48
- // whole job is to say "this differs" was the least conspicuous in the menu.
49
- const warningSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
50
- <path class="jp-icon-warn0" fill="#f57c00" d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/>
56
+ // 16x16 like its siblings (DEF-40's size half - authored at 13x13 it
57
+ // rendered smaller than every icon beside it), and in the standard `jp-icon3`
58
+ // like them too: the user ruled 2026-08-11 that the shield shape alone marks
59
+ // the difference, reversing DEF-40's colour half (the orange `jp-icon-warn0`).
60
+ const shieldSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
61
+ <path class="jp-icon3" fill="#616161" d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>
51
62
  </svg>`;
52
- export const warningIcon = new LabIcon({
53
- name: `${ICON_PREFIX}:warning`,
54
- svgstr: warningSvgStr
63
+ export const shieldIcon = new LabIcon({
64
+ name: `${ICON_PREFIX}:shield`,
65
+ svgstr: shieldSvgStr
55
66
  });
56
67
  const addSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
57
68
  <path class="jp-icon3" fill="#616161" d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
package/lib/core/panel.js CHANGED
@@ -4,7 +4,7 @@ import { CommandRegistry } from '@lumino/commands';
4
4
  import { UUID } from '@lumino/coreutils';
5
5
  import { Widget } from '@lumino/widgets';
6
6
  import { ColourStore } from './colour';
7
- import { addIcon, branchIcon, filterIcon, providerIcon, refreshIcon, removeIcon, starFilledIcon, switchIcon, warningIcon } from './icons';
7
+ import { addIcon, branchIcon, cleanupIcon, filterIcon, providerIcon, refreshIcon, removeIcon, shieldIcon, starFilledIcon, switchIcon } from './icons';
8
8
  import { DEFAULT_RECENT_LIMIT, MAX_RECENT_LIMIT, MIN_RECENT_LIMIT } from './limits';
9
9
  import { resolveLaunchMode, resolvedLaunchModeEntry } from './modes';
10
10
  import { showManageSessionsPopup } from './popup';
@@ -1691,7 +1691,7 @@ export class AssistantSessionsPanel extends Widget {
1691
1691
  /** The glyph, only where the mode WIDENS what runs without asking. */
1692
1692
  _variantIcon() {
1693
1693
  var _a;
1694
- return ((_a = this._resolvedVariant()) === null || _a === void 0 ? void 0 : _a.unsafe) ? warningIcon : undefined;
1694
+ return ((_a = this._resolvedVariant()) === null || _a === void 0 ? void 0 : _a.unsafe) ? shieldIcon : undefined;
1695
1695
  }
1696
1696
  _setupCommands() {
1697
1697
  this._commands = new CommandRegistry();
@@ -1716,7 +1716,7 @@ export class AssistantSessionsPanel extends Widget {
1716
1716
  const verb = (_c = (_b = (_a = this._hooks).resumeLabel) === null || _b === void 0 ? void 0 : _b.call(_a, active())) !== null && _c !== void 0 ? _c : 'Resume';
1717
1717
  return variant ? `${verb} (${variant.label})` : verb;
1718
1718
  },
1719
- icon: () => { var _a; return (((_a = this._resumeVariant()) === null || _a === void 0 ? void 0 : _a.unsafe) ? warningIcon : undefined); },
1719
+ icon: () => { var _a; return (((_a = this._resumeVariant()) === null || _a === void 0 ? void 0 : _a.unsafe) ? shieldIcon : undefined); },
1720
1720
  execute: () => {
1721
1721
  const s = active();
1722
1722
  if (s) {
@@ -1727,7 +1727,7 @@ export class AssistantSessionsPanel extends Widget {
1727
1727
  for (const mode of this._variantModes) {
1728
1728
  this._commands.addCommand(this._cmd(`resume-${mode.id}`), {
1729
1729
  label: `Resume (${mode.menuLabel})`,
1730
- icon: warningIcon,
1730
+ icon: shieldIcon,
1731
1731
  // Absent while the plain item already resolves to this same mode - it
1732
1732
  // would be a second entry building an identical launch.
1733
1733
  isVisible: () => !this._buildsSameLaunch(mode),
@@ -1744,13 +1744,13 @@ export class AssistantSessionsPanel extends Widget {
1744
1744
  });
1745
1745
  this._commands.addCommand(this._cmd(`new-session-${mode.id}`), {
1746
1746
  label: `New ${this._descriptor.label} Session (${mode.menuLabel})`,
1747
- icon: warningIcon,
1747
+ icon: shieldIcon,
1748
1748
  isVisible: () => !this._buildsSameLaunch(mode),
1749
1749
  execute: () => void this._newSession(mode.id)
1750
1750
  });
1751
1751
  this._commands.addCommand(this._cmd(`branch-session-${mode.id}`), {
1752
1752
  label: mode.menuLabel,
1753
- icon: warningIcon,
1753
+ icon: shieldIcon,
1754
1754
  isVisible: () => !this._buildsSameLaunch(mode),
1755
1755
  execute: () => void this._branchSession(mode.id)
1756
1756
  });
@@ -1839,8 +1839,9 @@ export class AssistantSessionsPanel extends Widget {
1839
1839
  // Marked, like `Remove from ...` below it. The two share the group the
1840
1840
  // separator was added to protect, and both delete history that cannot be
1841
1841
  // recovered; leaving this one bare made the pair read as one dangerous
1842
- // item beside an ordinary one (DEF-45).
1843
- icon: warningIcon,
1842
+ // item beside an ordinary one (DEF-45). The sweep variant of the trash
1843
+ // glyph, because this one deletes several at once.
1844
+ icon: cleanupIcon,
1844
1845
  isVisible: () => { var _a, _b; return ((_b = (_a = active()) === null || _a === void 0 ? void 0 : _a.extra_sessions) !== null && _b !== void 0 ? _b : 0) > 0; },
1845
1846
  execute: () => {
1846
1847
  const s = active();
@@ -1909,7 +1910,7 @@ export class AssistantSessionsPanel extends Widget {
1909
1910
  // danger everywhere else in this menu - spending it on a branch glyph
1910
1911
  // left `Branch Session (Skip Permissions)` looking exactly as safe as
1911
1912
  // Show in File Browser while `Resume (Skip Permissions)` beside it wore
1912
- // the triangle. The branch glyph is the fallback, not the winner.
1913
+ // the shield. The branch glyph is the fallback, not the winner.
1913
1914
  icon: () => {
1914
1915
  var _a;
1915
1916
  return (_a = this._variantIcon()) !== null && _a !== void 0 ? _a : (this._visibleVariantCount() === 0 ? branchIcon : undefined);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_ai_code_assistants_extension",
3
- "version": "1.0.17",
3
+ "version": "1.0.21",
4
4
  "description": "Jupyterlab extension to replace individual jupyterlab_*_code_extension and integrate into one, that offers joint capability, joint settings page and individual right toolbar panels per code assistant, with the ability in settings to decide which code assistant support is on (default - all are enabled)",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -42,7 +42,7 @@ jest.mock('../core/request', () => ({
42
42
  }));
43
43
 
44
44
  import { TAB_COLOUR_IDS, fnv1aColour } from '../core/colour';
45
- import { addIcon, branchIcon, warningIcon } from '../core/icons';
45
+ import { addIcon, branchIcon, cleanupIcon, shieldIcon } from '../core/icons';
46
46
  import { AssistantSessionsPanel, commandId } from '../core/panel';
47
47
  import { requestProvider } from '../core/request';
48
48
  import { IProviderDescriptor, ISession } from '../core/types';
@@ -284,7 +284,7 @@ describe('the + button names and marks the launch it performs', () => {
284
284
  expect(glyphs()).toEqual([addIcon.name]);
285
285
  panel.setModes({ skip: true });
286
286
  expect((panel as any)._visibleVariantCount()).toEqual(0);
287
- expect(glyphs()).toEqual([warningIcon.name]);
287
+ expect(glyphs()).toEqual([shieldIcon.name]);
288
288
  // `LabIcon.element` appends, so a button that is not cleared collects one
289
289
  // svg per settings change.
290
290
  panel.setModes({ skip: false });
@@ -314,7 +314,7 @@ describe('DEF-35 / DEF-39 - the branch entry with no visible variants', () => {
314
314
  panel.setModes({ skip: true });
315
315
  // The suffix names the mode in words, but the icon slot is what marks
316
316
  // danger everywhere else in this menu.
317
- expect(cmds(panel).icon(id(panel, 'branch-session'), {})).toBe(warningIcon);
317
+ expect(cmds(panel).icon(id(panel, 'branch-session'), {})).toBe(shieldIcon);
318
318
  });
319
319
 
320
320
  it('goes back to naming the launch alone while the variants render', () => {
@@ -346,7 +346,7 @@ describe('DEF-35 / DEF-39 - the branch entry with no visible variants', () => {
346
346
 
347
347
  // --------------------------------------------------------------- DEF-40
348
348
 
349
- describe('DEF-40 - the warning glyph is sized and coloured to stand out', () => {
349
+ describe('DEF-40 - the shield glyph matches its siblings in size and colour', () => {
350
350
  const svg = (svgstr: string): SVGElement =>
351
351
  new DOMParser().parseFromString(svgstr, 'image/svg+xml')
352
352
  .documentElement as unknown as SVGElement;
@@ -354,7 +354,7 @@ describe('DEF-40 - the warning glyph is sized and coloured to stand out', () =>
354
354
  it('renders at 16x16, like its neutral siblings', () => {
355
355
  // Authored at 13x13 it rendered SMALLER than every icon beside it - the one
356
356
  // glyph whose job is to say "this differs" was also the least visible.
357
- for (const icon of [warningIcon, addIcon, branchIcon]) {
357
+ for (const icon of [shieldIcon, addIcon, branchIcon]) {
358
358
  const el = svg(icon.svgstr);
359
359
  expect([
360
360
  icon.name,
@@ -364,23 +364,27 @@ describe('DEF-40 - the warning glyph is sized and coloured to stand out', () =>
364
364
  }
365
365
  });
366
366
 
367
- it('paints in jp-icon-warn0 and not the neutral grey', () => {
368
- // `jp-icon3` is the theme's neutral: in it the triangle measured the same
369
- // rgb(97,97,97) as the icons it was supposed to differ from.
370
- const path = svg(warningIcon.svgstr).querySelector('path')!;
371
- expect(path.getAttribute('class')).toEqual('jp-icon-warn0');
372
- expect(warningIcon.svgstr).not.toContain('jp-icon3');
367
+ it('paints in the standard jp-icon3, like its siblings', () => {
368
+ // DEF-40's orange (`jp-icon-warn0`) was reversed by user ruling
369
+ // 2026-08-11: the shield SHAPE alone marks the difference, the colour
370
+ // stays the theme's neutral like every other icon in the menu.
371
+ const path = svg(shieldIcon.svgstr).querySelector('path')!;
372
+ expect(path.getAttribute('class')).toEqual('jp-icon3');
373
+ expect(shieldIcon.svgstr).not.toContain('jp-icon-warn0');
373
374
  });
374
375
  });
375
376
 
376
377
  // ------------------------------------------------- DEF-45 / DEF-46 (lane A)
377
378
 
378
379
  describe('DEF-45 - both destructive menu entries are marked alike', () => {
379
- it('gives Clean Up Parallel Sessions the same glyph Remove carries', () => {
380
+ it('gives Clean Up Parallel Sessions the sweep variant of the trash glyph', () => {
381
+ // Same family as Remove's plain trash - marked alike, per DEF-45 - but
382
+ // the bulk variant, because this one deletes several at once (user
383
+ // direction 2026-08-11; it no longer shares the unsafe-launch shield).
380
384
  const commands = (panel as any)._commands;
381
385
  expect(
382
386
  commands.icon(commandId(DESCRIPTOR.id, 'cleanup-parallel'), {})
383
- ).toBe(warningIcon);
387
+ ).toBe(cleanupIcon);
384
388
  expect(commands.icon(commandId(DESCRIPTOR.id, 'remove'), {})).toBeDefined();
385
389
  });
386
390
  });
package/src/core/icons.ts CHANGED
@@ -48,22 +48,35 @@ export const removeIcon = new LabIcon({
48
48
  svgstr: removeSvgStr
49
49
  });
50
50
 
51
- // Marks the unsafe launch variants. A shield reads as "protected", which is
52
- // the inverse of what these entries do, so the caution triangle carries them
53
- // instead. Material "warning" outline.
51
+ // `Clean Up Parallel Sessions` - deletes several at once, so it wears the
52
+ // sweep variant of the trash glyph (Material "delete_sweep"), same family as
53
+ // `Remove from ...`'s plain trash but visibly the bulk one (user direction
54
+ // 2026-08-11, replacing the shared danger marker it wore under DEF-45).
55
+ const cleanupSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
56
+ <path class="jp-icon3" fill="#616161" d="M15 16h4v2h-4zm0-8h7v2h-7zm0 4h6v2h-6zM3 18c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V8H3v10zM14 5h-3l-1-1H6L5 5H2v2h12z"/>
57
+ </svg>`;
58
+
59
+ export const cleanupIcon = new LabIcon({
60
+ name: `${ICON_PREFIX}:cleanup`,
61
+ svgstr: cleanupSvgStr
62
+ });
63
+
64
+ // Marks the unsafe launch variants. The shield is the established marker for
65
+ // an action that touches the permission system (the UAC pattern), and it is
66
+ // what the reference implementation used; Material "shield" half-fill, kept
67
+ // per user direction 2026-08-11 over the earlier caution triangle.
54
68
  //
55
- // 16x16 and `jp-icon-warn0`, like every other icon in these menus and unlike
56
- // them in colour: authored at 13x13 in `jp-icon3` it rendered smaller than
57
- // its neutral siblings AND in the identical grey, measured rgb(97,97,97) in
58
- // the light theme and rgb(189,189,189) in the dark one - the one glyph whose
59
- // whole job is to say "this differs" was the least conspicuous in the menu.
60
- const warningSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
61
- <path class="jp-icon-warn0" fill="#f57c00" d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/>
69
+ // 16x16 like its siblings (DEF-40's size half - authored at 13x13 it
70
+ // rendered smaller than every icon beside it), and in the standard `jp-icon3`
71
+ // like them too: the user ruled 2026-08-11 that the shield shape alone marks
72
+ // the difference, reversing DEF-40's colour half (the orange `jp-icon-warn0`).
73
+ const shieldSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
74
+ <path class="jp-icon3" fill="#616161" d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>
62
75
  </svg>`;
63
76
 
64
- export const warningIcon = new LabIcon({
65
- name: `${ICON_PREFIX}:warning`,
66
- svgstr: warningSvgStr
77
+ export const shieldIcon = new LabIcon({
78
+ name: `${ICON_PREFIX}:shield`,
79
+ svgstr: shieldSvgStr
67
80
  });
68
81
 
69
82
  const addSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
package/src/core/panel.ts CHANGED
@@ -26,13 +26,14 @@ import { ColourStore } from './colour';
26
26
  import {
27
27
  addIcon,
28
28
  branchIcon,
29
+ cleanupIcon,
29
30
  filterIcon,
30
31
  providerIcon,
31
32
  refreshIcon,
32
33
  removeIcon,
34
+ shieldIcon,
33
35
  starFilledIcon,
34
- switchIcon,
35
- warningIcon
36
+ switchIcon
36
37
  } from './icons';
37
38
  import {
38
39
  DEFAULT_RECENT_LIMIT,
@@ -1996,7 +1997,7 @@ export class AssistantSessionsPanel extends Widget {
1996
1997
 
1997
1998
  /** The glyph, only where the mode WIDENS what runs without asking. */
1998
1999
  private _variantIcon(): LabIcon | undefined {
1999
- return this._resolvedVariant()?.unsafe ? warningIcon : undefined;
2000
+ return this._resolvedVariant()?.unsafe ? shieldIcon : undefined;
2000
2001
  }
2001
2002
 
2002
2003
  private _setupCommands(): void {
@@ -2024,7 +2025,7 @@ export class AssistantSessionsPanel extends Widget {
2024
2025
  const verb = this._hooks.resumeLabel?.(active()) ?? 'Resume';
2025
2026
  return variant ? `${verb} (${variant.label})` : verb;
2026
2027
  },
2027
- icon: () => (this._resumeVariant()?.unsafe ? warningIcon : undefined),
2028
+ icon: () => (this._resumeVariant()?.unsafe ? shieldIcon : undefined),
2028
2029
  execute: () => {
2029
2030
  const s = active();
2030
2031
  if (s) {
@@ -2036,7 +2037,7 @@ export class AssistantSessionsPanel extends Widget {
2036
2037
  for (const mode of this._variantModes) {
2037
2038
  this._commands.addCommand(this._cmd(`resume-${mode.id}`), {
2038
2039
  label: `Resume (${mode.menuLabel})`,
2039
- icon: warningIcon,
2040
+ icon: shieldIcon,
2040
2041
  // Absent while the plain item already resolves to this same mode - it
2041
2042
  // would be a second entry building an identical launch.
2042
2043
  isVisible: () => !this._buildsSameLaunch(mode),
@@ -2053,13 +2054,13 @@ export class AssistantSessionsPanel extends Widget {
2053
2054
  });
2054
2055
  this._commands.addCommand(this._cmd(`new-session-${mode.id}`), {
2055
2056
  label: `New ${this._descriptor.label} Session (${mode.menuLabel})`,
2056
- icon: warningIcon,
2057
+ icon: shieldIcon,
2057
2058
  isVisible: () => !this._buildsSameLaunch(mode),
2058
2059
  execute: () => void this._newSession(mode.id)
2059
2060
  });
2060
2061
  this._commands.addCommand(this._cmd(`branch-session-${mode.id}`), {
2061
2062
  label: mode.menuLabel as string,
2062
- icon: warningIcon,
2063
+ icon: shieldIcon,
2063
2064
  isVisible: () => !this._buildsSameLaunch(mode),
2064
2065
  execute: () => void this._branchSession(mode.id)
2065
2066
  });
@@ -2170,8 +2171,9 @@ export class AssistantSessionsPanel extends Widget {
2170
2171
  // Marked, like `Remove from ...` below it. The two share the group the
2171
2172
  // separator was added to protect, and both delete history that cannot be
2172
2173
  // recovered; leaving this one bare made the pair read as one dangerous
2173
- // item beside an ordinary one (DEF-45).
2174
- icon: warningIcon,
2174
+ // item beside an ordinary one (DEF-45). The sweep variant of the trash
2175
+ // glyph, because this one deletes several at once.
2176
+ icon: cleanupIcon,
2175
2177
  isVisible: () => (active()?.extra_sessions ?? 0) > 0,
2176
2178
  execute: () => {
2177
2179
  const s = active();
@@ -2244,7 +2246,7 @@ export class AssistantSessionsPanel extends Widget {
2244
2246
  // danger everywhere else in this menu - spending it on a branch glyph
2245
2247
  // left `Branch Session (Skip Permissions)` looking exactly as safe as
2246
2248
  // Show in File Browser while `Resume (Skip Permissions)` beside it wore
2247
- // the triangle. The branch glyph is the fallback, not the winner.
2249
+ // the shield. The branch glyph is the fallback, not the winner.
2248
2250
  icon: () =>
2249
2251
  this._variantIcon() ??
2250
2252
  (this._visibleVariantCount() === 0 ? branchIcon : undefined),