mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-28 19:11:03 +08:00
refactor(vscode): clarify prompt rail edge intent
This commit is contained in:
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user