feat: add workspaceItems contribution point + openProviders to contributions schema

This commit is contained in:
mirivlad 2026-06-19 16:41:25 +08:00
parent 0a0da4c1cb
commit 0cbab61826
7 changed files with 37 additions and 4 deletions

7
dist/types.d.ts vendored
View File

@ -106,6 +106,7 @@ export interface ContributionPoints {
activityProviders?: ContributionActivityProvider[];
statusBarItems?: ContributionStatusBarItem[];
openProviders?: ContributionOpenProvider[];
workspaceItems?: ContributionWorkspaceItem[];
}
export interface ContributionView {
id: string;
@ -180,6 +181,12 @@ export interface ContributionOpenProvider {
component: string;
supports: OpenProviderSupport[];
}
export interface ContributionWorkspaceItem {
id: string;
title: string;
icon?: string;
component: string;
}
export interface OpenResourceContext {
sourcePluginId?: string;
sourceView?: 'files' | 'notes' | string;

2
dist/types.d.ts.map vendored

File diff suppressed because one or more lines are too long

View File

@ -44,6 +44,8 @@
{ "id": "status.bar.items", "description": "Status bar items", "type": "item", "status": "draft" },
{ "id": "importers", "description": "Data import providers", "type": "provider", "status": "draft" },
{ "id": "exporters", "description": "Data export providers", "type": "provider", "status": "draft" },
{ "id": "protocol.receivers", "description": "Custom protocol message receivers", "type": "provider", "status": "draft" }
{ "id": "protocol.receivers", "description": "Custom protocol message receivers", "type": "provider", "status": "draft" },
{ "id": "openProviders", "description": "Editor/viewer open providers for workbench resource routing", "type": "provider", "status": "draft" },
{ "id": "workspaceItems", "description": "Workspace tool items shown in workspace host area", "type": "view", "status": "draft" }
]
}

View File

@ -237,6 +237,12 @@
"items": {
"$ref": "#/$defs/ContributionOpenProvider"
}
},
"workspaceItems": {
"type": "array",
"items": {
"$ref": "#/$defs/ContributionWorkspaceItem"
}
}
}
},
@ -406,6 +412,16 @@
}
},
"required": ["id", "title", "component", "supports"]
},
"ContributionWorkspaceItem": {
"type": "object",
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"icon": { "type": "string" },
"component": { "type": "string" }
},
"required": ["id", "title", "component"]
}
}
}

View File

@ -34,7 +34,7 @@ if [ "$FAILED" -ne 0 ]; then
fi
# Install dependencies if needed
if [ ! -d "$ROOT/node_modules" ]; then
if [ ! -d "$ROOT/node_modules" ] || [ ! -f "$ROOT/node_modules/.package-lock.json" ]; then
if [ -f "$ROOT/package-lock.json" ]; then
(cd "$ROOT" && npm ci --no-audit --no-fund)
report "npm ci" $?

View File

@ -31,7 +31,7 @@ if [ "$FAILED" -ne 0 ]; then
fi
# Install deps if missing
if [ ! -d "$ROOT/node_modules" ]; then
if [ ! -d "$ROOT/node_modules" ] || [ ! -f "$ROOT/node_modules/.package-lock.json" ]; then
if [ -f "$ROOT/package-lock.json" ]; then
(cd "$ROOT" && npm ci --no-audit --no-fund)
report "npm ci" $?

View File

@ -154,6 +154,7 @@ export interface ContributionPoints {
activityProviders?: ContributionActivityProvider[];
statusBarItems?: ContributionStatusBarItem[];
openProviders?: ContributionOpenProvider[];
workspaceItems?: ContributionWorkspaceItem[];
}
export interface ContributionView {
@ -241,6 +242,13 @@ export interface ContributionOpenProvider {
supports: OpenProviderSupport[];
}
export interface ContributionWorkspaceItem {
id: string;
title: string;
icon?: string;
component: string;
}
export interface OpenResourceContext {
sourcePluginId?: string;
sourceView?: 'files' | 'notes' | string;