autoscroll wip

This commit is contained in:
Niels Geens
2024-11-22 17:43:23 +01:00
parent 69f4f8a6fc
commit eb89564aac
5 changed files with 67 additions and 62 deletions

View File

@@ -39,6 +39,7 @@ const App = () => {
const [activeTab, setActiveTab] = useState(Tabs.CONTEXT);
const [showDiff, setShowDiff] = useState(false);
const [showSidebar, setShowSidebar] = useState(false);
const [autoScroll, setAutoScroll] = useState(false);
// WebSocket connections
const wsRoot = `${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/ws`
@@ -239,7 +240,7 @@ const App = () => {
originalContent={generatedContext}
modifiedContent={modifiedContext}
onChange={handleContextEdit}
validationError={null}
autoScroll={autoScroll}
/>
)}
{activeTab === Tabs.RESPONSE && (
@@ -251,7 +252,6 @@ const App = () => {
...prev,
[activeLlm]: value
}))}
validationError={null}
/>
)}
{activeTab === Tabs.INPUT && (
@@ -276,6 +276,8 @@ const App = () => {
activeLlm={activeLlm}
llmState={llms[activeLlm]}
showDiff={showDiff}
autoScroll={autoScroll}
onAutoScrollChange={(enabled) => setAutoScroll(enabled)}
input={input}
output={output}
autoApproverConfig={autoApproverConfig}