Add open provider mode support to SDK
This commit is contained in:
parent
d15e79db13
commit
8cab72cf29
|
|
@ -173,6 +173,7 @@ export interface OpenProviderSupport {
|
|||
extensions?: string[];
|
||||
mime?: string[];
|
||||
contexts?: OpenResourceContextName[];
|
||||
modes?: OpenResourceMode[];
|
||||
}
|
||||
export interface ContributionOpenProvider {
|
||||
id: string;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -393,6 +393,13 @@
|
|||
"contexts": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"modes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": ["view", "edit"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["kind"]
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ describe('VerstakPluginAPI contract', () => {
|
|||
kind: 'vault-file',
|
||||
extensions: ['.md', '.markdown'],
|
||||
contexts: ['generic-markdown', 'notes-markdown'],
|
||||
modes: ['view'],
|
||||
},
|
||||
{
|
||||
kind: 'vault-file',
|
||||
|
|
@ -111,6 +112,7 @@ describe('VerstakPluginAPI contract', () => {
|
|||
};
|
||||
|
||||
expect(manifest.contributes?.openProviders?.[0].supports[0].contexts).toContain('notes-markdown');
|
||||
expect(manifest.contributes?.openProviders?.[0].supports[0].modes).toContain('view');
|
||||
expect(manifest.contributes?.openProviders?.[0].supports[1].contexts).toContain('generic-text');
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ export interface OpenProviderSupport {
|
|||
extensions?: string[];
|
||||
mime?: string[];
|
||||
contexts?: OpenResourceContextName[];
|
||||
modes?: OpenResourceMode[];
|
||||
}
|
||||
|
||||
export interface ContributionOpenProvider {
|
||||
|
|
|
|||
Loading…
Reference in New Issue