SCM - input box value provider rendering (#198923)

* Initial implementation

* Remove debug messages

* Implementation using a custom ActionViewItem

* Switched to using a custom action along with the custom action view item

* Switch to using arrays

* Refactored code (single provider is working)

* Add ActionRunner to options

* WIP - saving my work

* Refactor things to support one provider

* Add setting to enable/disable input action button

* Add sourceControlId to the proposed API

* Fix issue related to enablement

* Remove code that is not in scope

* Have the old action bar work with the setting

* Remove code that was commented out

* Add extension API changes

* Update extensions/git/src/commitMessageProvider.ts

Co-authored-by: João Moreno <joao.moreno@microsoft.com>

* Fix compilation errors

---------

Co-authored-by: João Moreno <joao.moreno@microsoft.com>
This commit is contained in:
Ladislau Szomoru
2023-11-23 16:39:53 +01:00
committed by GitHub
parent f860fcf110
commit a776d5fe0a
16 changed files with 245 additions and 32 deletions

View File

@@ -157,6 +157,10 @@ export class ApiRepository implements Repository {
return this.repository.diffBetween(ref1, ref2, path);
}
getDiff(): Promise<string[]> {
return this.repository.getDiff();
}
hashObject(data: string): Promise<string> {
return this.repository.hashObject(data);
}
@@ -341,6 +345,9 @@ export class ApiImpl implements API {
return this._model.registerBranchProtectionProvider(root, provider);
}
/**
* @deprecated See https://github.com/microsoft/vscode/issues/195474
*/
registerCommitMessageProvider(provider: CommitMessageProvider): Disposable {
return this._model.registerCommitMessageProvider(provider);
}

View File

@@ -223,6 +223,8 @@ export interface Repository {
diffBetween(ref1: string, ref2: string): Promise<Change[]>;
diffBetween(ref1: string, ref2: string, path: string): Promise<string>;
getDiff(): Promise<string[]>;
hashObject(data: string): Promise<string>;
createBranch(name: string, checkout: boolean, ref?: string): Promise<void>;