@theia/plugin-ext 1.65.0-next.6 → 1.65.0
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/common/plugin-api-rpc-model.d.ts +3 -0
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +3 -0
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-protocol.d.ts +5 -5
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/common/uri-components.d.ts +1 -0
- package/lib/common/uri-components.d.ts.map +1 -1
- package/lib/common/uri-components.js +2 -0
- package/lib/common/uri-components.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +1 -1
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts +41 -0
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +38 -5
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/authentication-main.d.ts +3 -0
- package/lib/main/browser/authentication-main.d.ts.map +1 -1
- package/lib/main/browser/command-registry-main.d.ts +3 -0
- package/lib/main/browser/command-registry-main.d.ts.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.d.ts +3 -0
- package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
- package/lib/main/browser/comments/comments-main.d.ts +3 -0
- package/lib/main/browser/comments/comments-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +2 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts +4 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +2 -2
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts +2 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js.map +1 -1
- package/lib/main/browser/debug/debug-main.js +1 -1
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts +3 -0
- package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
- package/lib/main/browser/dialogs-main.js +2 -2
- package/lib/main/browser/dialogs-main.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts +4 -1
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/languages-main.js +3 -3
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.js +4 -4
- package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts +3 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts.map +1 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.js +20 -2
- package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
- package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts.map +1 -1
- package/lib/main/browser/menus/vscode-theia-menu-mappings.js +1 -0
- package/lib/main/browser/menus/vscode-theia-menu-mappings.js.map +1 -1
- package/lib/main/browser/notebooks/notebooks-main.d.ts +3 -0
- package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
- package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js +7 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.d.ts +2 -3
- package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.js +11 -28
- package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
- package/lib/main/browser/plugin-ext-argument-processor.d.ts +12 -0
- package/lib/main/browser/plugin-ext-argument-processor.d.ts.map +1 -0
- package/lib/main/browser/plugin-ext-argument-processor.js +41 -0
- package/lib/main/browser/plugin-ext-argument-processor.js.map +1 -0
- package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.js +7 -1
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/preference-registry-main.d.ts +1 -1
- package/lib/main/browser/preference-registry-main.d.ts.map +1 -1
- package/lib/main/browser/preference-registry-main.js +10 -8
- package/lib/main/browser/preference-registry-main.js.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +3 -0
- package/lib/main/browser/quick-open-main.d.ts.map +1 -1
- package/lib/main/browser/status-bar-message-registry-main.d.ts.map +1 -1
- package/lib/main/browser/status-bar-message-registry-main.js +2 -1
- package/lib/main/browser/status-bar-message-registry-main.js.map +1 -1
- package/lib/main/browser/terminal-main.d.ts +3 -0
- package/lib/main/browser/terminal-main.d.ts.map +1 -1
- package/lib/main/browser/terminal-main.js +3 -1
- package/lib/main/browser/terminal-main.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +3 -0
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.d.ts +3 -0
- package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +3 -0
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-views-main.d.ts +3 -0
- package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
- package/lib/main/browser/view/tree-views-main.js +1 -1
- package/lib/main/browser/view/tree-views-main.js.map +1 -1
- package/lib/main/browser/webview/webview-frontend-preference-contribution.d.ts +5 -0
- package/lib/main/browser/webview/webview-frontend-preference-contribution.d.ts.map +1 -0
- package/lib/main/browser/webview/webview-frontend-preference-contribution.js +40 -0
- package/lib/main/browser/webview/webview-frontend-preference-contribution.js.map +1 -0
- package/lib/main/browser/webview/webview-theme-data-provider.d.ts +1 -1
- package/lib/main/browser/webview/webview-theme-data-provider.d.ts.map +1 -1
- package/lib/main/browser/webview/webview-theme-data-provider.js +1 -1
- package/lib/main/browser/webview/webview-theme-data-provider.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +4 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +3 -2
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/browser/webview-views/webview-views-main.d.ts +3 -0
- package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
- package/lib/main/browser/webviews-main.d.ts +3 -0
- package/lib/main/browser/webviews-main.d.ts.map +1 -1
- package/lib/main/browser/workspace-main.d.ts +3 -0
- package/lib/main/browser/workspace-main.d.ts.map +1 -1
- package/lib/main/browser/workspace-main.js +3 -3
- package/lib/main/browser/workspace-main.js.map +1 -1
- package/lib/main/{browser/webview → common}/webview-preferences.d.ts +1 -1
- package/lib/main/common/webview-preferences.d.ts.map +1 -0
- package/lib/main/{browser/webview → common}/webview-preferences.js +1 -12
- package/lib/main/common/webview-preferences.js.map +1 -0
- package/lib/main/node/plugin-ext-backend-module.d.ts.map +1 -1
- package/lib/main/node/plugin-ext-backend-module.js +2 -0
- package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
- package/lib/plugin/authentication-ext.d.ts +3 -0
- package/lib/plugin/authentication-ext.d.ts.map +1 -1
- package/lib/plugin/clipboard-ext.d.ts +3 -0
- package/lib/plugin/clipboard-ext.d.ts.map +1 -1
- package/lib/plugin/command-registry.d.ts +3 -0
- package/lib/plugin/command-registry.d.ts.map +1 -1
- package/lib/plugin/comments.d.ts +3 -0
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/custom-editors.d.ts +3 -0
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/debug/debug-ext.d.ts +3 -0
- package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +3 -0
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +3 -0
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +3 -0
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
- package/lib/plugin/decorations.d.ts +3 -0
- package/lib/plugin/decorations.d.ts.map +1 -1
- package/lib/plugin/dialogs.d.ts +3 -0
- package/lib/plugin/dialogs.d.ts.map +1 -1
- package/lib/plugin/document-data.d.ts +3 -0
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/documents.d.ts +3 -0
- package/lib/plugin/documents.d.ts.map +1 -1
- package/lib/plugin/env.d.ts +3 -0
- package/lib/plugin/env.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts +3 -0
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts +3 -0
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/label-service.d.ts +3 -0
- package/lib/plugin/label-service.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +3 -0
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/code-action.d.ts +3 -0
- package/lib/plugin/languages/code-action.d.ts.map +1 -1
- package/lib/plugin/languages/color.d.ts +3 -0
- package/lib/plugin/languages/color.d.ts.map +1 -1
- package/lib/plugin/languages/completion.d.ts +3 -0
- package/lib/plugin/languages/completion.d.ts.map +1 -1
- package/lib/plugin/languages/declaration.d.ts +3 -0
- package/lib/plugin/languages/declaration.d.ts.map +1 -1
- package/lib/plugin/languages/definition.d.ts +3 -0
- package/lib/plugin/languages/definition.d.ts.map +1 -1
- package/lib/plugin/languages/diagnostics.d.ts +3 -0
- package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
- package/lib/plugin/languages/document-drop-edit.d.ts +3 -0
- package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
- package/lib/plugin/languages/document-formatting.d.ts +3 -0
- package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/document-highlight.d.ts +3 -0
- package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
- package/lib/plugin/languages/evaluatable-expression.d.ts +3 -0
- package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
- package/lib/plugin/languages/folding.d.ts +3 -0
- package/lib/plugin/languages/folding.d.ts.map +1 -1
- package/lib/plugin/languages/hover.d.ts +3 -0
- package/lib/plugin/languages/hover.d.ts.map +1 -1
- package/lib/plugin/languages/implementation.d.ts +3 -0
- package/lib/plugin/languages/implementation.d.ts.map +1 -1
- package/lib/plugin/languages/inlay-hints.d.ts +3 -0
- package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
- package/lib/plugin/languages/inline-completion.d.ts +3 -0
- package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
- package/lib/plugin/languages/inline-values.d.ts +3 -0
- package/lib/plugin/languages/inline-values.d.ts.map +1 -1
- package/lib/plugin/languages/lens.d.ts +3 -0
- package/lib/plugin/languages/lens.d.ts.map +1 -1
- package/lib/plugin/languages/link-provider.d.ts +3 -0
- package/lib/plugin/languages/link-provider.d.ts.map +1 -1
- package/lib/plugin/languages/linked-editing-range.d.ts +3 -0
- package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
- package/lib/plugin/languages/on-type-formatting.d.ts +3 -0
- package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/outline.d.ts +3 -0
- package/lib/plugin/languages/outline.d.ts.map +1 -1
- package/lib/plugin/languages/range-formatting.d.ts +3 -0
- package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/reference.d.ts +3 -0
- package/lib/plugin/languages/reference.d.ts.map +1 -1
- package/lib/plugin/languages/rename.d.ts +3 -0
- package/lib/plugin/languages/rename.d.ts.map +1 -1
- package/lib/plugin/languages/selection-range.d.ts +3 -0
- package/lib/plugin/languages/selection-range.d.ts.map +1 -1
- package/lib/plugin/languages/semantic-highlighting.d.ts +3 -0
- package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
- package/lib/plugin/languages/signature.d.ts +3 -0
- package/lib/plugin/languages/signature.d.ts.map +1 -1
- package/lib/plugin/languages/type-definition.d.ts +3 -0
- package/lib/plugin/languages/type-definition.d.ts.map +1 -1
- package/lib/plugin/languages/type-hierarchy.d.ts +3 -0
- package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/util.d.ts +3 -0
- package/lib/plugin/languages/util.d.ts.map +1 -1
- package/lib/plugin/languages/workspace-symbol.d.ts +3 -0
- package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
- package/lib/plugin/languages-utils.d.ts +3 -0
- package/lib/plugin/languages-utils.d.ts.map +1 -1
- package/lib/plugin/languages.d.ts +3 -0
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/lm-ext.d.ts +3 -0
- package/lib/plugin/lm-ext.d.ts.map +1 -1
- package/lib/plugin/markdown-string.d.ts +3 -0
- package/lib/plugin/markdown-string.d.ts.map +1 -1
- package/lib/plugin/message-registry.d.ts +3 -0
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +3 -0
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-document.d.ts +3 -0
- package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-documents.d.ts +3 -0
- package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editor.d.ts +3 -0
- package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editors.d.ts +3 -0
- package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-kernels.d.ts +3 -0
- package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-renderers.d.ts +3 -0
- package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
- package/lib/plugin/notebook/notebooks.d.ts +3 -0
- package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
- package/lib/plugin/notification.d.ts +3 -0
- package/lib/plugin/notification.d.ts.map +1 -1
- package/lib/plugin/output-channel/log-output-channel.d.ts +3 -0
- package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
- package/lib/plugin/output-channel/output-channel-item.d.ts +3 -0
- package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
- package/lib/plugin/output-channel-registry.d.ts +3 -0
- package/lib/plugin/output-channel-registry.d.ts.map +1 -1
- package/lib/plugin/plugin-context.d.ts +3 -0
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +11 -2
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts +3 -0
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-storage.d.ts +3 -0
- package/lib/plugin/plugin-storage.d.ts.map +1 -1
- package/lib/plugin/preference-registry.d.ts +3 -0
- package/lib/plugin/preference-registry.d.ts.map +1 -1
- package/lib/plugin/quick-open.d.ts +3 -0
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/scm.d.ts +3 -0
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/scm.js +6 -1
- package/lib/plugin/scm.js.map +1 -1
- package/lib/plugin/secrets-ext.d.ts +3 -0
- package/lib/plugin/secrets-ext.d.ts.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts +6 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.js +46 -1
- package/lib/plugin/status-bar/status-bar-item.js.map +1 -1
- package/lib/plugin/status-bar-message-registry.d.ts +6 -1
- package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
- package/lib/plugin/status-bar-message-registry.js +3 -2
- package/lib/plugin/status-bar-message-registry.js.map +1 -1
- package/lib/plugin/tabs.d.ts +3 -0
- package/lib/plugin/tabs.d.ts.map +1 -1
- package/lib/plugin/tasks/task-provider.d.ts +3 -0
- package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +3 -0
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.d.ts +3 -0
- package/lib/plugin/terminal-ext.d.ts.map +1 -1
- package/lib/plugin/test-item.d.ts +3 -0
- package/lib/plugin/test-item.d.ts.map +1 -1
- package/lib/plugin/tests.d.ts +3 -0
- package/lib/plugin/tests.d.ts.map +1 -1
- package/lib/plugin/text-editor.d.ts +6 -0
- package/lib/plugin/text-editor.d.ts.map +1 -1
- package/lib/plugin/text-editor.js +7 -0
- package/lib/plugin/text-editor.js.map +1 -1
- package/lib/plugin/text-editors.d.ts +6 -0
- package/lib/plugin/text-editors.d.ts.map +1 -1
- package/lib/plugin/text-editors.js +63 -0
- package/lib/plugin/text-editors.js.map +1 -1
- package/lib/plugin/timeline.d.ts +3 -0
- package/lib/plugin/timeline.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts +3 -0
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/type-converters.d.ts +3 -0
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/types-impl.d.ts +106 -5
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +23 -3
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/uri-ext.d.ts +3 -0
- package/lib/plugin/uri-ext.d.ts.map +1 -1
- package/lib/plugin/webview-views.d.ts +3 -0
- package/lib/plugin/webview-views.d.ts.map +1 -1
- package/lib/plugin/webviews.d.ts +3 -0
- package/lib/plugin/webviews.d.ts.map +1 -1
- package/lib/plugin/window-state.d.ts +3 -0
- package/lib/plugin/window-state.d.ts.map +1 -1
- package/lib/plugin/workspace.d.ts +3 -0
- package/lib/plugin/workspace.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/common/plugin-protocol.ts +5 -5
- package/src/common/uri-components.ts +3 -0
- package/src/hosted/browser/hosted-plugin.ts +1 -1
- package/src/hosted/node/scanners/scanner-theia.ts +87 -5
- package/src/main/browser/custom-editors/custom-editor-opener.tsx +2 -2
- package/src/main/browser/custom-editors/custom-editors-main.ts +1 -1
- package/src/main/browser/custom-editors/plugin-custom-editor-registry.ts +2 -2
- package/src/main/browser/debug/debug-main.ts +1 -1
- package/src/main/browser/debug/plugin-debug-session-factory.ts +1 -1
- package/src/main/browser/dialogs-main.ts +1 -1
- package/src/main/browser/languages-main.ts +1 -1
- package/src/main/browser/menus/menus-contribution-handler.ts +5 -5
- package/src/main/browser/menus/plugin-menu-command-adapter.ts +23 -4
- package/src/main/browser/menus/vscode-theia-menu-mappings.ts +2 -1
- package/src/main/browser/notebooks/renderers/output-webview-internal.ts +8 -0
- package/src/main/browser/plugin-contribution-handler.ts +14 -30
- package/src/main/browser/plugin-ext-argument-processor.ts +39 -0
- package/src/main/browser/plugin-ext-frontend-module.ts +9 -2
- package/src/main/browser/preference-registry-main.ts +9 -7
- package/src/main/browser/status-bar-message-registry-main.ts +2 -1
- package/src/main/browser/terminal-main.ts +2 -1
- package/src/main/browser/view/plugin-view-registry.ts +3 -0
- package/src/main/browser/view/tree-views-main.ts +1 -1
- package/src/main/browser/webview/pre/main.js +13 -10
- package/src/main/browser/webview/webview-frontend-preference-contribution.ts +37 -0
- package/src/main/browser/webview/webview-theme-data-provider.ts +1 -1
- package/src/main/browser/webview/webview.ts +3 -2
- package/src/main/browser/workspace-main.ts +2 -2
- package/src/main/{browser/webview → common}/webview-preferences.ts +3 -16
- package/src/main/node/plugin-ext-backend-module.ts +2 -0
- package/src/plugin/plugin-context.ts +14 -3
- package/src/plugin/scm.ts +12 -1
- package/src/plugin/status-bar/status-bar-item.ts +54 -0
- package/src/plugin/status-bar-message-registry.ts +3 -2
- package/src/plugin/text-editor.ts +11 -0
- package/src/plugin/text-editors.ts +70 -1
- package/src/plugin/types-impl.ts +122 -4
- package/lib/main/browser/webview/webview-preferences.d.ts.map +0 -1
- package/lib/main/browser/webview/webview-preferences.js.map +0 -1
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
noopWidgetStatusBarContribution,
|
|
27
27
|
WidgetStatusBarContribution
|
|
28
28
|
} from '@theia/core/lib/browser';
|
|
29
|
-
import { MaybePromise, CommandContribution, ResourceResolver, bindContributionProvider, URI, generateUuid } from '@theia/core/lib/common';
|
|
29
|
+
import { MaybePromise, CommandContribution, ResourceResolver, bindContributionProvider, URI, generateUuid, PreferenceContribution } from '@theia/core/lib/common';
|
|
30
30
|
import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging';
|
|
31
31
|
import { HostedPluginSupport } from '../../hosted/browser/hosted-plugin';
|
|
32
32
|
import { HostedPluginWatcher } from '../../hosted/browser/hosted-plugin-watcher';
|
|
@@ -60,7 +60,6 @@ import { OutputChannelRegistryMainImpl } from './output-channel-registry-main';
|
|
|
60
60
|
import { WebviewWidget } from './webview/webview';
|
|
61
61
|
import { WebviewEnvironment } from './webview/webview-environment';
|
|
62
62
|
import { WebviewThemeDataProvider } from './webview/webview-theme-data-provider';
|
|
63
|
-
import { bindWebviewPreferences } from './webview/webview-preferences';
|
|
64
63
|
import { WebviewResourceCache } from './webview/webview-resource-cache';
|
|
65
64
|
import { PluginIconThemeService, PluginIconThemeFactory, PluginIconThemeDefinition, PluginIconTheme } from './plugin-icon-theme-service';
|
|
66
65
|
import { PluginTreeViewNodeLabelProvider } from './view/plugin-tree-view-node-label-provider';
|
|
@@ -90,6 +89,9 @@ import { CellOutputWebviewImpl, createCellOutputWebviewContainer } from './noteb
|
|
|
90
89
|
import { ArgumentProcessorContribution } from './command-registry-main';
|
|
91
90
|
import { WebviewSecondaryWindowSupport } from './webview/webview-secondary-window-support';
|
|
92
91
|
import { CustomEditorUndoRedoHandler } from './custom-editors/custom-editor-undo-redo-handler';
|
|
92
|
+
import { bindWebviewPreferences } from '../common/webview-preferences';
|
|
93
|
+
import { WebviewFrontendPreferenceContribution } from './webview/webview-frontend-preference-contribution';
|
|
94
|
+
import { PluginExtToolbarItemArgumentProcessor } from './plugin-ext-argument-processor';
|
|
93
95
|
|
|
94
96
|
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
95
97
|
|
|
@@ -180,6 +182,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
|
180
182
|
})).inSingletonScope();
|
|
181
183
|
|
|
182
184
|
bindWebviewPreferences(bind);
|
|
185
|
+
bind(WebviewFrontendPreferenceContribution).toSelf().inSingletonScope();
|
|
186
|
+
bind(PreferenceContribution).toService(WebviewFrontendPreferenceContribution);
|
|
183
187
|
bind(WebviewEnvironment).toSelf().inSingletonScope();
|
|
184
188
|
bind(WebviewThemeDataProvider).toSelf().inSingletonScope();
|
|
185
189
|
bind(WebviewResourceCache).toSelf().inSingletonScope();
|
|
@@ -287,4 +291,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
|
287
291
|
);
|
|
288
292
|
bindContributionProvider(bind, ArgumentProcessorContribution);
|
|
289
293
|
|
|
294
|
+
bind(PluginExtToolbarItemArgumentProcessor).toSelf().inSingletonScope();
|
|
295
|
+
bind(ArgumentProcessorContribution).toService(PluginExtToolbarItemArgumentProcessor);
|
|
296
|
+
|
|
290
297
|
});
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
PreferenceServiceImpl,
|
|
20
20
|
PreferenceScope,
|
|
21
21
|
PreferenceProviderProvider
|
|
22
|
-
} from '@theia/core/lib/
|
|
22
|
+
} from '@theia/core/lib/common/preferences';
|
|
23
23
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
24
24
|
import {
|
|
25
25
|
MAIN_RPC_CONTEXT,
|
|
@@ -40,13 +40,15 @@ export function getPreferences(preferenceProviderProvider: PreferenceProviderPro
|
|
|
40
40
|
return PreferenceScope.getScopes().reduce((result: { [key: number]: any }, scope: PreferenceScope) => {
|
|
41
41
|
result[scope] = {};
|
|
42
42
|
const provider = preferenceProviderProvider(scope);
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
43
|
+
if (provider) {
|
|
44
|
+
if (scope === PreferenceScope.Folder) {
|
|
45
|
+
for (const f of folders) {
|
|
46
|
+
const folderPrefs = provider.getPreferences(f);
|
|
47
|
+
result[scope][f] = folderPrefs;
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
result[scope] = provider.getPreferences();
|
|
47
51
|
}
|
|
48
|
-
} else {
|
|
49
|
-
result[scope] = provider.getPreferences();
|
|
50
52
|
}
|
|
51
53
|
return result;
|
|
52
54
|
}, {} as PreferenceData);
|
|
@@ -70,11 +70,12 @@ export class StatusBarMessageRegistryMainImpl implements StatusBarMessageRegistr
|
|
|
70
70
|
args
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
const isNewEntry = !this.entries.has(id);
|
|
73
74
|
this.entries.set(id, entry);
|
|
74
75
|
await this.delegate.setElement(id, entry);
|
|
75
76
|
if (this.toDispose.disposed) {
|
|
76
77
|
this.$dispose(id);
|
|
77
|
-
} else {
|
|
78
|
+
} else if (isNewEntry) {
|
|
78
79
|
this.toDispose.push(Disposable.create(() => this.$dispose(id)));
|
|
79
80
|
}
|
|
80
81
|
}
|
|
@@ -171,7 +171,8 @@ export class TerminalServiceMainImpl implements TerminalServiceMain, TerminalLin
|
|
|
171
171
|
hideFromUser: options.hideFromUser,
|
|
172
172
|
location: this.getTerminalLocation(options, parentId),
|
|
173
173
|
isPseudoTerminal,
|
|
174
|
-
isTransient: options.isTransient
|
|
174
|
+
isTransient: options.isTransient,
|
|
175
|
+
shellIntegrationNonce: options.shellIntegrationNonce ?? undefined
|
|
175
176
|
});
|
|
176
177
|
if (options.message) {
|
|
177
178
|
terminal.writeLine(options.message);
|
|
@@ -426,6 +426,9 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
|
|
|
426
426
|
toDispose.push(this.commands.registerCommand({ id: `${view.id}.focus` }, {
|
|
427
427
|
execute: async () => { await this.openView(view.id, { activate: true }); }
|
|
428
428
|
}));
|
|
429
|
+
toDispose.push(this.commands.registerCommand({ id: `${view.id}.open` }, {
|
|
430
|
+
execute: async () => { await this.openView(view.id, { activate: true }); }
|
|
431
|
+
}));
|
|
429
432
|
return toDispose;
|
|
430
433
|
}
|
|
431
434
|
|
|
@@ -90,7 +90,7 @@ export class TreeViewsMainImpl implements TreeViewsMain, Disposable {
|
|
|
90
90
|
this.toDispose.push(Disposable.create(() => widget.model.proxy = undefined));
|
|
91
91
|
this.handleTreeEvents(widget.id, widget);
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
widget.model.refresh();
|
|
94
94
|
return widget;
|
|
95
95
|
}));
|
|
96
96
|
this.toDispose.push(Disposable.create(() => this.$unregisterTreeDataProvider(treeViewId)));
|
|
@@ -250,9 +250,11 @@ delete window.frameElement;
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
let baseElement = event.view.document.getElementsByTagName('base')[0];
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
253
|
+
|
|
254
|
+
// Use composedPath to get the event path through shadow DOM
|
|
255
|
+
const path = event.composedPath ? event.composedPath() : [event.target];
|
|
256
|
+
|
|
257
|
+
for (const node of path) {
|
|
256
258
|
if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) {
|
|
257
259
|
if (node.getAttribute('href') === '#') {
|
|
258
260
|
event.view.scrollTo(0, 0);
|
|
@@ -267,7 +269,6 @@ delete window.frameElement;
|
|
|
267
269
|
event.preventDefault();
|
|
268
270
|
break;
|
|
269
271
|
}
|
|
270
|
-
node = node.parentNode;
|
|
271
272
|
}
|
|
272
273
|
};
|
|
273
274
|
|
|
@@ -282,13 +283,14 @@ delete window.frameElement;
|
|
|
282
283
|
}
|
|
283
284
|
|
|
284
285
|
if (event.button === 1) {
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
// Use composedPath to get the event path through shadow DOM
|
|
287
|
+
const path = event.composedPath ? event.composedPath() : [event.target];
|
|
288
|
+
|
|
289
|
+
for (const node of path) {
|
|
287
290
|
if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) {
|
|
288
291
|
event.preventDefault();
|
|
289
292
|
break;
|
|
290
293
|
}
|
|
291
|
-
node = node.parentNode;
|
|
292
294
|
}
|
|
293
295
|
}
|
|
294
296
|
};
|
|
@@ -354,16 +356,17 @@ delete window.frameElement;
|
|
|
354
356
|
host.postMessage('did-context-menu', {
|
|
355
357
|
clientX: e.clientX,
|
|
356
358
|
clientY: e.clientY,
|
|
357
|
-
context: findVscodeContext(e.
|
|
359
|
+
context: findVscodeContext(e.composedPath(), 0)
|
|
358
360
|
});
|
|
359
361
|
};
|
|
360
362
|
|
|
361
|
-
function findVscodeContext(
|
|
363
|
+
function findVscodeContext(nodes, index) {
|
|
364
|
+
const node = nodes[index];
|
|
362
365
|
if (node) {
|
|
363
366
|
if (node.dataset?.vscodeContext) {
|
|
364
367
|
return JSON.parse(node.dataset.vscodeContext);
|
|
365
368
|
}
|
|
366
|
-
return findVscodeContext(
|
|
369
|
+
return findVscodeContext(nodes, ++index);
|
|
367
370
|
}
|
|
368
371
|
return {};
|
|
369
372
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2025 STMicroelectronics and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
import { nls, PreferenceContribution, PreferenceSchema, PreferenceSchemaService, PreferenceScope } from '@theia/core';
|
|
16
|
+
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
17
|
+
|
|
18
|
+
const schema: PreferenceSchema = {
|
|
19
|
+
properties: {
|
|
20
|
+
'webview.warnIfUnsecure': {
|
|
21
|
+
scope: PreferenceScope.Default,
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
description: nls.localize('theia/plugin-ext/webviewWarnIfUnsecure', 'Warns users that webviews are currently deployed insecurely.'),
|
|
24
|
+
default: true,
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export class WebviewFrontendPreferenceContribution implements PreferenceContribution {
|
|
31
|
+
async initSchema(service: PreferenceSchemaService): Promise<void> {
|
|
32
|
+
const frontendConfig = FrontendApplicationConfigProvider.get();
|
|
33
|
+
if (frontendConfig.securityWarnings) {
|
|
34
|
+
service.addSchema(schema);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
import { inject, postConstruct, injectable } from '@theia/core/shared/inversify';
|
|
23
23
|
import { Emitter } from '@theia/core/lib/common/event';
|
|
24
|
-
import { EditorPreferences, EditorConfiguration } from '@theia/editor/lib/
|
|
24
|
+
import { EditorPreferences, EditorConfiguration } from '@theia/editor/lib/common/editor-preferences';
|
|
25
25
|
import { ThemeService } from '@theia/core/lib/browser/theming';
|
|
26
26
|
import { Theme } from '@theia/core/lib/common/theme';
|
|
27
27
|
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
|
|
@@ -41,7 +41,6 @@ import { PluginSharedStyle } from '../plugin-shared-style';
|
|
|
41
41
|
import { WebviewThemeDataProvider } from './webview-theme-data-provider';
|
|
42
42
|
import { ExternalUriService } from '@theia/core/lib/browser/external-uri-service';
|
|
43
43
|
import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
|
|
44
|
-
import { WebviewPreferences } from './webview-preferences';
|
|
45
44
|
import { WebviewResourceCache } from './webview-resource-cache';
|
|
46
45
|
import { Endpoint } from '@theia/core/lib/browser/endpoint';
|
|
47
46
|
import { isFirefox } from '@theia/core/lib/browser/browser';
|
|
@@ -54,6 +53,7 @@ import { MenuPath } from '@theia/core';
|
|
|
54
53
|
import { ContextMenuRenderer } from '@theia/core/lib/browser';
|
|
55
54
|
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
56
55
|
import { PluginViewWidget } from '../view/plugin-view-widget';
|
|
56
|
+
import { WebviewPreferences } from '../../common/webview-preferences';
|
|
57
57
|
|
|
58
58
|
// Style from core
|
|
59
59
|
const TRANSPARENT_OVERLAY_STYLE = 'theia-transparent-overlay';
|
|
@@ -108,7 +108,8 @@ export class WebviewWidget extends BaseWidget implements StatefulWidget, Extract
|
|
|
108
108
|
Schemes.http,
|
|
109
109
|
Schemes.https,
|
|
110
110
|
Schemes.mailto,
|
|
111
|
-
Schemes.vscode
|
|
111
|
+
Schemes.vscode,
|
|
112
|
+
Schemes.vscodeNotebookCell
|
|
112
113
|
]);
|
|
113
114
|
|
|
114
115
|
static FACTORY_ID = 'plugin-webview';
|
|
@@ -31,14 +31,14 @@ import { Resource } from '@theia/core/lib/common/resource';
|
|
|
31
31
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
32
32
|
import { Emitter, Event, ResourceResolver, CancellationToken, isUndefined } from '@theia/core';
|
|
33
33
|
import { PluginServer } from '../../common/plugin-protocol';
|
|
34
|
-
import { FileSystemPreferences } from '@theia/filesystem/lib/
|
|
34
|
+
import { FileSystemPreferences } from '@theia/filesystem/lib/common';
|
|
35
35
|
import { SearchInWorkspaceService } from '@theia/search-in-workspace/lib/browser/search-in-workspace-service';
|
|
36
36
|
import { FileStat } from '@theia/filesystem/lib/common/files';
|
|
37
37
|
import { MonacoQuickInputService } from '@theia/monaco/lib/browser/monaco-quick-input-service';
|
|
38
38
|
import { RequestService } from '@theia/core/shared/@theia/request';
|
|
39
39
|
import { UTF16be, UTF16le, UTF8, UTF8_with_bom } from '@theia/core/lib/common/encodings';
|
|
40
40
|
import { EncodingRegistry } from '@theia/core/lib/browser/encoding-registry';
|
|
41
|
-
import { PreferenceService } from '@theia/core/lib/
|
|
41
|
+
import { PreferenceService } from '@theia/core/lib/common/preferences/preference-service';
|
|
42
42
|
|
|
43
43
|
export class WorkspaceMainImpl implements WorkspaceMain, Disposable {
|
|
44
44
|
|
|
@@ -15,20 +15,16 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
18
|
-
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
19
18
|
import {
|
|
20
19
|
createPreferenceProxy,
|
|
20
|
+
PreferenceContribution,
|
|
21
21
|
PreferenceProxy,
|
|
22
|
+
PreferenceSchema,
|
|
22
23
|
PreferenceService,
|
|
23
|
-
|
|
24
|
-
PreferenceSchema
|
|
25
|
-
} from '@theia/core/lib/browser/preferences';
|
|
24
|
+
} from '@theia/core/lib/common/preferences';
|
|
26
25
|
import { nls } from '@theia/core/lib/common/nls';
|
|
27
26
|
|
|
28
|
-
const frontendConfig = FrontendApplicationConfigProvider.get();
|
|
29
|
-
|
|
30
27
|
export const WebviewConfigSchema: PreferenceSchema = {
|
|
31
|
-
type: 'object',
|
|
32
28
|
properties: {
|
|
33
29
|
'webview.trace': {
|
|
34
30
|
type: 'string',
|
|
@@ -39,15 +35,6 @@ export const WebviewConfigSchema: PreferenceSchema = {
|
|
|
39
35
|
}
|
|
40
36
|
};
|
|
41
37
|
|
|
42
|
-
if (frontendConfig.securityWarnings) {
|
|
43
|
-
WebviewConfigSchema.properties['webview.warnIfUnsecure'] = {
|
|
44
|
-
scope: 'application',
|
|
45
|
-
type: 'boolean',
|
|
46
|
-
description: nls.localize('theia/plugin-ext/webviewWarnIfUnsecure', 'Warns users that webviews are currently deployed unsecurely.'),
|
|
47
|
-
default: true,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
38
|
export interface WebviewConfiguration {
|
|
52
39
|
'webview.trace': 'off' | 'on' | 'verbose'
|
|
53
40
|
'webview.warnIfUnsecure'?: boolean
|
|
@@ -46,6 +46,7 @@ import { PluginRemoteCliContribution } from './plugin-remote-cli-contribution';
|
|
|
46
46
|
import { RemoteCliContribution } from '@theia/core/lib/node/remote/remote-cli-contribution';
|
|
47
47
|
import { PluginRemoteCopyContribution } from './plugin-remote-copy-contribution';
|
|
48
48
|
import { RemoteCopyContribution } from '@theia/core/lib/node/remote/remote-copy-contribution';
|
|
49
|
+
import { bindWebviewPreferences } from '../common/webview-preferences';
|
|
49
50
|
|
|
50
51
|
export function bindMainBackend(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void {
|
|
51
52
|
bind(PluginApiContribution).toSelf().inSingletonScope();
|
|
@@ -102,5 +103,6 @@ export function bindMainBackend(bind: interfaces.Bind, unbind: interfaces.Unbind
|
|
|
102
103
|
bind(BackendApplicationContribution).toService(WebviewBackendSecurityWarnings);
|
|
103
104
|
|
|
104
105
|
rebind(LocalizationServerImpl).to(PluginLocalizationServer).inSingletonScope();
|
|
106
|
+
bindWebviewPreferences(bind);
|
|
105
107
|
|
|
106
108
|
}
|
|
@@ -240,7 +240,9 @@ import {
|
|
|
240
240
|
TerminalCompletionItemKind,
|
|
241
241
|
TerminalCompletionList,
|
|
242
242
|
McpHttpServerDefinition,
|
|
243
|
-
McpStdioServerDefinition
|
|
243
|
+
McpStdioServerDefinition,
|
|
244
|
+
InteractiveWindowInput,
|
|
245
|
+
TextEditorChangeKind
|
|
244
246
|
} from './types-impl';
|
|
245
247
|
import { AuthenticationExtImpl } from './authentication-ext';
|
|
246
248
|
import { SymbolKind } from '../common/plugin-api-rpc-model';
|
|
@@ -333,7 +335,7 @@ export function createAPIFactory(
|
|
|
333
335
|
const notebookRenderers = rpc.set(MAIN_RPC_CONTEXT.NOTEBOOK_RENDERERS_EXT, new NotebookRenderersExtImpl(rpc, notebooksExt));
|
|
334
336
|
const notebookKernels = rpc.set(MAIN_RPC_CONTEXT.NOTEBOOK_KERNELS_EXT, new NotebookKernelsExtImpl(rpc, notebooksExt, commandRegistry, webviewExt, workspaceExt));
|
|
335
337
|
const notebookDocuments = rpc.set(MAIN_RPC_CONTEXT.NOTEBOOK_DOCUMENTS_EXT, new NotebookDocumentsExtImpl(notebooksExt));
|
|
336
|
-
const statusBarMessageRegistryExt = new StatusBarMessageRegistryExt(rpc);
|
|
338
|
+
const statusBarMessageRegistryExt = new StatusBarMessageRegistryExt(rpc, commandRegistry);
|
|
337
339
|
const terminalExt = rpc.set(MAIN_RPC_CONTEXT.TERMINAL_EXT, new TerminalServiceExtImpl(rpc));
|
|
338
340
|
const outputChannelRegistryExt = rpc.set(MAIN_RPC_CONTEXT.OUTPUT_CHANNEL_REGISTRY_EXT, new OutputChannelRegistryExtImpl(rpc));
|
|
339
341
|
const treeViewsExt = rpc.set(MAIN_RPC_CONTEXT.TREE_VIEWS_EXT, new TreeViewsExtImpl(rpc, commandRegistry));
|
|
@@ -477,6 +479,9 @@ export function createAPIFactory(
|
|
|
477
479
|
onDidChangeTextEditorSelection(listener, thisArg?, disposables?) {
|
|
478
480
|
return editors.onDidChangeTextEditorSelection(listener, thisArg, disposables);
|
|
479
481
|
},
|
|
482
|
+
onDidChangeTextEditorDiffInformation(listener, thisArg?, disposables?) {
|
|
483
|
+
return editors.onDidChangeTextEditorDiffInformation(listener, thisArg, disposables);
|
|
484
|
+
},
|
|
480
485
|
onDidChangeTextEditorOptions(listener, thisArg?, disposables?) {
|
|
481
486
|
return editors.onDidChangeTextEditorOptions(listener, thisArg, disposables);
|
|
482
487
|
},
|
|
@@ -1381,6 +1386,10 @@ export function createAPIFactory(
|
|
|
1381
1386
|
tools: [],
|
|
1382
1387
|
registerMcpServerDefinitionProvider(id: string, provider: any): theia.Disposable {
|
|
1383
1388
|
return lmExt.registerMcpServerDefinitionProvider(id, provider);
|
|
1389
|
+
},
|
|
1390
|
+
/** @stubbed */
|
|
1391
|
+
registerLanguageModelChatProvider(vendor: string, provider: theia.LanguageModelChatProvider): theia.Disposable {
|
|
1392
|
+
return Disposable.NULL;
|
|
1384
1393
|
}
|
|
1385
1394
|
};
|
|
1386
1395
|
|
|
@@ -1614,7 +1623,9 @@ export function createAPIFactory(
|
|
|
1614
1623
|
TerminalCompletionItemKind,
|
|
1615
1624
|
TerminalCompletionList,
|
|
1616
1625
|
McpHttpServerDefinition,
|
|
1617
|
-
McpStdioServerDefinition
|
|
1626
|
+
McpStdioServerDefinition,
|
|
1627
|
+
TabInputInteractiveWindow: InteractiveWindowInput,
|
|
1628
|
+
TextEditorChangeKind
|
|
1618
1629
|
};
|
|
1619
1630
|
};
|
|
1620
1631
|
}
|
package/src/plugin/scm.ts
CHANGED
|
@@ -641,6 +641,11 @@ class SourceControlImpl implements theia.SourceControl {
|
|
|
641
641
|
private readonly onDidChangeSelectionEmitter = new Emitter<boolean>();
|
|
642
642
|
readonly onDidChangeSelection = this.onDidChangeSelectionEmitter.event;
|
|
643
643
|
|
|
644
|
+
private readonly onDidDisposeEmitter = new Emitter<void>();
|
|
645
|
+
readonly onDidDispose = this.onDidDisposeEmitter.event;
|
|
646
|
+
|
|
647
|
+
readonly onDidDisposeParent: Event<void>;
|
|
648
|
+
|
|
644
649
|
private handle: number = SourceControlImpl.handlePool++;
|
|
645
650
|
|
|
646
651
|
constructor(
|
|
@@ -649,10 +654,13 @@ class SourceControlImpl implements theia.SourceControl {
|
|
|
649
654
|
private commands: CommandRegistryImpl,
|
|
650
655
|
private _id: string,
|
|
651
656
|
private _label: string,
|
|
652
|
-
private _rootUri?: theia.Uri
|
|
657
|
+
private _rootUri?: theia.Uri,
|
|
658
|
+
_iconPath?: theia.IconPath,
|
|
659
|
+
_parent?: SourceControlImpl
|
|
653
660
|
) {
|
|
654
661
|
this.inputBox = new ScmInputBoxImpl(plugin, this.proxy, this.handle);
|
|
655
662
|
this.proxy.$registerSourceControl(this.handle, _id, _label, _rootUri);
|
|
663
|
+
this.onDidDisposeParent = _parent ? _parent.onDidDispose : Event.None;
|
|
656
664
|
}
|
|
657
665
|
|
|
658
666
|
private createdResourceGroups = new Map<ScmResourceGroupImpl, Disposable>();
|
|
@@ -736,6 +744,9 @@ class SourceControlImpl implements theia.SourceControl {
|
|
|
736
744
|
|
|
737
745
|
this.groups.forEach(group => group.dispose());
|
|
738
746
|
this.proxy.$unregisterSourceControl(this.handle);
|
|
747
|
+
|
|
748
|
+
this.onDidDisposeEmitter.fire();
|
|
749
|
+
this.onDidDisposeEmitter.dispose();
|
|
739
750
|
}
|
|
740
751
|
}
|
|
741
752
|
|
|
@@ -17,6 +17,9 @@ import * as theia from '@theia/plugin';
|
|
|
17
17
|
import { ThemeColor, StatusBarAlignment } from '../types-impl';
|
|
18
18
|
import { StatusBarMessageRegistryMain } from '../../common/plugin-api-rpc';
|
|
19
19
|
import { UUID } from '@theia/core/shared/@lumino/coreutils';
|
|
20
|
+
import { CommandRegistryImpl } from '../command-registry';
|
|
21
|
+
import { MarkdownString } from '../markdown-string';
|
|
22
|
+
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
20
23
|
|
|
21
24
|
export class StatusBarItemImpl implements theia.StatusBarItem {
|
|
22
25
|
|
|
@@ -45,6 +48,7 @@ export class StatusBarItemImpl implements theia.StatusBarItem {
|
|
|
45
48
|
_proxy: StatusBarMessageRegistryMain;
|
|
46
49
|
|
|
47
50
|
constructor(_proxy: StatusBarMessageRegistryMain,
|
|
51
|
+
private readonly commandRegistry: CommandRegistryImpl,
|
|
48
52
|
alignment: StatusBarAlignment = StatusBarAlignment.Left,
|
|
49
53
|
priority: number = 0,
|
|
50
54
|
id = StatusBarItemImpl.nextId()) {
|
|
@@ -105,6 +109,56 @@ export class StatusBarItemImpl implements theia.StatusBarItem {
|
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
public set tooltip(tooltip: string | theia.MarkdownString | undefined) {
|
|
112
|
+
if (tooltip && MarkdownString.isMarkdownString(tooltip)) {
|
|
113
|
+
const markdownTooltip = tooltip;
|
|
114
|
+
const content = markdownTooltip.value;
|
|
115
|
+
// Find all command links in the markdown content
|
|
116
|
+
const regex = /\[([^\]]+)\]\(command:([^?\s\)]+)(?:\?([^\s\)]+))?([^\)]*)\)/g;
|
|
117
|
+
let match;
|
|
118
|
+
let updatedContent = content;
|
|
119
|
+
|
|
120
|
+
while ((match = regex.exec(content)) !== null) {
|
|
121
|
+
const linkText = match[1];
|
|
122
|
+
const commandId = match[2];
|
|
123
|
+
const argsEncoded = match[3]; // This captures the encoded arguments
|
|
124
|
+
const tooltipPart = match[4] || ''; // This captures any tooltip or additional content after the command and args
|
|
125
|
+
|
|
126
|
+
let args: unknown[] = [];
|
|
127
|
+
if (argsEncoded) {
|
|
128
|
+
try {
|
|
129
|
+
const decoded = decodeURIComponent(argsEncoded);
|
|
130
|
+
args = JSON.parse(decoded);
|
|
131
|
+
} catch (e) {
|
|
132
|
+
console.error('Failed to parse command arguments:', e);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const safeCommand = this.commandRegistry.converter.toSafeCommand(
|
|
137
|
+
{
|
|
138
|
+
command: commandId,
|
|
139
|
+
title: linkText,
|
|
140
|
+
arguments: Array.isArray(args) ? args : [args]
|
|
141
|
+
},
|
|
142
|
+
new DisposableCollection()
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
if (safeCommand?.id) {
|
|
146
|
+
let newArgsPart = '';
|
|
147
|
+
if (safeCommand.arguments && safeCommand.arguments.length > 0) {
|
|
148
|
+
newArgsPart = `?${encodeURIComponent(JSON.stringify(safeCommand.arguments))}`;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const argsPart = argsEncoded ? `?${argsEncoded}` : '';
|
|
152
|
+
const originalLink = `[${linkText}](command:${commandId}${argsPart}${tooltipPart})`;
|
|
153
|
+
const safeLink = `[${linkText}](command:${safeCommand.id}${newArgsPart}${tooltipPart})`;
|
|
154
|
+
updatedContent = updatedContent.replace(originalLink, safeLink);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (updatedContent !== content) {
|
|
159
|
+
markdownTooltip.value = updatedContent;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
108
162
|
this._tooltip = tooltip;
|
|
109
163
|
this.update();
|
|
110
164
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from '../common/plugin-api-rpc';
|
|
21
21
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
22
22
|
import { StatusBarItemImpl } from './status-bar/status-bar-item';
|
|
23
|
+
import { CommandRegistryImpl } from './command-registry';
|
|
23
24
|
|
|
24
25
|
/*---------------------------------------------------------------------------------------------
|
|
25
26
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -32,7 +33,7 @@ export class StatusBarMessageRegistryExt {
|
|
|
32
33
|
|
|
33
34
|
protected readonly statusMessage: StatusBarMessage;
|
|
34
35
|
|
|
35
|
-
constructor(rpc: RPCProtocol) {
|
|
36
|
+
constructor(rpc: RPCProtocol, readonly commandRegistry: CommandRegistryImpl) {
|
|
36
37
|
this.proxy = rpc.getProxy(Ext.STATUS_BAR_MESSAGE_REGISTRY_MAIN);
|
|
37
38
|
this.statusMessage = new StatusBarMessage(this);
|
|
38
39
|
}
|
|
@@ -58,7 +59,7 @@ export class StatusBarMessageRegistryExt {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
createStatusBarItem(alignment?: StatusBarAlignment, priority?: number, id?: string): StatusBarItem {
|
|
61
|
-
return new StatusBarItemImpl(this.proxy, alignment, priority, id);
|
|
62
|
+
return new StatusBarItemImpl(this.proxy, this.commandRegistry, alignment, priority, id);
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
}
|
|
@@ -27,6 +27,8 @@ export class TextEditorExt implements theia.TextEditor {
|
|
|
27
27
|
private _viewColumn: theia.ViewColumn | undefined;
|
|
28
28
|
private _document: DocumentDataExt;
|
|
29
29
|
private _options: TextEditorOptionsExt;
|
|
30
|
+
private _diffInformation: theia.TextEditorDiffInformation[] | undefined;
|
|
31
|
+
|
|
30
32
|
private disposed = false;
|
|
31
33
|
constructor(
|
|
32
34
|
private readonly proxy: TextEditorsMain,
|
|
@@ -278,6 +280,15 @@ export class TextEditorExt implements theia.TextEditor {
|
|
|
278
280
|
getDiffInformation(): Promise<theia.LineChange[]> {
|
|
279
281
|
return this.proxy.$getDiffInformation(this.id);
|
|
280
282
|
}
|
|
283
|
+
|
|
284
|
+
_acceptDiffInformation(diffInformation: theia.TextEditorDiffInformation[] | undefined): void {
|
|
285
|
+
// ok(!this._disposed);
|
|
286
|
+
this._diffInformation = diffInformation;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
get diffInformation(): theia.TextEditorDiffInformation[] | undefined {
|
|
290
|
+
return this._diffInformation;
|
|
291
|
+
}
|
|
281
292
|
}
|
|
282
293
|
|
|
283
294
|
export class TextEditorOptionsExt implements theia.TextEditorOptions {
|
|
@@ -21,7 +21,7 @@ import { Emitter, Event } from '@theia/core/lib/common/event';
|
|
|
21
21
|
import { EditorsAndDocumentsExtImpl } from './editors-and-documents';
|
|
22
22
|
import { TextEditorExt } from './text-editor';
|
|
23
23
|
import * as Converters from './type-converters';
|
|
24
|
-
import { TextEditorSelectionChangeKind, URI } from './types-impl';
|
|
24
|
+
import { TextEditorChangeKind, TextEditorSelectionChangeKind, URI } from './types-impl';
|
|
25
25
|
import { IdGenerator } from '../common/id-generator';
|
|
26
26
|
|
|
27
27
|
export class TextEditorsExtImpl implements TextEditorsExt {
|
|
@@ -29,6 +29,7 @@ export class TextEditorsExtImpl implements TextEditorsExt {
|
|
|
29
29
|
private readonly _onDidChangeTextEditorOptions = new Emitter<theia.TextEditorOptionsChangeEvent>();
|
|
30
30
|
private readonly _onDidChangeTextEditorVisibleRanges = new Emitter<theia.TextEditorVisibleRangesChangeEvent>();
|
|
31
31
|
private readonly _onDidChangeTextEditorViewColumn = new Emitter<theia.TextEditorViewColumnChangeEvent>();
|
|
32
|
+
private readonly _onDidChangeTextEditorDiffInformation = new Emitter<theia.TextEditorDiffInformationChangeEvent>();
|
|
32
33
|
private readonly _onDidChangeActiveTextEditor = new Emitter<theia.TextEditor | undefined>();
|
|
33
34
|
private readonly _onDidChangeVisibleTextEditors = new Emitter<theia.TextEditor[]>();
|
|
34
35
|
|
|
@@ -36,6 +37,7 @@ export class TextEditorsExtImpl implements TextEditorsExt {
|
|
|
36
37
|
readonly onDidChangeTextEditorOptions = this._onDidChangeTextEditorOptions.event;
|
|
37
38
|
readonly onDidChangeTextEditorVisibleRanges = this._onDidChangeTextEditorVisibleRanges.event;
|
|
38
39
|
readonly onDidChangeTextEditorViewColumn = this._onDidChangeTextEditorViewColumn.event;
|
|
40
|
+
readonly onDidChangeTextEditorDiffInformation = this._onDidChangeTextEditorDiffInformation.event;
|
|
39
41
|
readonly onDidChangeActiveTextEditor = this._onDidChangeActiveTextEditor.event;
|
|
40
42
|
readonly onDidChangeVisibleTextEditors = this._onDidChangeVisibleTextEditors.event;
|
|
41
43
|
|
|
@@ -118,6 +120,73 @@ export class TextEditorsExtImpl implements TextEditorsExt {
|
|
|
118
120
|
return activeEditor.getDiffInformation();
|
|
119
121
|
}
|
|
120
122
|
|
|
123
|
+
$acceptEditorDiffInformation(id: string, diffInformation: theia.TextEditorDiffInformation[] | undefined): void {
|
|
124
|
+
const textEditor = this.editorsAndDocuments.getEditor(id);
|
|
125
|
+
if (!textEditor) {
|
|
126
|
+
throw new Error('unknown text editor');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (!diffInformation) {
|
|
130
|
+
textEditor._acceptDiffInformation(undefined);
|
|
131
|
+
this._onDidChangeTextEditorDiffInformation.fire({
|
|
132
|
+
textEditor: textEditor,
|
|
133
|
+
diffInformation: undefined
|
|
134
|
+
});
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const that = this;
|
|
139
|
+
const result = diffInformation.map(diff => {
|
|
140
|
+
const original = URI.revive(diff.original);
|
|
141
|
+
const modified = URI.revive(diff.modified);
|
|
142
|
+
|
|
143
|
+
const changes = diff.changes.map(change => {
|
|
144
|
+
const originalStartLineNumber = change.original.startLineNumber;
|
|
145
|
+
const originalEndLineNumberExclusive = change.original.endLineNumberExclusive;
|
|
146
|
+
const modifiedStartLineNumber = change.modified.startLineNumber;
|
|
147
|
+
const modifiedEndLineNumberExclusive = change.modified.endLineNumberExclusive;
|
|
148
|
+
|
|
149
|
+
let kind: TextEditorChangeKind;
|
|
150
|
+
if (change.original.startLineNumber === originalEndLineNumberExclusive) {
|
|
151
|
+
kind = TextEditorChangeKind.Addition;
|
|
152
|
+
} else if (modifiedStartLineNumber === modifiedEndLineNumberExclusive) {
|
|
153
|
+
kind = TextEditorChangeKind.Deletion;
|
|
154
|
+
} else {
|
|
155
|
+
kind = TextEditorChangeKind.Modification;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return {
|
|
159
|
+
original: {
|
|
160
|
+
startLineNumber: originalStartLineNumber,
|
|
161
|
+
endLineNumberExclusive: originalEndLineNumberExclusive
|
|
162
|
+
},
|
|
163
|
+
modified: {
|
|
164
|
+
startLineNumber: modifiedStartLineNumber,
|
|
165
|
+
endLineNumberExclusive: modifiedEndLineNumberExclusive
|
|
166
|
+
},
|
|
167
|
+
kind
|
|
168
|
+
} satisfies theia.TextEditorChange;
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
return Object.freeze({
|
|
172
|
+
documentVersion: diff.documentVersion,
|
|
173
|
+
original,
|
|
174
|
+
modified,
|
|
175
|
+
changes,
|
|
176
|
+
get isStale(): boolean {
|
|
177
|
+
const document = that.editorsAndDocuments.getDocument(modified.toString());
|
|
178
|
+
return document?.document.version !== diff.documentVersion;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
textEditor._acceptDiffInformation(result);
|
|
184
|
+
this._onDidChangeTextEditorDiffInformation.fire({
|
|
185
|
+
textEditor: textEditor,
|
|
186
|
+
diffInformation: result
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
121
190
|
getVisibleTextEditors(): theia.TextEditor[] {
|
|
122
191
|
return this.editorsAndDocuments.allEditors();
|
|
123
192
|
}
|