refactor(editor): use const assertion for editor types with single source of truth (#8604)

This commit is contained in:
CHAEWAN KIM
2025-12-03 15:16:19 +09:00
committed by GitHub
parent b9b3b8050d
commit 0857345945
3 changed files with 58 additions and 44 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ import {
isNodeError,
parseAndFormatApiError,
safeLiteralReplace,
DEFAULT_GUI_EDITOR,
type AnyDeclarativeTool,
type ToolCall,
type ToolConfirmationPayload,
@@ -435,7 +436,7 @@ export class Task {
outputUpdateHandler: this._schedulerOutputUpdate.bind(this),
onAllToolCallsComplete: this._schedulerAllToolCallsComplete.bind(this),
onToolCallsUpdate: this._schedulerToolCallsUpdate.bind(this),
getPreferredEditor: () => 'vscode',
getPreferredEditor: () => DEFAULT_GUI_EDITOR,
config: this.config,
});
return scheduler;