jupyterlab_ai_code_assistants_extension 1.2.4 → 1.2.7
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 +11 -0
- package/lib/core/panel.js +3 -1
- package/package.json +2 -2
- package/src/core/icons.ts +13 -0
- package/src/core/panel.ts +3 -0
- package/style/base.css +22 -7
package/lib/core/icons.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const addIcon: LabIcon;
|
|
|
9
9
|
export declare const branchIcon: LabIcon;
|
|
10
10
|
export declare const switchIcon: LabIcon;
|
|
11
11
|
export declare const filterIcon: LabIcon;
|
|
12
|
+
export declare const statusDotIcon: LabIcon;
|
|
12
13
|
/** Build (or reuse) the LabIcon for a provider's own glyph. */
|
|
13
14
|
export declare function providerIcon(name: string, svgstr: string): LabIcon;
|
|
14
15
|
/**
|
package/lib/core/icons.js
CHANGED
|
@@ -103,6 +103,17 @@ export const filterIcon = new LabIcon({
|
|
|
103
103
|
name: `${ICON_PREFIX}:filter`,
|
|
104
104
|
svgstr: filterSvgStr
|
|
105
105
|
});
|
|
106
|
+
// Row status mark - one filled circle, drawn for a conversation that is live
|
|
107
|
+
// or under remote control. An SVG rather than a rounded span so its colour is
|
|
108
|
+
// a CSS `fill` on the circle itself and the theme decides it, the way every
|
|
109
|
+
// other glyph here is recoloured through its class (DEF-PANE-174).
|
|
110
|
+
const statusDotSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
|
|
111
|
+
<circle class="jp-AiAssistantsPanel-dotGlyph" cx="8" cy="8" r="8" fill="#388e3c"/>
|
|
112
|
+
</svg>`;
|
|
113
|
+
export const statusDotIcon = new LabIcon({
|
|
114
|
+
name: `${ICON_PREFIX}:status-dot`,
|
|
115
|
+
svgstr: statusDotSvgStr
|
|
116
|
+
});
|
|
106
117
|
// Provider glyphs already built, by icon name. LabIcon warns and returns the
|
|
107
118
|
// first registration for a duplicate name, so a provider re-registered by a
|
|
108
119
|
// live settings toggle must resolve to the icon it built the first time
|
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, cleanupIcon, filterIcon, providerIcon, refreshIcon, removeIcon, shieldIcon, starFilledIcon, switchIcon } from './icons';
|
|
7
|
+
import { addIcon, branchIcon, cleanupIcon, filterIcon, providerIcon, refreshIcon, removeIcon, shieldIcon, starFilledIcon, statusDotIcon, 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';
|
|
@@ -1625,12 +1625,14 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
1625
1625
|
// words go on an aria-label.
|
|
1626
1626
|
if (this._descriptor.hasRemoteControl && session.remote_control) {
|
|
1627
1627
|
dot.className = 'jp-AiAssistantsPanel-dot';
|
|
1628
|
+
statusDotIcon.element({ container: dot });
|
|
1628
1629
|
dot.title = 'Remote control session is active';
|
|
1629
1630
|
dot.setAttribute('aria-label', dot.title);
|
|
1630
1631
|
return dot;
|
|
1631
1632
|
}
|
|
1632
1633
|
if (this._descriptor.hasLiveProcess && session.live) {
|
|
1633
1634
|
dot.className = 'jp-AiAssistantsPanel-dot';
|
|
1635
|
+
statusDotIcon.element({ container: dot });
|
|
1634
1636
|
dot.title = `A ${this._descriptor.label} session is active in this project`;
|
|
1635
1637
|
dot.setAttribute('aria-label', dot.title);
|
|
1636
1638
|
return dot;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jupyterlab_ai_code_assistants_extension",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
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",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@lumino/disposable": "^2.0.0",
|
|
73
73
|
"@lumino/messaging": "^2.0.0",
|
|
74
74
|
"@lumino/widgets": "^2.0.0",
|
|
75
|
-
"jupyterlab_colourful_tab_extension": "^1.
|
|
75
|
+
"jupyterlab_colourful_tab_extension": "^1.1.20",
|
|
76
76
|
"react": "^18.2.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
package/src/core/icons.ts
CHANGED
|
@@ -126,6 +126,19 @@ export const filterIcon = new LabIcon({
|
|
|
126
126
|
svgstr: filterSvgStr
|
|
127
127
|
});
|
|
128
128
|
|
|
129
|
+
// Row status mark - one filled circle, drawn for a conversation that is live
|
|
130
|
+
// or under remote control. An SVG rather than a rounded span so its colour is
|
|
131
|
+
// a CSS `fill` on the circle itself and the theme decides it, the way every
|
|
132
|
+
// other glyph here is recoloured through its class (DEF-PANE-174).
|
|
133
|
+
const statusDotSvgStr = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
|
|
134
|
+
<circle class="jp-AiAssistantsPanel-dotGlyph" cx="8" cy="8" r="8" fill="#388e3c"/>
|
|
135
|
+
</svg>`;
|
|
136
|
+
|
|
137
|
+
export const statusDotIcon = new LabIcon({
|
|
138
|
+
name: `${ICON_PREFIX}:status-dot`,
|
|
139
|
+
svgstr: statusDotSvgStr
|
|
140
|
+
});
|
|
141
|
+
|
|
129
142
|
// Provider glyphs already built, by icon name. LabIcon warns and returns the
|
|
130
143
|
// first registration for a duplicate name, so a provider re-registered by a
|
|
131
144
|
// live settings toggle must resolve to the icon it built the first time
|
package/src/core/panel.ts
CHANGED
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
removeIcon,
|
|
34
34
|
shieldIcon,
|
|
35
35
|
starFilledIcon,
|
|
36
|
+
statusDotIcon,
|
|
36
37
|
switchIcon
|
|
37
38
|
} from './icons';
|
|
38
39
|
import {
|
|
@@ -1925,12 +1926,14 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
1925
1926
|
// words go on an aria-label.
|
|
1926
1927
|
if (this._descriptor.hasRemoteControl && session.remote_control) {
|
|
1927
1928
|
dot.className = 'jp-AiAssistantsPanel-dot';
|
|
1929
|
+
statusDotIcon.element({ container: dot });
|
|
1928
1930
|
dot.title = 'Remote control session is active';
|
|
1929
1931
|
dot.setAttribute('aria-label', dot.title);
|
|
1930
1932
|
return dot;
|
|
1931
1933
|
}
|
|
1932
1934
|
if (this._descriptor.hasLiveProcess && session.live) {
|
|
1933
1935
|
dot.className = 'jp-AiAssistantsPanel-dot';
|
|
1936
|
+
statusDotIcon.element({ container: dot });
|
|
1934
1937
|
dot.title = `A ${this._descriptor.label} session is active in this project`;
|
|
1935
1938
|
dot.setAttribute('aria-label', dot.title);
|
|
1936
1939
|
return dot;
|
package/style/base.css
CHANGED
|
@@ -349,17 +349,32 @@
|
|
|
349
349
|
flex: 0 0 auto;
|
|
350
350
|
width: 8px;
|
|
351
351
|
height: 8px;
|
|
352
|
-
border-radius: 50%;
|
|
353
352
|
display: inline-block;
|
|
354
353
|
}
|
|
355
354
|
|
|
356
355
|
.jp-AiAssistantsPanel-dot {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
356
|
+
display: inline-flex;
|
|
357
|
+
align-items: center;
|
|
358
|
+
|
|
359
|
+
/* drop-shadow, not box-shadow: the glyph is an svg now, and box-shadow would
|
|
360
|
+
halo its square element box rather than the circle inside it. */
|
|
361
|
+
filter: drop-shadow(0 0 2px var(--jp-success-color1));
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.jp-AiAssistantsPanel-dot svg {
|
|
365
|
+
width: 8px;
|
|
366
|
+
height: 8px;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/* The theme picks the green, through the circle's own fill. This dot is the
|
|
370
|
+
ONLY graphic for "a process is running here", so WCAG 1.4.11's 3:1 applies:
|
|
371
|
+
color1 is md-green-700 on the light theme and md-green-500 on the dark one,
|
|
372
|
+
measuring 4.11:1 on white and 5.79:1 on the dark row. color0 clears the bar
|
|
373
|
+
too and was used before, but on the light theme it is md-green-900 - dark
|
|
374
|
+
enough at 8px to read as a near-black mark rather than a green light, which
|
|
375
|
+
is the whole of what the dot has to say (DEF-PANE-174). */
|
|
376
|
+
.jp-AiAssistantsPanel-dotGlyph {
|
|
377
|
+
fill: var(--jp-success-color1);
|
|
363
378
|
}
|
|
364
379
|
|
|
365
380
|
.jp-AiAssistantsPanel-dotPlaceholder {
|