refactor(vscode): clarify prompt rail edge intent

This commit is contained in:
marius-kilocode
2026-08-27 11:24:37 +02:00
parent 8c0a570222
commit fddaf5fb0e
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -5321,6 +5321,7 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper
private _getHtmlForWebview(webview: vscode.Webview, sidebar = false): string {
return buildWebviewHtml(webview, {
// The rail follows the physical workbench edge. RTL text direction must not move it between chat and code.
sidebar: sidebar
? vscode.workspace.getConfiguration("workbench").get("sideBar.location") === "right"
? "right"
@@ -1376,6 +1376,7 @@ export const MessageList: Component<MessageListProps> = (props) => {
</div>
<PromptRail
// Editor tabs and Agent Manager have no sidebar edge signal. Keep their rail on the physical right in RTL too.
side={vscode.sidebarSide() ?? "right"}
entries={entries}
items={items}
@@ -94,7 +94,7 @@ export function PromptRail(props: PromptRailProps) {
const center = rect.top + rect.height / 2 - height / 2
setAnchor({
top: max < min ? min : Math.min(Math.max(center, min), max),
edge: props.side === "right" ? window.innerWidth - rect.left + GAP : rect.right + GAP,
edge: (props.side === "right" ? window.innerWidth - rect.left : rect.right) + GAP,
height: limit,
})
}