@workbench-kit/adapters 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/package.json +10 -10
- package/src/{workbench-demo-config.ts → demo/workbench-demo-config.ts} +68 -68
- package/src/{workbench-demo.ts → demo/workbench-demo.ts} +271 -271
- package/src/index.ts +8 -8
- package/src/{library.ts → library/library.ts} +145 -145
- package/src/{persistence.ts → persistence/persistence.ts} +26 -26
- package/src/{runtime.ts → runtime/runtime.ts} +97 -97
- package/src/{widget-studio-asset-package.ts → widget-studio/widget-studio-asset-package.ts} +65 -65
- package/src/{widget-studio-assets.ts → widget-studio/widget-studio-assets.ts} +328 -328
- package/src/{workspace.ts → workspace/workspace.ts} +126 -126
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workbench-kit/adapters",
|
|
3
|
-
"version": "0.0.2-prototype.0.2.
|
|
3
|
+
"version": "0.0.2-prototype.0.2.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.ts",
|
|
8
|
-
"./library": "./src/library.ts",
|
|
9
|
-
"./runtime": "./src/runtime.ts",
|
|
10
|
-
"./workspace": "./src/workspace.ts",
|
|
11
|
-
"./workbench-demo": "./src/workbench-demo.ts",
|
|
12
|
-
"./workbench-demo-config": "./src/workbench-demo-config.ts",
|
|
13
|
-
"./persistence": "./src/persistence.ts"
|
|
8
|
+
"./library": "./src/library/library.ts",
|
|
9
|
+
"./runtime": "./src/runtime/runtime.ts",
|
|
10
|
+
"./workspace": "./src/workspace/workspace.ts",
|
|
11
|
+
"./workbench-demo": "./src/demo/workbench-demo.ts",
|
|
12
|
+
"./workbench-demo-config": "./src/demo/workbench-demo-config.ts",
|
|
13
|
+
"./persistence": "./src/persistence/persistence.ts"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"src",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"!src/**/*.stories.tsx"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@workbench-kit/
|
|
24
|
-
"@workbench-kit/
|
|
25
|
-
"@workbench-kit/workspace": "0.0.2-prototype.0.2.
|
|
23
|
+
"@workbench-kit/runtime": "0.0.2-prototype.0.2.8",
|
|
24
|
+
"@workbench-kit/contracts": "0.0.2-prototype.0.2.8",
|
|
25
|
+
"@workbench-kit/workspace": "0.0.2-prototype.0.2.8"
|
|
26
26
|
},
|
|
27
27
|
"description": "Workbench Kit adapters for workspace repositories and runtime transports.",
|
|
28
28
|
"publishConfig": {
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import type { RuntimeStatus } from '@workbench-kit/runtime';
|
|
2
|
-
|
|
3
|
-
export type IntegratedShellActivityId = 'explorer' | 'search' | 'chatting' | 'aiChat';
|
|
4
|
-
|
|
5
|
-
export const integratedShellActivityOrder: IntegratedShellActivityId[] = [
|
|
6
|
-
'explorer',
|
|
7
|
-
'search',
|
|
8
|
-
'chatting',
|
|
9
|
-
'aiChat',
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
export const integratedShellActivityLabels: Record<IntegratedShellActivityId, string> = {
|
|
13
|
-
explorer: 'Explorer',
|
|
14
|
-
search: 'Search',
|
|
15
|
-
chatting: 'Chat',
|
|
16
|
-
aiChat: 'AI Chat',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const integratedShellActivityIcons: Record<IntegratedShellActivityId, string> = {
|
|
20
|
-
explorer: 'codicon-files',
|
|
21
|
-
search: 'codicon-search',
|
|
22
|
-
chatting: 'codicon-comment-discussion',
|
|
23
|
-
aiChat: 'codicon-sparkle',
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const integratedShellCommandActivities = integratedShellActivityOrder.map((id) => ({
|
|
27
|
-
id,
|
|
28
|
-
label: integratedShellActivityLabels[id],
|
|
29
|
-
icon: integratedShellActivityIcons[id],
|
|
30
|
-
}));
|
|
31
|
-
|
|
32
|
-
export function isIntegratedShellActivityId(id: string): id is IntegratedShellActivityId {
|
|
33
|
-
return id === 'explorer' || id === 'search' || id === 'chatting' || id === 'aiChat';
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface IntegratedShellBootstrapInitialState {
|
|
37
|
-
activeActivityId: IntegratedShellActivityId;
|
|
38
|
-
isPrimarySidebarVisible: boolean;
|
|
39
|
-
primarySidebarSizePx: number;
|
|
40
|
-
primarySidebarMinPx: number;
|
|
41
|
-
primarySidebarMaxPx: number;
|
|
42
|
-
settingsCategoryId: string;
|
|
43
|
-
settingsScopeId: string;
|
|
44
|
-
theme: 'dark' | 'light';
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function createIntegratedShellBootstrapInitialState(
|
|
48
|
-
overrides: Partial<IntegratedShellBootstrapInitialState> = {},
|
|
49
|
-
): IntegratedShellBootstrapInitialState {
|
|
50
|
-
return {
|
|
51
|
-
activeActivityId: 'explorer',
|
|
52
|
-
isPrimarySidebarVisible: true,
|
|
53
|
-
primarySidebarSizePx: 260,
|
|
54
|
-
primarySidebarMinPx: 200,
|
|
55
|
-
primarySidebarMaxPx: 480,
|
|
56
|
-
settingsCategoryId: 'appearance',
|
|
57
|
-
settingsScopeId: 'user',
|
|
58
|
-
theme: 'dark',
|
|
59
|
-
...overrides,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function runtimeStatusLabel(status: RuntimeStatus): string {
|
|
64
|
-
if (status === 'running') return 'Runtime running';
|
|
65
|
-
if (status === 'cancelled') return 'Runtime stopped';
|
|
66
|
-
if (status === 'error') return 'Runtime error';
|
|
67
|
-
return 'Runtime idle';
|
|
68
|
-
}
|
|
1
|
+
import type { RuntimeStatus } from '@workbench-kit/runtime';
|
|
2
|
+
|
|
3
|
+
export type IntegratedShellActivityId = 'explorer' | 'search' | 'chatting' | 'aiChat';
|
|
4
|
+
|
|
5
|
+
export const integratedShellActivityOrder: IntegratedShellActivityId[] = [
|
|
6
|
+
'explorer',
|
|
7
|
+
'search',
|
|
8
|
+
'chatting',
|
|
9
|
+
'aiChat',
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export const integratedShellActivityLabels: Record<IntegratedShellActivityId, string> = {
|
|
13
|
+
explorer: 'Explorer',
|
|
14
|
+
search: 'Search',
|
|
15
|
+
chatting: 'Chat',
|
|
16
|
+
aiChat: 'AI Chat',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const integratedShellActivityIcons: Record<IntegratedShellActivityId, string> = {
|
|
20
|
+
explorer: 'codicon-files',
|
|
21
|
+
search: 'codicon-search',
|
|
22
|
+
chatting: 'codicon-comment-discussion',
|
|
23
|
+
aiChat: 'codicon-sparkle',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const integratedShellCommandActivities = integratedShellActivityOrder.map((id) => ({
|
|
27
|
+
id,
|
|
28
|
+
label: integratedShellActivityLabels[id],
|
|
29
|
+
icon: integratedShellActivityIcons[id],
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
export function isIntegratedShellActivityId(id: string): id is IntegratedShellActivityId {
|
|
33
|
+
return id === 'explorer' || id === 'search' || id === 'chatting' || id === 'aiChat';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface IntegratedShellBootstrapInitialState {
|
|
37
|
+
activeActivityId: IntegratedShellActivityId;
|
|
38
|
+
isPrimarySidebarVisible: boolean;
|
|
39
|
+
primarySidebarSizePx: number;
|
|
40
|
+
primarySidebarMinPx: number;
|
|
41
|
+
primarySidebarMaxPx: number;
|
|
42
|
+
settingsCategoryId: string;
|
|
43
|
+
settingsScopeId: string;
|
|
44
|
+
theme: 'dark' | 'light';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function createIntegratedShellBootstrapInitialState(
|
|
48
|
+
overrides: Partial<IntegratedShellBootstrapInitialState> = {},
|
|
49
|
+
): IntegratedShellBootstrapInitialState {
|
|
50
|
+
return {
|
|
51
|
+
activeActivityId: 'explorer',
|
|
52
|
+
isPrimarySidebarVisible: true,
|
|
53
|
+
primarySidebarSizePx: 260,
|
|
54
|
+
primarySidebarMinPx: 200,
|
|
55
|
+
primarySidebarMaxPx: 480,
|
|
56
|
+
settingsCategoryId: 'appearance',
|
|
57
|
+
settingsScopeId: 'user',
|
|
58
|
+
theme: 'dark',
|
|
59
|
+
...overrides,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function runtimeStatusLabel(status: RuntimeStatus): string {
|
|
64
|
+
if (status === 'running') return 'Runtime running';
|
|
65
|
+
if (status === 'cancelled') return 'Runtime stopped';
|
|
66
|
+
if (status === 'error') return 'Runtime error';
|
|
67
|
+
return 'Runtime idle';
|
|
68
|
+
}
|