Spaces:
Running
Running
visual animation for diff patch
Browse files- server.js +0 -1
- src/components/ask-ai/ask-ai.tsx +1 -3
- src/views/App.tsx +2 -0
server.js
CHANGED
@@ -550,7 +550,6 @@ ${REPLACE_END}
|
|
550 |
const startLineNumber = beforeText.split("\n").length;
|
551 |
|
552 |
// Count lines in search and replace blocks
|
553 |
-
const searchLines = searchBlock.split("\n").length;
|
554 |
const replaceLines = replaceBlock.split("\n").length;
|
555 |
|
556 |
// Calculate end line (start + length of replaced content)
|
|
|
550 |
const startLineNumber = beforeText.split("\n").length;
|
551 |
|
552 |
// Count lines in search and replace blocks
|
|
|
553 |
const replaceLines = replaceBlock.split("\n").length;
|
554 |
|
555 |
// Calculate end line (start + length of replaced content)
|
src/components/ask-ai/ask-ai.tsx
CHANGED
@@ -235,8 +235,6 @@ function AskAI({
|
|
235 |
}
|
236 |
}, [isThinking]);
|
237 |
|
238 |
-
// TODO: auto scroll is not working properly, fix it
|
239 |
-
|
240 |
return (
|
241 |
<div className="bg-neutral-800 border border-neutral-700 rounded-lg ring-[5px] focus-within:ring-sky-500/50 ring-transparent z-10 absolute bottom-3 left-3 w-[calc(100%-20px)] group">
|
242 |
{think && (
|
@@ -337,7 +335,7 @@ function AskAI({
|
|
337 |
></div>
|
338 |
<div
|
339 |
className={classNames(
|
340 |
-
"absolute top-0 -translate-y-[calc(100%+8px)] right-0 z-10 w-80
|
341 |
{
|
342 |
"opacity-0 pointer-events-none": !open,
|
343 |
}
|
|
|
235 |
}
|
236 |
}, [isThinking]);
|
237 |
|
|
|
|
|
238 |
return (
|
239 |
<div className="bg-neutral-800 border border-neutral-700 rounded-lg ring-[5px] focus-within:ring-sky-500/50 ring-transparent z-10 absolute bottom-3 left-3 w-[calc(100%-20px)] group">
|
240 |
{think && (
|
|
|
335 |
></div>
|
336 |
<div
|
337 |
className={classNames(
|
338 |
+
"absolute top-0 -translate-y-[calc(100%+8px)] right-0 z-10 w-80 border border-neutral-800 !bg-neutral-900 rounded-lg shadow-lg transition-all duration-75 overflow-hidden",
|
339 |
{
|
340 |
"opacity-0 pointer-events-none": !open,
|
341 |
}
|
src/views/App.tsx
CHANGED
@@ -266,6 +266,8 @@ export default function App() {
|
|
266 |
editorRef?.current
|
267 |
?.getModel()
|
268 |
?.deltaDecorations([], decorations);
|
|
|
|
|
269 |
}, 100);
|
270 |
}
|
271 |
}}
|
|
|
266 |
editorRef?.current
|
267 |
?.getModel()
|
268 |
?.deltaDecorations([], decorations);
|
269 |
+
|
270 |
+
editorRef.current?.revealLine(updatedLines[0][0]);
|
271 |
}, 100);
|
272 |
}
|
273 |
}}
|