Route open providers by request mode
This commit is contained in:
+2
-2
@@ -97,8 +97,8 @@ Frontend bundles are mounted with a plugin-scoped API created by
|
||||
a concrete editor plugin.
|
||||
|
||||
Editor/viewer plugins contribute providers with `contributes.openProviders`.
|
||||
Workbench selects by resource kind, extension/mime, context (`generic-text`,
|
||||
`generic-markdown`, `notes-markdown`), user preference, priority, then
|
||||
Workbench selects by resource kind, request mode, extension/mime, context
|
||||
(`generic-text`, `generic-markdown`, `notes-markdown`), user preference, priority, then
|
||||
deterministic `pluginId/providerId` tie-break. If nothing matches, Workbench
|
||||
shows `no-provider` fallback instead of a core editor.
|
||||
|
||||
|
||||
@@ -317,7 +317,8 @@ the Workbench helper.
|
||||
{
|
||||
"kind": "vault-file",
|
||||
"extensions": [".md", ".markdown"],
|
||||
"contexts": ["generic-markdown", "notes-markdown"]
|
||||
"contexts": ["generic-markdown", "notes-markdown"],
|
||||
"modes": ["view"]
|
||||
},
|
||||
{
|
||||
"kind": "vault-file",
|
||||
@@ -333,7 +334,7 @@ the Workbench helper.
|
||||
```
|
||||
|
||||
Selection uses enabled loaded/degraded provider plugins, resource kind,
|
||||
extension/mime, context, user preference, priority, then deterministic
|
||||
request mode, extension/mime, context, user preference, priority, then deterministic
|
||||
`pluginId/providerId` fallback. If nothing matches, Workbench returns
|
||||
`status: "no-provider"` and shows the fallback view instead of a core editor.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user