Skip to content

Commit e6c6f3f

Browse files
committed
update convex and allow local dev
1 parent 741b179 commit e6c6f3f

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

example/convex/_generated/api.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import type {
1616
FilterApi,
1717
FunctionReference,
1818
} from "convex/server";
19+
1920
/**
2021
* A utility for referencing Convex functions in your app's API.
2122
*

example/src/components/message-item.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,17 @@ function ServerMessage({
8080
stopStreaming: () => void;
8181
scrollToBottom: () => void;
8282
}) {
83-
const convexSiteUrl = import.meta.env.VITE_CONVEX_URL.replace(
84-
/\.cloud$/,
85-
".site"
86-
);
83+
let convexSiteUrl;
84+
if (import.meta.env.VITE_CONVEX_URL.includes(".cloud")) {
85+
convexSiteUrl = import.meta.env.VITE_CONVEX_URL.replace(
86+
/\.cloud$/,
87+
".site"
88+
);
89+
} else {
90+
const url = new URL(import.meta.env.VITE_CONVEX_URL);
91+
url.port = String(Number(url.port) + 1);
92+
convexSiteUrl = url.toString();
93+
}
8794

8895
const { text, status } = useStream(
8996
api.chat.getChatBody,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
}
6868
},
6969
"peerDependencies": {
70-
"convex": "~1.16.5 || ~1.17.0 || ~1.18.0 || ~1.19.0",
70+
"convex": ">=1.23.0 <1.35.0",
7171
"react": "~18.3.1 || ~19.0.0",
7272
"react-dom": "~18.3.1 || ~19.0.0"
7373
},

src/component/_generated/api.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import type {
1616
FilterApi,
1717
FunctionReference,
1818
} from "convex/server";
19+
1920
/**
2021
* A utility for referencing Convex functions in your app's API.
2122
*

0 commit comments

Comments
 (0)