jupyterlab_ai_code_assistants_extension 1.0.25 → 1.0.27
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/panel.js +10 -18
- package/package.json +1 -1
- package/src/__tests__/panel.spec.ts +2 -2
- package/src/core/panel.ts +10 -19
package/lib/core/panel.js
CHANGED
|
@@ -252,23 +252,15 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
252
252
|
header.appendChild(title);
|
|
253
253
|
const newBtn = document.createElement('button');
|
|
254
254
|
newBtn.className = 'jp-AiAssistantsPanel-iconButton';
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
//
|
|
258
|
-
//
|
|
259
|
-
//
|
|
255
|
+
// The title is a static string - the folder is deliberately NOT named
|
|
256
|
+
// (a path five levels deep makes a tooltip unreadable) and nor is the
|
|
257
|
+
// provider (the panel's own tab says which assistant this is) - plus the
|
|
258
|
+
// armed-mode suffix: with a mode in force the variants suppress themselves
|
|
259
|
+
// and this button LAUNCHES on click instead of dropping a menu, so without
|
|
260
|
+
// the suffix the one surface that starts an approval-free session is the
|
|
261
|
+
// only one that never says so (DEF-36, DEF-113, DEF-114).
|
|
260
262
|
const nameNewButton = () => {
|
|
261
|
-
|
|
262
|
-
// would read as "in .".
|
|
263
|
-
const shown = this._displayPath(this._currentFolder());
|
|
264
|
-
const where = shown && shown !== '.' ? shown : 'the current folder';
|
|
265
|
-
// The suffix, because with a mode in force the variants suppress
|
|
266
|
-
// themselves and this button LAUNCHES on click instead of dropping a
|
|
267
|
-
// menu - so without it the one surface that starts an approval-free
|
|
268
|
-
// session is the only one that never says so (DEF-36). The provider's
|
|
269
|
-
// name is deliberately absent - the panel's own tab already says which
|
|
270
|
-
// assistant this is (DEF-113).
|
|
271
|
-
newBtn.title = `New session in ${where}${this._variantSuffix()}`;
|
|
263
|
+
newBtn.title = `New session in current folder${this._variantSuffix()}`;
|
|
272
264
|
};
|
|
273
265
|
// Focus as well as hover, or the icon-only button's accessible name is the
|
|
274
266
|
// generic one for everybody not using a mouse.
|
|
@@ -1727,7 +1719,7 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
1727
1719
|
}
|
|
1728
1720
|
});
|
|
1729
1721
|
this._commands.addCommand(this._cmd(`new-session-${mode.id}`), {
|
|
1730
|
-
label: `New
|
|
1722
|
+
label: `New session (${mode.menuLabel})`,
|
|
1731
1723
|
icon: shieldIcon,
|
|
1732
1724
|
isVisible: () => !this._buildsSameLaunch(mode),
|
|
1733
1725
|
execute: () => void this._newSession(mode.id)
|
|
@@ -1912,7 +1904,7 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
1912
1904
|
}
|
|
1913
1905
|
});
|
|
1914
1906
|
this._commands.addCommand(this._cmd('new-session'), {
|
|
1915
|
-
label: () => `New ${this.
|
|
1907
|
+
label: () => `New session${this._variantSuffix()}`,
|
|
1916
1908
|
icon: () => this._variantIcon(),
|
|
1917
1909
|
execute: () => void this._newSession()
|
|
1918
1910
|
});
|
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.27",
|
|
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",
|
|
@@ -260,7 +260,7 @@ describe('the + button names and marks the launch it performs', () => {
|
|
|
260
260
|
// does. DEF-38 below is the other half.
|
|
261
261
|
newBtn().dispatchEvent(new Event('pointerenter'));
|
|
262
262
|
expect(newBtn().title).toEqual(
|
|
263
|
-
'New session in
|
|
263
|
+
'New session in current folder (Skip Permissions)'
|
|
264
264
|
);
|
|
265
265
|
});
|
|
266
266
|
|
|
@@ -269,7 +269,7 @@ describe('the + button names and marks the launch it performs', () => {
|
|
|
269
269
|
// only ever read "no mode in force". No pointerenter and no focus is
|
|
270
270
|
// dispatched anywhere in this test - the only thing that may rewrite the
|
|
271
271
|
// title is `setModes` itself.
|
|
272
|
-
expect(newBtn().title).toEqual('New session in
|
|
272
|
+
expect(newBtn().title).toEqual('New session in current folder');
|
|
273
273
|
panel.setModes({ skip: true });
|
|
274
274
|
expect(newBtn().title).toContain('(Skip Permissions)');
|
|
275
275
|
panel.setModes({ skip: false });
|
package/src/core/panel.ts
CHANGED
|
@@ -316,23 +316,15 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
316
316
|
|
|
317
317
|
const newBtn = document.createElement('button');
|
|
318
318
|
newBtn.className = 'jp-AiAssistantsPanel-iconButton';
|
|
319
|
-
//
|
|
320
|
-
//
|
|
321
|
-
//
|
|
322
|
-
//
|
|
323
|
-
//
|
|
319
|
+
// The title is a static string - the folder is deliberately NOT named
|
|
320
|
+
// (a path five levels deep makes a tooltip unreadable) and nor is the
|
|
321
|
+
// provider (the panel's own tab says which assistant this is) - plus the
|
|
322
|
+
// armed-mode suffix: with a mode in force the variants suppress themselves
|
|
323
|
+
// and this button LAUNCHES on click instead of dropping a menu, so without
|
|
324
|
+
// the suffix the one surface that starts an approval-free session is the
|
|
325
|
+
// only one that never says so (DEF-36, DEF-113, DEF-114).
|
|
324
326
|
const nameNewButton = (): void => {
|
|
325
|
-
|
|
326
|
-
// would read as "in .".
|
|
327
|
-
const shown = this._displayPath(this._currentFolder());
|
|
328
|
-
const where = shown && shown !== '.' ? shown : 'the current folder';
|
|
329
|
-
// The suffix, because with a mode in force the variants suppress
|
|
330
|
-
// themselves and this button LAUNCHES on click instead of dropping a
|
|
331
|
-
// menu - so without it the one surface that starts an approval-free
|
|
332
|
-
// session is the only one that never says so (DEF-36). The provider's
|
|
333
|
-
// name is deliberately absent - the panel's own tab already says which
|
|
334
|
-
// assistant this is (DEF-113).
|
|
335
|
-
newBtn.title = `New session in ${where}${this._variantSuffix()}`;
|
|
327
|
+
newBtn.title = `New session in current folder${this._variantSuffix()}`;
|
|
336
328
|
};
|
|
337
329
|
// Focus as well as hover, or the icon-only button's accessible name is the
|
|
338
330
|
// generic one for everybody not using a mouse.
|
|
@@ -2036,7 +2028,7 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
2036
2028
|
}
|
|
2037
2029
|
});
|
|
2038
2030
|
this._commands.addCommand(this._cmd(`new-session-${mode.id}`), {
|
|
2039
|
-
label: `New
|
|
2031
|
+
label: `New session (${mode.menuLabel})`,
|
|
2040
2032
|
icon: shieldIcon,
|
|
2041
2033
|
isVisible: () => !this._buildsSameLaunch(mode),
|
|
2042
2034
|
execute: () => void this._newSession(mode.id)
|
|
@@ -2248,8 +2240,7 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
2248
2240
|
});
|
|
2249
2241
|
|
|
2250
2242
|
this._commands.addCommand(this._cmd('new-session'), {
|
|
2251
|
-
label: () =>
|
|
2252
|
-
`New ${this._descriptor.label} Session${this._variantSuffix()}`,
|
|
2243
|
+
label: () => `New session${this._variantSuffix()}`,
|
|
2253
2244
|
icon: () => this._variantIcon(),
|
|
2254
2245
|
execute: () => void this._newSession()
|
|
2255
2246
|
});
|