jupyterlab_ai_code_assistants_extension 1.0.19 → 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.
- package/lib/core/icons.d.ts +1 -0
- package/lib/core/icons.js +16 -7
- package/lib/core/panel.js +4 -3
- package/package.json +1 -1
- package/src/__tests__/panel.spec.ts +13 -9
- package/src/core/icons.ts +18 -7
- package/src/core/panel.ts +4 -2
package/lib/core/icons.d.ts
CHANGED
|
@@ -3,6 +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 cleanupIcon: LabIcon;
|
|
6
7
|
export declare const shieldIcon: LabIcon;
|
|
7
8
|
export declare const addIcon: LabIcon;
|
|
8
9
|
export declare const branchIcon: LabIcon;
|
package/lib/core/icons.js
CHANGED
|
@@ -37,19 +37,28 @@ export const removeIcon = new LabIcon({
|
|
|
37
37
|
name: `${ICON_PREFIX}:remove`,
|
|
38
38
|
svgstr: removeSvgStr
|
|
39
39
|
});
|
|
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
|
+
});
|
|
40
51
|
// Marks the unsafe launch variants. The shield is the established marker for
|
|
41
52
|
// an action that touches the permission system (the UAC pattern), and it is
|
|
42
53
|
// what the reference implementation used; Material "shield" half-fill, kept
|
|
43
54
|
// per user direction 2026-08-11 over the earlier caution triangle.
|
|
44
55
|
//
|
|
45
|
-
// 16x16
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
// the
|
|
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).
|
|
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`).
|
|
51
60
|
const shieldSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
|
|
52
|
-
<path class="jp-
|
|
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"/>
|
|
53
62
|
</svg>`;
|
|
54
63
|
export const shieldIcon = new LabIcon({
|
|
55
64
|
name: `${ICON_PREFIX}:shield`,
|
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, shieldIcon, starFilledIcon, switchIcon } 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';
|
|
@@ -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
|
-
|
|
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();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jupyterlab_ai_code_assistants_extension",
|
|
3
|
-
"version": "1.0.
|
|
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, shieldIcon } 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';
|
|
@@ -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
|
|
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;
|
|
@@ -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-
|
|
368
|
-
//
|
|
369
|
-
//
|
|
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.
|
|
370
371
|
const path = svg(shieldIcon.svgstr).querySelector('path')!;
|
|
371
|
-
expect(path.getAttribute('class')).toEqual('jp-
|
|
372
|
-
expect(shieldIcon.svgstr).not.toContain('jp-
|
|
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
|
|
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(
|
|
387
|
+
).toBe(cleanupIcon);
|
|
384
388
|
expect(commands.icon(commandId(DESCRIPTOR.id, 'remove'), {})).toBeDefined();
|
|
385
389
|
});
|
|
386
390
|
});
|
package/src/core/icons.ts
CHANGED
|
@@ -48,19 +48,30 @@ export const removeIcon = new LabIcon({
|
|
|
48
48
|
svgstr: removeSvgStr
|
|
49
49
|
});
|
|
50
50
|
|
|
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
|
+
|
|
51
64
|
// Marks the unsafe launch variants. The shield is the established marker for
|
|
52
65
|
// an action that touches the permission system (the UAC pattern), and it is
|
|
53
66
|
// what the reference implementation used; Material "shield" half-fill, kept
|
|
54
67
|
// per user direction 2026-08-11 over the earlier caution triangle.
|
|
55
68
|
//
|
|
56
|
-
// 16x16
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
// the
|
|
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).
|
|
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`).
|
|
62
73
|
const shieldSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
|
|
63
|
-
<path class="jp-
|
|
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"/>
|
|
64
75
|
</svg>`;
|
|
65
76
|
|
|
66
77
|
export const shieldIcon = new LabIcon({
|
package/src/core/panel.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { ColourStore } from './colour';
|
|
|
26
26
|
import {
|
|
27
27
|
addIcon,
|
|
28
28
|
branchIcon,
|
|
29
|
+
cleanupIcon,
|
|
29
30
|
filterIcon,
|
|
30
31
|
providerIcon,
|
|
31
32
|
refreshIcon,
|
|
@@ -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
|
-
|
|
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();
|