Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,10 @@ export class AgentFeedbackEditorWidget extends Disposable implements IOverlayWid

const widgetWidth = getTotalWidth(this._domNode) || 280;
const widgetHeight = this._domNode.offsetHeight || 0;
const headerHeight = this._headerNode.offsetHeight || lineHeight;

// Compute content-relative top and clamp to keep the widget within the editor content area
const contentRelativeTop = this._editor.getTopForLineNumber(startLineNumber) - lineHeight;
// Align the header center with the start line center before clamping within the editor content area.
const contentRelativeTop = this._editor.getTopForLineNumber(startLineNumber) + (lineHeight - headerHeight) / 2;
const scrollHeight = this._editor.getScrollHeight();
const clampedContentTop = Math.min(Math.max(0, contentRelativeTop), Math.max(0, scrollHeight - widgetHeight));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
.agent-feedback-widget-arrow {
position: absolute;
left: -8px;
top: 12px;
top: 9px;
width: 0;
height: 0;
border-top: 8px solid transparent;
Expand Down
Loading