From ef9d0daef4bd1a6f12d3e1e5b30b9f675aabd407 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 23 Dec 2024 15:37:06 -0800 Subject: [PATCH] minor chat styles --- .../contrib/void/browser/inlineDiffsService.ts | 7 ++++--- .../void/browser/react/src/sidebar-tsx/Sidebar.tsx | 2 +- .../void/browser/react/src/sidebar-tsx/SidebarChat.tsx | 2 +- .../contrib/void/browser/react/src/util/inputs.tsx | 10 +++++++--- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts b/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts index ec499bab..87039031 100644 --- a/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts +++ b/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts @@ -377,7 +377,7 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { const { snapshottedDiffAreaOfId, entireFileCode: entireModelCode } = structuredClone(snapshot) // don't want to destroy the snapshot // delete all current decorations (diffs, sweep styles) so we don't have any unwanted leftover decorations - this._clearAllDiffsAndStyles(uri) + this._clearAllDiffsAndAllStyles(uri) // restore diffAreaOfId and diffAreasOfModelId this.diffAreaOfId = {} @@ -436,7 +436,8 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { } } - private _clearAllDiffsAndStyles(uri: URI) { + // clears styles of DiffAreas too + private _clearAllDiffsAndAllStyles(uri: URI) { for (let diffareaid of this.diffAreasOfURI[uri.fsPath]) { const diffArea = this.diffAreaOfId[diffareaid] this._deleteDiffs(diffArea) @@ -529,7 +530,7 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { if (content === null) return // 1. clear Diffs and styles - this._clearAllDiffsAndStyles(uri) + this._clearAllDiffsAndAllStyles(uri) // 2. recompute all diffs on each editor with this URI const fullFileText = this._readURI(uri) ?? '' diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx index 55fa83b7..3c2e5857 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx @@ -31,7 +31,7 @@ export const Sidebar = ({ className }: { className: string }) => { sidebarStateService.setState({ currentTab: tabs[(index + 1) % tabs.length] as any }) }}>clickme {tab} */} -
+
diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index d3c1ce8b..1194dbf8 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -300,7 +300,7 @@ const ChatBubble = ({ chatMessage }: { } return
-
+
{chatbubbleContents}
diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx index 260f8c75..03cb9960 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx @@ -287,7 +287,7 @@ const normalizeIndentation = (code: string): string => { export const VoidCodeEditor = ({ initValue, language }: { initValue: string, language: string | undefined }) => { - const MAX_HEIGHT = 200; + const MAX_HEIGHT = Infinity; const divRef = useRef(null) @@ -310,8 +310,8 @@ export const VoidCodeEditor = ({ initValue, language }: { initValue: string, lan scrollbar: { alwaysConsumeMouseWheel: false, - vertical: 'auto', - horizontal: 'auto', + vertical: 'hidden', + horizontal: 'hidden', }, scrollBeyondLastLine: false, @@ -335,6 +335,10 @@ export const VoidCodeEditor = ({ initValue, language }: { initValue: string, lan hideCursorInOverviewRuler: true, overviewRulerBorder: false, glyphMargin: false, + + stickyScroll: { + enabled: false, + }, }, { isSimpleWidget: true,