refactor(hosts): Simplify the host provider interface for callers (#5057)
* refactor(hosts): Simplify the host provider interface for callers - Streamline API to reduce complexity for consuming code - Update all references across core, controller, and integration modules - Consolidate provider patterns for easier usage - Rename host-providers.ts to host-provider.ts # Conflicts: # src/core/controller/index.ts # src/extension.ts # src/integrations/git/commit-message-generator.ts * Add comment * In the tests, reset the HostProvider to prevent it complaining that it is being reinitialized * Update comment * Fix imports
This commit is contained in:
1 parent
c970b8030e
commit
8d5985c8fd
30 files changed
+223
-172
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { getHostBridgeProvider } from "@/hosts/host-providers"
|
||||
import { HostProvider } from "@/hosts/host-provider"
|
||||
import { Controller } from ".."
|
||||
import { ClineCheckpointRestore } from "../../../shared/WebviewMessage"
|
||||
import { CheckpointRestoreRequest } from "../../../shared/proto/checkpoints"
|
||||
@@ -15,7 +15,7 @@ export async function checkpointRestore(controller: Controller, request: Checkpo
|
||||
timeout: 3_000,
|
||||
}).catch((error) => {
|
||||
console.log("Failed to init new Cline instance to restore checkpoint", error)
|
||||
getHostBridgeProvider().windowClient.showMessage({
|
||||
HostProvider.window.showMessage({
|
||||
type: ShowMessageType.ERROR,
|
||||
message: "Failed to restore checkpoint",
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user