reveal content widget when outside view port (#208405)

re https://github.com/microsoft/vscode-copilot/issues/4599
This commit is contained in:
Johannes Rieken 2024-03-22 14:24:40 +01:00 committed by GitHub
parent 88ea3e1662
commit ad2e199859
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,6 +19,7 @@ import { ChatWidget } from 'vs/workbench/contrib/chat/browser/chatWidget';
import { ChatAgentLocation } from 'vs/workbench/contrib/chat/common/chatAgents';
import { editorBackground, editorForeground, inputBackground } from 'vs/platform/theme/common/colorRegistry';
import { ChatModel } from 'vs/workbench/contrib/chat/common/chatModel';
import { Range } from 'vs/editor/common/core/range';
export class InlineChatContentWidget implements IContentWidget {
@ -158,6 +159,7 @@ export class InlineChatContentWidget implements IContentWidget {
this._visible = true;
this._focusNext = true;
this._editor.revealRangeNearTopIfOutsideViewport(Range.fromPositions(position));
this._widget.inputEditor.setValue('');
const wordInfo = this._editor.getModel()?.getWordAtPosition(position);