export default { apiVersion: 1, name: "Info Plugin", activate: ({ html }) => ({ contributions: { actions: [ { id: "workspace.show-path", title: "Show Current Workspace Path", group: "Info", enabled: (context) => context.state.selectedWorkspace !== undefined, run: (context) => { const path = context.state.selectedWorkspace?.path ?? "No workspace selected"; window.alert(path); }, }, ], workspaceLabels: [ { id: "workspace.path-label", order: 100, items: (context) => [{ type: "text", text: context.workspace.isGitRepo ? "git" : "folder", title: context.workspace.path }], }, ], workspacePanels: [ { id: "workspace.info", title: "Info", order: 100, render: (context) => html` Info Workspace ${context.workspace.label} ${context.workspace.path} `, }, ], }, }), };
Workspace
${context.workspace.label}
${context.workspace.path}