Skip to content

Commit ad2e199

Browse files
authored
reveal content widget when outside view port (microsoft#208405)
re microsoft/vscode-copilot#4599
1 parent 88ea3e1 commit ad2e199

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { ChatWidget } from 'vs/workbench/contrib/chat/browser/chatWidget';
1919
import { ChatAgentLocation } from 'vs/workbench/contrib/chat/common/chatAgents';
2020
import { editorBackground, editorForeground, inputBackground } from 'vs/platform/theme/common/colorRegistry';
2121
import { ChatModel } from 'vs/workbench/contrib/chat/common/chatModel';
22+
import { Range } from 'vs/editor/common/core/range';
2223

2324
export class InlineChatContentWidget implements IContentWidget {
2425

@@ -158,6 +159,7 @@ export class InlineChatContentWidget implements IContentWidget {
158159
this._visible = true;
159160
this._focusNext = true;
160161

162+
this._editor.revealRangeNearTopIfOutsideViewport(Range.fromPositions(position));
161163
this._widget.inputEditor.setValue('');
162164

163165
const wordInfo = this._editor.getModel()?.getWordAtPosition(position);

0 commit comments

Comments
 (0)