diff --git a/eslint.config.js b/eslint.config.js index 009545960ad..97456e65762 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -230,7 +230,6 @@ export default tseslint.config( 'src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.ts', 'src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.ts', 'src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.ts', - 'src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.ts', 'src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.ts', 'src/vs/platform/configuration/common/configuration.ts', 'src/vs/platform/configuration/common/configurationModels.ts', @@ -624,11 +623,9 @@ export default tseslint.config( 'src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.ts', 'src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.ts', 'src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.ts', - 'src/vs/workbench/contrib/chat/browser/chatInputPart.ts', 'src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts', 'src/vs/workbench/contrib/chat/browser/chatSessions/common.ts', 'src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.ts', - 'src/vs/workbench/contrib/chat/browser/chatWidget.ts', 'src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.ts', 'src/vs/workbench/contrib/chat/common/chatAgents.ts', 'src/vs/workbench/contrib/chat/common/chatModel.ts', diff --git a/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.ts b/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.ts index 749259c2711..9ec8fbfc480 100644 --- a/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.ts +++ b/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.ts @@ -147,8 +147,9 @@ export abstract class AbstractEditorNavigationQuickAccessProvider implements IQu if (!options.preserveFocus) { editor.focus(); } - const model = editor.getModel(); - if (model && 'getLineContent' in model) { + + const model = this.getModel(editor); + if (model) { status(`${model.getLineContent(options.range.startLineNumber)}`); } } diff --git a/src/vs/workbench/contrib/chat/browser/chatInputPart.ts b/src/vs/workbench/contrib/chat/browser/chatInputPart.ts index e7af5cedaf9..b3d27477a95 100644 --- a/src/vs/workbench/contrib/chat/browser/chatInputPart.ts +++ b/src/vs/workbench/contrib/chat/browser/chatInputPart.ts @@ -385,7 +385,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge private readonly location: ChatAgentLocation, private readonly options: IChatInputPartOptions, styles: IChatInputStyles, - getContribsInputState: () => any, + getContribsInputState: () => IChatInputState, private readonly inline: boolean, @IChatWidgetHistoryService private readonly historyService: IChatWidgetHistoryService, @IModelService private readonly modelService: IModelService, diff --git a/src/vs/workbench/contrib/chat/browser/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/chatWidget.ts index 8f49ee5f83d..9eadbe7c5b5 100644 --- a/src/vs/workbench/contrib/chat/browser/chatWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/chatWidget.ts @@ -120,12 +120,12 @@ export interface IChatWidgetContrib extends IDisposable { /** * A piece of state which is related to the input editor of the chat widget */ - getInputState?(): any; + getInputState?(): IChatInputState; /** * Called with the result of getInputState when navigating input history. */ - setInputState?(s: any): void; + setInputState?(s: IChatInputState): void; } interface IChatRequestInputOptions { @@ -290,6 +290,7 @@ const supportsAllAttachments: Required = { }; export class ChatWidget extends Disposable implements IChatWidget { + // eslint-disable-next-line @typescript-eslint/no-explicit-any public static readonly CONTRIBS: { new(...args: [IChatWidget, ...any]): IChatWidgetContrib }[] = []; private readonly _onDidSubmitAgent = this._register(new Emitter<{ agent: IChatAgentData; slashCommand?: IChatAgentCommand }>());