jupyterlab_ai_code_assistants_extension 1.0.23 → 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 -16
- package/package.json +1 -1
- package/src/__tests__/panel.spec.ts +2 -2
- package/src/core/panel.ts +10 -17
package/lib/core/panel.js
CHANGED
|
@@ -252,21 +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).
|
|
269
|
-
newBtn.title = `New ${this._descriptor.label} session in ${where}${this._variantSuffix()}`;
|
|
263
|
+
newBtn.title = `New session in current folder${this._variantSuffix()}`;
|
|
270
264
|
};
|
|
271
265
|
// Focus as well as hover, or the icon-only button's accessible name is the
|
|
272
266
|
// generic one for everybody not using a mouse.
|
|
@@ -1725,7 +1719,7 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
1725
1719
|
}
|
|
1726
1720
|
});
|
|
1727
1721
|
this._commands.addCommand(this._cmd(`new-session-${mode.id}`), {
|
|
1728
|
-
label: `New
|
|
1722
|
+
label: `New session (${mode.menuLabel})`,
|
|
1729
1723
|
icon: shieldIcon,
|
|
1730
1724
|
isVisible: () => !this._buildsSameLaunch(mode),
|
|
1731
1725
|
execute: () => void this._newSession(mode.id)
|
|
@@ -1910,7 +1904,7 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
1910
1904
|
}
|
|
1911
1905
|
});
|
|
1912
1906
|
this._commands.addCommand(this._cmd('new-session'), {
|
|
1913
|
-
label: () => `New ${this.
|
|
1907
|
+
label: () => `New session${this._variantSuffix()}`,
|
|
1914
1908
|
icon: () => this._variantIcon(),
|
|
1915
1909
|
execute: () => void this._newSession()
|
|
1916
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
|
|
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
|
|
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,21 +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).
|
|
333
|
-
newBtn.title = `New ${this._descriptor.label} session in ${where}${this._variantSuffix()}`;
|
|
327
|
+
newBtn.title = `New session in current folder${this._variantSuffix()}`;
|
|
334
328
|
};
|
|
335
329
|
// Focus as well as hover, or the icon-only button's accessible name is the
|
|
336
330
|
// generic one for everybody not using a mouse.
|
|
@@ -2034,7 +2028,7 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
2034
2028
|
}
|
|
2035
2029
|
});
|
|
2036
2030
|
this._commands.addCommand(this._cmd(`new-session-${mode.id}`), {
|
|
2037
|
-
label: `New
|
|
2031
|
+
label: `New session (${mode.menuLabel})`,
|
|
2038
2032
|
icon: shieldIcon,
|
|
2039
2033
|
isVisible: () => !this._buildsSameLaunch(mode),
|
|
2040
2034
|
execute: () => void this._newSession(mode.id)
|
|
@@ -2246,8 +2240,7 @@ export class AssistantSessionsPanel extends Widget {
|
|
|
2246
2240
|
});
|
|
2247
2241
|
|
|
2248
2242
|
this._commands.addCommand(this._cmd('new-session'), {
|
|
2249
|
-
label: () =>
|
|
2250
|
-
`New ${this._descriptor.label} Session${this._variantSuffix()}`,
|
|
2243
|
+
label: () => `New session${this._variantSuffix()}`,
|
|
2251
2244
|
icon: () => this._variantIcon(),
|
|
2252
2245
|
execute: () => void this._newSession()
|
|
2253
2246
|
});
|