@workbench-kit/shell-react 0.0.2-prototype.0.2.6 → 0.0.2-prototype.0.2.8
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/README.md +41 -0
- package/package.json +9 -9
- package/src/{chat-ai-mock-proposals.ts → chat/ai-mock-proposals.ts} +39 -39
- package/src/{chat-command-input.ts → chat/command-input.ts} +52 -52
- package/src/{chat-command-policy.ts → chat/command-policy.ts} +54 -54
- package/src/{chat-command-surface.tsx → chat/command-surface.tsx} +155 -155
- package/src/{use-workbench-chat-command-proposals.ts → chat/use-chat-command-proposals.ts} +194 -194
- package/src/{chat-view-data.ts → chat/view-data.ts} +20 -20
- package/src/{chat-view.tsx → chat/view.tsx} +220 -220
- package/src/{command-inspector-surface.tsx → commands/inspector-surface.tsx} +46 -46
- package/src/{use-workbench-command-descriptors.ts → commands/use-command-descriptors.ts} +41 -41
- package/src/{use-context-key-revision.ts → commands/use-context-key-revision.ts} +18 -18
- package/src/{commands-view-data.ts → commands/view-data.ts} +17 -17
- package/src/{commands-view.tsx → commands/view.tsx} +43 -43
- package/src/devtools/WorkbenchDevtoolsPanel.tsx +124 -124
- package/src/devtools/WorkbenchDevtoolsShell.tsx +17 -17
- package/src/devtools/index.ts +11 -11
- package/src/devtools/use-workbench-devtools-snapshot.ts +84 -84
- package/src/devtools/workbench-devtools-snapshot.ts +140 -140
- package/src/devtools/workbench-devtools.css +82 -82
- package/src/{editor-area-dnd.ts → editor/area-dnd.ts} +69 -69
- package/src/{editor-area-model.ts → editor/area-model.ts} +71 -71
- package/src/{editor-area.css → editor/area.css} +454 -454
- package/src/{editor-area.tsx → editor/area.tsx} +676 -676
- package/src/{editor-host-surface.tsx → editor/host-surface.tsx} +631 -634
- package/src/{editor-pane-visibility.ts → editor/pane-visibility.ts} +130 -130
- package/src/{editor-resource.ts → editor/resource.ts} +36 -36
- package/src/{editor-state-storage.ts → editor/state-storage.ts} +182 -193
- package/src/{editor-tab-context-menu.ts → editor/tab-context-menu.ts} +118 -118
- package/src/{use-editor.ts → editor/use-editor.ts} +114 -107
- package/src/{editor-view-providers.tsx → editor/view-providers.tsx} +552 -552
- package/src/{editor-workspace-file-availability.ts → editor/workspace-file-availability.ts} +15 -15
- package/src/{editor-workspace-reconcile.tsx → editor/workspace-reconcile.tsx} +31 -28
- package/src/{explorer-context-menu.ts → explorer/context-menu.ts} +114 -114
- package/src/{createCommandWorkspaceExplorerPort.ts → explorer/create-command-workspace-explorer-port.ts} +86 -86
- package/src/{explorer-reveal.ts → explorer/reveal.ts} +112 -112
- package/src/{search-view-data.ts → explorer/search-view-data.ts} +15 -15
- package/src/{search-view.tsx → explorer/search-view.tsx} +65 -62
- package/src/{use-active-workspace-path.ts → explorer/use-active-workspace-path.ts} +15 -15
- package/src/{explorer-view-data.ts → explorer/view-data.ts} +58 -58
- package/src/{explorer-view.tsx → explorer/view.tsx} +227 -224
- package/src/{extension-context-menu.ts → extensions/context-menu.ts} +52 -52
- package/src/{extension-management-model.ts → extensions/management-model.ts} +313 -313
- package/src/{use-extension-management.ts → extensions/use-extension-management.ts} +241 -193
- package/src/{extensions-view-data.ts → extensions/view-data.ts} +19 -19
- package/src/{extensions-view.tsx → extensions/view.tsx} +63 -38
- package/src/{field-remap-demo.tsx → field-remap/demo.tsx} +18 -18
- package/src/{field-remap-editor-surface.tsx → field-remap/editor-surface.tsx} +36 -36
- package/src/{field-remap-flow-adapter.ts → field-remap/flow-adapter.ts} +240 -240
- package/src/{field-remap-flow.tsx → field-remap/flow.tsx} +369 -369
- package/src/{field-remap-graph.tsx → field-remap/graph.tsx} +559 -559
- package/src/field-remap/jsonata-transform.ts +166 -0
- package/src/{field-remap-panel.tsx → field-remap/panel.tsx} +193 -175
- package/src/{field-remap-samples.ts → field-remap/samples.ts} +352 -352
- package/src/{table-mapping-adapter.ts → field-remap/table-mapping-adapter.ts} +59 -59
- package/src/{field-remap-tree.tsx → field-remap/tree.tsx} +404 -404
- package/src/{field-remap-view-data.ts → field-remap/view-data.ts} +16 -16
- package/src/{field-remap-view.css → field-remap/view.css} +676 -676
- package/src/{field-remap-view.tsx → field-remap/view.tsx} +86 -86
- package/src/index.ts +212 -199
- package/src/{json-form-source-patch.ts → jdw/json-form-source-patch.ts} +323 -323
- package/src/{jdw-lab-view-data.ts → jdw/lab-view-data.ts} +25 -25
- package/src/{jdw-lab-view.css → jdw/lab-view.css} +21 -21
- package/src/{jdw-lab-view.tsx → jdw/lab-view.tsx} +79 -79
- package/src/{jdw-widget-form-view.tsx → jdw/widget-form-view.tsx} +68 -65
- package/src/{jdw-widget-preview-view.tsx → jdw/widget-preview-view.tsx} +54 -51
- package/src/{keybinding-overrides-storage.ts → management/keybinding-overrides-storage.ts} +49 -57
- package/src/{keybinding-management-settings.tsx → management/keybinding-settings.tsx} +16 -16
- package/src/{management-palette-commands.ts → management/palette-commands.ts} +38 -38
- package/src/{preference-settings-storage.ts → management/preference-settings-storage.ts} +50 -58
- package/src/{management-settings-ids.ts → management/settings-ids.ts} +12 -12
- package/src/{management-settings.tsx → management/settings.tsx} +96 -75
- package/src/{use-command-management.ts → management/use-command-management.ts} +191 -191
- package/src/{use-keybinding-management.ts → management/use-keybinding-management.ts} +130 -130
- package/src/{shell-model.tsx → shell/model.tsx} +149 -149
- package/src/{provider.tsx → shell/provider.tsx} +603 -573
- package/src/{shell-secondary-actions.tsx → shell/secondary-actions.tsx} +59 -59
- package/src/{shell-settings-constants.ts → shell/settings-constants.ts} +9 -9
- package/src/{shell-settings.tsx → shell/settings.tsx} +599 -599
- package/src/{shell.tsx → shell/shell.tsx} +680 -649
- package/src/{shell-titlebar-layout-controls.tsx → shell/titlebar-layout-controls.tsx} +4 -4
- package/src/{shell-view-host.tsx → shell/view-host.tsx} +212 -199
- package/src/{workbench-appearance-storage.ts → workbench/appearance-storage.ts} +107 -115
- package/src/{workbench-command-host.tsx → workbench/command-host.tsx} +243 -243
- package/src/{workbench-command-palette.ts → workbench/command-palette.ts} +208 -208
- package/src/{workbench-keybinding-bridge.ts → workbench/keybinding-bridge.ts} +54 -54
- package/src/{workbench-layout-storage.ts → workbench/layout-storage.ts} +134 -145
- package/src/{workbench-profile-modal.tsx → workbench/profile-modal.tsx} +118 -118
- package/src/{workbench-shell-command-registration.ts → workbench/shell-command-registration.ts} +58 -58
- package/src/{workbench-startup-gate.tsx → workbench/startup-gate.tsx} +136 -136
- package/src/{workbench-status-sections.ts → workbench/status-sections.ts} +43 -43
- package/src/{use-persisted-workbench-appearance.ts → workbench/use-persisted-appearance.ts} +33 -33
- package/src/{workbench-user-commands.ts → workbench/user-commands.ts} +46 -46
- package/src/{workspace-view-state.ts → workbench/workspace-view-state.ts} +35 -35
- package/src/jsonata-transform.ts +0 -36
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import type { WorkbenchCommandDescriptor } from '@workbench-kit/react/workbench';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
MANAGE_ACCOUNTS_COMMAND_ID,
|
|
5
|
-
MANAGE_COMMANDS_COMMAND_ID,
|
|
6
|
-
MANAGE_EXTENSIONS_COMMAND_ID,
|
|
7
|
-
MANAGE_KEYBINDINGS_COMMAND_ID,
|
|
8
|
-
} from './
|
|
9
|
-
|
|
10
|
-
/** Pure helper — kept out of React component modules for Fast Refresh. */
|
|
11
|
-
export function createWorkbenchManagementPaletteCommands(): readonly WorkbenchCommandDescriptor[] {
|
|
12
|
-
return [
|
|
13
|
-
{
|
|
14
|
-
category: 'Workbench',
|
|
15
|
-
icon: 'codicon-terminal',
|
|
16
|
-
id: MANAGE_COMMANDS_COMMAND_ID,
|
|
17
|
-
label: 'Manage Commands',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
category: 'Workbench',
|
|
21
|
-
icon: 'codicon-keyboard',
|
|
22
|
-
id: MANAGE_KEYBINDINGS_COMMAND_ID,
|
|
23
|
-
label: 'Keyboard Shortcuts',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
category: 'Workbench',
|
|
27
|
-
icon: 'codicon-extensions',
|
|
28
|
-
id: MANAGE_EXTENSIONS_COMMAND_ID,
|
|
29
|
-
label: 'Extensions',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
category: 'Accounts',
|
|
33
|
-
icon: 'codicon-account',
|
|
34
|
-
id: MANAGE_ACCOUNTS_COMMAND_ID,
|
|
35
|
-
label: 'Manage Linked Accounts',
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
}
|
|
1
|
+
import type { WorkbenchCommandDescriptor } from '@workbench-kit/react/workbench';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
MANAGE_ACCOUNTS_COMMAND_ID,
|
|
5
|
+
MANAGE_COMMANDS_COMMAND_ID,
|
|
6
|
+
MANAGE_EXTENSIONS_COMMAND_ID,
|
|
7
|
+
MANAGE_KEYBINDINGS_COMMAND_ID,
|
|
8
|
+
} from './settings-ids.js';
|
|
9
|
+
|
|
10
|
+
/** Pure helper — kept out of React component modules for Fast Refresh. */
|
|
11
|
+
export function createWorkbenchManagementPaletteCommands(): readonly WorkbenchCommandDescriptor[] {
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
category: 'Workbench',
|
|
15
|
+
icon: 'codicon-terminal',
|
|
16
|
+
id: MANAGE_COMMANDS_COMMAND_ID,
|
|
17
|
+
label: 'Manage Commands',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
category: 'Workbench',
|
|
21
|
+
icon: 'codicon-keyboard',
|
|
22
|
+
id: MANAGE_KEYBINDINGS_COMMAND_ID,
|
|
23
|
+
label: 'Keyboard Shortcuts',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
category: 'Workbench',
|
|
27
|
+
icon: 'codicon-extensions',
|
|
28
|
+
id: MANAGE_EXTENSIONS_COMMAND_ID,
|
|
29
|
+
label: 'Extensions',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
category: 'Accounts',
|
|
33
|
+
icon: 'codicon-account',
|
|
34
|
+
id: MANAGE_ACCOUNTS_COMMAND_ID,
|
|
35
|
+
label: 'Manage Linked Accounts',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
}
|
|
@@ -1,58 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseWorkbenchSettingsConfig,
|
|
3
|
-
type WorkbenchSettingsConfig,
|
|
4
|
-
} from '@workbench-kit/workbench-config';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function readPersistedLocalPreferences(
|
|
19
|
-
storageKey = DEFAULT_WORKBENCH_LOCAL_PREFERENCE_STORAGE_KEY,
|
|
20
|
-
storage?: WorkbenchStorageReader,
|
|
21
|
-
): WorkbenchSettingsConfig {
|
|
22
|
-
const resolvedStorage = storage ??
|
|
23
|
-
if (!resolvedStorage) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
const raw = resolvedStorage.getItem(storageKey);
|
|
29
|
-
if (!raw) {
|
|
30
|
-
return {};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return parseWorkbenchSettingsConfig(JSON.parse(raw) as unknown);
|
|
34
|
-
} catch {
|
|
35
|
-
return {};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function writePersistedLocalPreferences(
|
|
40
|
-
values: WorkbenchSettingsConfig,
|
|
41
|
-
storageKey = DEFAULT_WORKBENCH_LOCAL_PREFERENCE_STORAGE_KEY,
|
|
42
|
-
storage?: WorkbenchStorageWriter,
|
|
43
|
-
): void {
|
|
44
|
-
const resolvedStorage = storage ??
|
|
45
|
-
if (!resolvedStorage) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
resolvedStorage.setItem(storageKey, JSON.stringify(values, null, 2));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function getBrowserLocalStorage(): (WorkbenchStorageReader & WorkbenchStorageWriter) | undefined {
|
|
53
|
-
try {
|
|
54
|
-
return globalThis.localStorage;
|
|
55
|
-
} catch {
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
parseWorkbenchSettingsConfig,
|
|
3
|
+
type WorkbenchSettingsConfig,
|
|
4
|
+
} from '@workbench-kit/workbench-config';
|
|
5
|
+
import {
|
|
6
|
+
createBrowserWorkbenchStorage,
|
|
7
|
+
type WorkbenchStorageReader,
|
|
8
|
+
type WorkbenchStorageWriter,
|
|
9
|
+
} from '@workbench-kit/workbench-core';
|
|
10
|
+
|
|
11
|
+
export const DEFAULT_WORKBENCH_LOCAL_PREFERENCE_STORAGE_KEY =
|
|
12
|
+
'workbench-kit/.workbench/settings.local';
|
|
13
|
+
|
|
14
|
+
export function isWorkbenchLocalPreferencePersistenceAvailable(): boolean {
|
|
15
|
+
return createBrowserWorkbenchStorage({ kind: 'local' }) !== undefined;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function readPersistedLocalPreferences(
|
|
19
|
+
storageKey = DEFAULT_WORKBENCH_LOCAL_PREFERENCE_STORAGE_KEY,
|
|
20
|
+
storage?: WorkbenchStorageReader,
|
|
21
|
+
): WorkbenchSettingsConfig {
|
|
22
|
+
const resolvedStorage = storage ?? createBrowserWorkbenchStorage({ kind: 'local' });
|
|
23
|
+
if (!resolvedStorage) {
|
|
24
|
+
return {};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const raw = resolvedStorage.getItem(storageKey);
|
|
29
|
+
if (!raw) {
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return parseWorkbenchSettingsConfig(JSON.parse(raw) as unknown);
|
|
34
|
+
} catch {
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function writePersistedLocalPreferences(
|
|
40
|
+
values: WorkbenchSettingsConfig,
|
|
41
|
+
storageKey = DEFAULT_WORKBENCH_LOCAL_PREFERENCE_STORAGE_KEY,
|
|
42
|
+
storage?: WorkbenchStorageWriter,
|
|
43
|
+
): void {
|
|
44
|
+
const resolvedStorage = storage ?? createBrowserWorkbenchStorage({ kind: 'local' });
|
|
45
|
+
if (!resolvedStorage) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
resolvedStorage.setItem(storageKey, JSON.stringify(values, null, 2));
|
|
50
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export const WORKBENCH_COMMANDS_SETTINGS_CATEGORY_ID =
|
|
2
|
-
'workbench-kit.shell.command-management' as const;
|
|
3
|
-
export const WORKBENCH_KEYBINDINGS_SETTINGS_CATEGORY_ID =
|
|
4
|
-
'workbench-kit.shell.keybinding-management' as const;
|
|
5
|
-
export const WORKBENCH_ACCOUNTS_SETTINGS_CATEGORY_ID =
|
|
6
|
-
'workbench-kit.shell.account-management' as const;
|
|
7
|
-
export const WORKBENCH_EXTENSIONS_SETTINGS_CATEGORY_ID =
|
|
8
|
-
'workbench-kit.shell.extension-management' as const;
|
|
9
|
-
export const MANAGE_COMMANDS_COMMAND_ID = 'workbench-kit.shell.commands.manage' as const;
|
|
10
|
-
export const MANAGE_KEYBINDINGS_COMMAND_ID = 'workbench-kit.shell.keybindings.manage' as const;
|
|
11
|
-
export const MANAGE_EXTENSIONS_COMMAND_ID = 'workbench-kit.shell.extensions.manage' as const;
|
|
12
|
-
export const MANAGE_ACCOUNTS_COMMAND_ID = 'workbench-kit.builtin.accounts.manage' as const;
|
|
1
|
+
export const WORKBENCH_COMMANDS_SETTINGS_CATEGORY_ID =
|
|
2
|
+
'workbench-kit.shell.command-management' as const;
|
|
3
|
+
export const WORKBENCH_KEYBINDINGS_SETTINGS_CATEGORY_ID =
|
|
4
|
+
'workbench-kit.shell.keybinding-management' as const;
|
|
5
|
+
export const WORKBENCH_ACCOUNTS_SETTINGS_CATEGORY_ID =
|
|
6
|
+
'workbench-kit.shell.account-management' as const;
|
|
7
|
+
export const WORKBENCH_EXTENSIONS_SETTINGS_CATEGORY_ID =
|
|
8
|
+
'workbench-kit.shell.extension-management' as const;
|
|
9
|
+
export const MANAGE_COMMANDS_COMMAND_ID = 'workbench-kit.shell.commands.manage' as const;
|
|
10
|
+
export const MANAGE_KEYBINDINGS_COMMAND_ID = 'workbench-kit.shell.keybindings.manage' as const;
|
|
11
|
+
export const MANAGE_EXTENSIONS_COMMAND_ID = 'workbench-kit.shell.extensions.manage' as const;
|
|
12
|
+
export const MANAGE_ACCOUNTS_COMMAND_ID = 'workbench-kit.builtin.accounts.manage' as const;
|
|
@@ -1,75 +1,96 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
AccountManagementPanel,
|
|
4
|
+
CommandManagementPanel,
|
|
5
|
+
ExtensionManagementPanel,
|
|
6
|
+
type AccountManagementEntry,
|
|
7
|
+
} from '@workbench-kit/react/workbench/management';
|
|
8
|
+
import {
|
|
9
|
+
isExtensionInstallTrusted,
|
|
10
|
+
type ExtensionCatalogTrustPolicy,
|
|
11
|
+
} from '@workbench-kit/workbench-core';
|
|
12
|
+
|
|
13
|
+
import { useCommandManagementModel } from './use-command-management.js';
|
|
14
|
+
import { useExtensionManagementModel } from '../extensions/use-extension-management.js';
|
|
15
|
+
import { WorkbenchKeybindingManagementSettings } from './keybinding-settings.js';
|
|
16
|
+
|
|
17
|
+
export { WorkbenchKeybindingManagementSettings };
|
|
18
|
+
|
|
19
|
+
export interface WorkbenchAccountManagementInput {
|
|
20
|
+
accounts: readonly AccountManagementEntry[];
|
|
21
|
+
activeAccountId?: string | undefined;
|
|
22
|
+
automationHint?: string | undefined;
|
|
23
|
+
emptyLabel?: string | undefined;
|
|
24
|
+
onSignOut?: ((accountId: string) => void) | undefined;
|
|
25
|
+
sessionLabel?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Component-only module so Vite Fast Refresh can accept this boundary. */
|
|
29
|
+
export function WorkbenchCommandManagementSettings() {
|
|
30
|
+
const { groups, lastRun, runCommand, totalCount } = useCommandManagementModel();
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<CommandManagementPanel
|
|
34
|
+
groups={groups}
|
|
35
|
+
lastRun={lastRun}
|
|
36
|
+
summaryLabel={`${totalCount} registered command${totalCount === 1 ? '' : 's'} · auto-updated from extensions`}
|
|
37
|
+
onRunCommand={runCommand}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function WorkbenchExtensionManagementSettings({
|
|
43
|
+
catalogTrustPolicy,
|
|
44
|
+
catalogUrl,
|
|
45
|
+
}: {
|
|
46
|
+
catalogTrustPolicy?: ExtensionCatalogTrustPolicy | undefined;
|
|
47
|
+
catalogUrl?: string | undefined;
|
|
48
|
+
}) {
|
|
49
|
+
const {
|
|
50
|
+
browseEntries,
|
|
51
|
+
catalogError,
|
|
52
|
+
catalogLoading,
|
|
53
|
+
installCatalogEntry,
|
|
54
|
+
installedEntries,
|
|
55
|
+
installTrustRecords,
|
|
56
|
+
rememberInstallTrust,
|
|
57
|
+
toggleInstalledEntry,
|
|
58
|
+
} = useExtensionManagementModel({ catalogTrustPolicy, catalogUrl });
|
|
59
|
+
|
|
60
|
+
const isInstallTrusted = useCallback(
|
|
61
|
+
(entry: (typeof browseEntries)[number]) =>
|
|
62
|
+
isExtensionInstallTrusted(
|
|
63
|
+
entry.id,
|
|
64
|
+
entry.installPlan?.permissions ?? [],
|
|
65
|
+
installTrustRecords,
|
|
66
|
+
),
|
|
67
|
+
[installTrustRecords],
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<ExtensionManagementPanel
|
|
72
|
+
browseEntries={browseEntries}
|
|
73
|
+
catalogError={catalogError}
|
|
74
|
+
catalogLoading={catalogLoading}
|
|
75
|
+
installedEntries={installedEntries}
|
|
76
|
+
isInstallTrusted={isInstallTrusted}
|
|
77
|
+
onInstall={installCatalogEntry}
|
|
78
|
+
onRememberInstallTrust={rememberInstallTrust}
|
|
79
|
+
onToggleEnabled={toggleInstalledEntry}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function WorkbenchAccountManagementSettings({
|
|
85
|
+
accountManagement,
|
|
86
|
+
}: {
|
|
87
|
+
accountManagement: WorkbenchAccountManagementInput;
|
|
88
|
+
}) {
|
|
89
|
+
return (
|
|
90
|
+
<AccountManagementPanel
|
|
91
|
+
automationHint="Linked accounts are project integrations exposed by extensions or host providers. Your Workbench service profile is managed from the profile menu."
|
|
92
|
+
emptyLabel="No linked project accounts are configured."
|
|
93
|
+
{...accountManagement}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
}
|