jupyterlab_ai_code_assistants_extension 1.0.17 → 1.0.19

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,7 @@ 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 shieldIcon: LabIcon;
7
7
  export declare const addIcon: LabIcon;
8
8
  export declare const branchIcon: LabIcon;
9
9
  export declare const switchIcon: LabIcon;
package/lib/core/icons.js CHANGED
@@ -37,21 +37,23 @@ 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
+ // Marks the unsafe launch variants. The shield is the established marker for
41
+ // an action that touches the permission system (the UAC pattern), and it is
42
+ // what the reference implementation used; Material "shield" half-fill, kept
43
+ // per user direction 2026-08-11 over the earlier caution triangle.
43
44
  //
44
45
  // 16x16 and `jp-icon-warn0`, like every other icon in these menus and unlike
45
46
  // them in colour: authored at 13x13 in `jp-icon3` it rendered smaller than
46
47
  // its neutral siblings AND in the identical grey, measured rgb(97,97,97) in
47
48
  // 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"/>
49
+ // whole job is to say "this differs" was the least conspicuous in the menu
50
+ // (DEF-40, and the reason the reference's 13x13 grey is not copied verbatim).
51
+ const shieldSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
52
+ <path class="jp-icon-warn0" fill="#f57c00" 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
53
  </svg>`;
52
- export const warningIcon = new LabIcon({
53
- name: `${ICON_PREFIX}:warning`,
54
- svgstr: warningSvgStr
54
+ export const shieldIcon = new LabIcon({
55
+ name: `${ICON_PREFIX}:shield`,
56
+ svgstr: shieldSvgStr
55
57
  });
56
58
  const addSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
57
59
  <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, 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
  });
@@ -1840,7 +1840,7 @@ export class AssistantSessionsPanel extends Widget {
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
1842
  // item beside an ordinary one (DEF-45).
1843
- icon: warningIcon,
1843
+ icon: shieldIcon,
1844
1844
  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
1845
  execute: () => {
1846
1846
  const s = active();
@@ -1909,7 +1909,7 @@ export class AssistantSessionsPanel extends Widget {
1909
1909
  // danger everywhere else in this menu - spending it on a branch glyph
1910
1910
  // left `Branch Session (Skip Permissions)` looking exactly as safe as
1911
1911
  // Show in File Browser while `Resume (Skip Permissions)` beside it wore
1912
- // the triangle. The branch glyph is the fallback, not the winner.
1912
+ // the shield. The branch glyph is the fallback, not the winner.
1913
1913
  icon: () => {
1914
1914
  var _a;
1915
1915
  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.19",
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, 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', () => {
@@ -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,
@@ -365,11 +365,11 @@ describe('DEF-40 - the warning glyph is sized and coloured to stand out', () =>
365
365
  });
366
366
 
367
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
368
+ // `jp-icon3` is the theme's neutral: in it the glyph measured the same
369
369
  // rgb(97,97,97) as the icons it was supposed to differ from.
370
- const path = svg(warningIcon.svgstr).querySelector('path')!;
370
+ const path = svg(shieldIcon.svgstr).querySelector('path')!;
371
371
  expect(path.getAttribute('class')).toEqual('jp-icon-warn0');
372
- expect(warningIcon.svgstr).not.toContain('jp-icon3');
372
+ expect(shieldIcon.svgstr).not.toContain('jp-icon3');
373
373
  });
374
374
  });
375
375
 
@@ -380,7 +380,7 @@ describe('DEF-45 - both destructive menu entries are marked alike', () => {
380
380
  const commands = (panel as any)._commands;
381
381
  expect(
382
382
  commands.icon(commandId(DESCRIPTOR.id, 'cleanup-parallel'), {})
383
- ).toBe(warningIcon);
383
+ ).toBe(shieldIcon);
384
384
  expect(commands.icon(commandId(DESCRIPTOR.id, 'remove'), {})).toBeDefined();
385
385
  });
386
386
  });
package/src/core/icons.ts CHANGED
@@ -48,22 +48,24 @@ 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
+ // 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.
54
55
  //
55
56
  // 16x16 and `jp-icon-warn0`, like every other icon in these menus and unlike
56
57
  // them in colour: authored at 13x13 in `jp-icon3` it rendered smaller than
57
58
  // its neutral siblings AND in the identical grey, measured rgb(97,97,97) in
58
59
  // 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"/>
60
+ // whole job is to say "this differs" was the least conspicuous in the menu
61
+ // (DEF-40, and the reason the reference's 13x13 grey is not copied verbatim).
62
+ const shieldSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
63
+ <path class="jp-icon-warn0" fill="#f57c00" 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
64
  </svg>`;
