Skip to content

Commit 99ea755

Browse files
committed
Ensure all files are saved before initiating commit changes or context editing operations
1 parent 74005ec commit 99ea755

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎packages/vscode/src/views/panel/backend/message-handlers/handle-commit-changes/handle-commit-changes.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import {
1414
export const handle_commit_changes = async (
1515
provider: ViewProvider
1616
): Promise<void> => {
17+
await vscode.workspace.saveAll()
18+
1719
const repository = get_git_repository()
1820
if (!repository) {
1921
provider.send_message({ command: 'COMMIT_PROCESS_CANCELLED' })

‎packages/vscode/src/views/panel/backend/message-handlers/handle-edit-context.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ const perform_context_editing = async (params: {
219219
config_id?: string
220220
view_provider: ViewProvider
221221
}) => {
222+
await vscode.workspace.saveAll()
223+
222224
const api_providers_manager = new ModelProvidersManager(params.context)
223225

224226
const editor = vscode.window.activeTextEditor

0 commit comments

Comments
 (0)