Skip to content

Commit a56568a

Browse files
committed
Fix lint issues and rebase main
1 parent 5df798a commit a56568a

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

apps/web/src/components/ChatView.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,17 @@ interface ChatViewProps {
190190
threadId: ThreadId;
191191
}
192192

193+
function extendReplacementRangeForTrailingSpace(
194+
text: string,
195+
rangeEnd: number,
196+
replacement: string,
197+
): number {
198+
if (!replacement.endsWith(" ")) {
199+
return rangeEnd;
200+
}
201+
return text[rangeEnd] === " " ? rangeEnd + 1 : rangeEnd;
202+
}
203+
193204
export default function ChatView({ threadId }: ChatViewProps) {
194205
const threads = useStore((store) => store.threads);
195206
const projects = useStore((store) => store.projects);

apps/web/vite.config.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import tailwindcss from "@tailwindcss/vite";
2-
import react from "@vitejs/plugin-react";
2+
import babel from "@rolldown/plugin-babel";
3+
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
34
import { tanstackRouter } from "@tanstack/router-plugin/vite";
45
import { defineConfig } from "vite";
56
import pkg from "./package.json" with { type: "json" };
@@ -17,12 +18,9 @@ const buildSourcemap =
1718
export default defineConfig({
1819
plugins: [
1920
tanstackRouter(),
20-
react({
21-
babel: {
22-
// Keep React compiler parsing explicit for workspace files outside the app cwd.
23-
parserOpts: { plugins: ["typescript", "jsx"] },
24-
plugins: ["babel-plugin-react-compiler"],
25-
},
21+
react(),
22+
babel({
23+
presets: [reactCompilerPreset()],
2624
}),
2725
tailwindcss(),
2826
],

0 commit comments

Comments
 (0)