63
65
 
64
- export const warningIcon = new LabIcon({
65
- name: `${ICON_PREFIX}:warning`,
66
- svgstr: warningSvgStr
66
+ export const shieldIcon = new LabIcon({
67
+ name: `${ICON_PREFIX}:shield`,
68
+ svgstr: shieldSvgStr
67
69
  });
68
70
 
69
71
  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
@@ -30,9 +30,9 @@ import {
30
30
  providerIcon,
31
31
  refreshIcon,
32
32
  removeIcon,
33
+ shieldIcon,
33
34
  starFilledIcon,
34
- switchIcon,
35
- warningIcon
35
+ switchIcon
36
36
  } from './icons';
37
37
  import {
38
38
  DEFAULT_RECENT_LIMIT,
@@ -1996,7 +1996,7 @@ export class AssistantSessionsPanel extends Widget {
1996
1996
 
1997
1997
  /** The glyph, only where the mode WIDENS what runs without asking. */
1998
1998
  private _variantIcon(): LabIcon | undefined {
1999
- return this._resolvedVariant()?.unsafe ? warningIcon : undefined;
1999
+ return this._resolvedVariant()?.unsafe ? shieldIcon : undefined;
2000
2000
  }
2001
2001
 
2002
2002
  private _setupCommands(): void {
@@ -2024,7 +2024,7 @@ export class AssistantSessionsPanel extends Widget {
2024
2024
  const verb = this._hooks.resumeLabel?.(active()) ?? 'Resume';
2025
2025
  return variant ? `${verb} (${variant.label})` : verb;
2026
2026
  },
2027
- icon: () => (this._resumeVariant()?.unsafe ? warningIcon : undefined),
2027
+ icon: () => (this._resumeVariant()?.unsafe ? shieldIcon : undefined),
2028
2028
  execute: () => {
2029
2029
  const s = active();
2030
2030
  if (s) {
@@ -2036,7 +2036,7 @@ export class AssistantSessionsPanel extends Widget {
2036
2036
  for (const mode of this._variantModes) {
2037
2037
  this._commands.addCommand(this._cmd(`resume-${mode.id}`), {
2038
2038
  label: `Resume (${mode.menuLabel})`,
2039
- icon: warningIcon,
2039
+ icon: shieldIcon,
2040
2040
  // Absent while the plain item already resolves to this same mode - it
2041
2041
  // would be a second entry building an identical launch.
2042
2042
  isVisible: () => !this._buildsSameLaunch(mode),
@@ -2053,13 +2053,13 @@ export class AssistantSessionsPanel extends Widget {
2053
2053
  });
2054
2054
  this._commands.addCommand(this._cmd(`new-session-${mode.id}`), {
2055
2055
  label: `New ${this._descriptor.label} Session (${mode.menuLabel})`,
2056
- icon: warningIcon,
2056
+ icon: shieldIcon,
2057
2057
  isVisible: () => !this._buildsSameLaunch(mode),
2058
2058
  execute: () => void this._newSession(mode.id)
2059
2059
  });
2060
2060
  this._commands.addCommand(this._cmd(`branch-session-${mode.id}`), {
2061
2061
  label: mode.menuLabel as string,
2062
- icon: warningIcon,
2062
+ icon: shieldIcon,
2063
2063
  isVisible: () => !this._buildsSameLaunch(mode),
2064
2064
  execute: () => void this._branchSession(mode.id)
2065
2065
  });
@@ -2171,7 +2171,7 @@ export class AssistantSessionsPanel extends Widget {
2171
2171
  // separator was added to protect, and both delete history that cannot be
2172
2172
  // recovered; leaving this one bare made the pair read as one dangerous
2173
2173
  // item beside an ordinary one (DEF-45).
2174
- icon: warningIcon,
2174
+ icon: shieldIcon,
2175
2175
  isVisible: () => (active()?.extra_sessions ?? 0) > 0,
2176
2176
  execute: () => {
2177
2177
  const s = active();
@@ -2244,7 +2244,7 @@ export class AssistantSessionsPanel extends Widget {
2244
2244
  // danger everywhere else in this menu - spending it on a branch glyph
2245
2245
  // left `Branch Session (Skip Permissions)` looking exactly as safe as
2246
2246
  // Show in File Browser while `Resume (Skip Permissions)` beside it wore
2247
- // the triangle. The branch glyph is the fallback, not the winner.
2247
+ // the shield. The branch glyph is the fallback, not the winner.
2248
2248
  icon: () =>
2249
2249
  this._variantIcon() ??
2250
2250
  (this._visibleVariantCount() === 0 ? branchIcon : undefined),