Replace vscode show message API calls with the host bridge (#5161)

This commit is contained in:
Sarah Fortune authored and GitHub committed 2025-07-25 11:48:16 -04:00
1 parent 66fb8835a4
commit 38babe12f7
3 files changed
+82 -25

No files matched your search

@@ -38,7 +38,10 @@ async function generate(context: vscode.ExtensionContext, scm?: vscode.SourceCon
const inputBox = scm?.inputBox
if (!inputBox) {
vscode.window.showErrorMessage("Git extension not found or no repositories available")
HostProvider.window.showMessage({
type: ShowMessageType.ERROR,
message: "Git extension not found or no repositories available",
})
return
}
@@ -100,7 +103,10 @@ Commit message:`
}
} catch (error) {
const errorMessage = error instanceof Error ? error.message : String(error)
vscode.window.showErrorMessage(`Failed to generate commit message: ${errorMessage}`)
HostProvider.window.showMessage({
type: ShowMessageType.ERROR,
message: `Failed to generate commit message: ${errorMessage}`,
})
} finally {
vscode.commands.executeCommand("setContext", "cline.isGeneratingCommit", false)
}