diff options
| author | Dax Raad <[email protected]> | 2025-05-30 14:40:53 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-30 14:40:59 -0400 |
| commit | e9bad39a7ed224efefe2d21a35a7d27cd25e0879 (patch) | |
| tree | f1ae466b4b6bac86a11f56a2e0cca366a1192685 /app/packages/web/src/components | |
| parent | 42c7880858ee9bec72f3fb71c7f19512a38b0b8e (diff) | |
| download | opencode-e9bad39a7ed224efefe2d21a35a7d27cd25e0879.tar.gz opencode-e9bad39a7ed224efefe2d21a35a7d27cd25e0879.zip | |
sync
Diffstat (limited to 'app/packages/web/src/components')
| -rw-r--r-- | app/packages/web/src/components/Share.tsx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/app/packages/web/src/components/Share.tsx b/app/packages/web/src/components/Share.tsx index db533831d..ac75a3cf7 100644 --- a/app/packages/web/src/components/Share.tsx +++ b/app/packages/web/src/components/Share.tsx @@ -26,7 +26,6 @@ import { IconPencilSquare, IconWrenchScrewdriver, } from "./icons" -import CodeBlock from "./CodeBlock" import DiffView from "./DiffView" import styles from "./share.module.css" import { type UIMessage } from "ai" @@ -219,7 +218,7 @@ function PartFooter(props: { time: number }) { export default function Share(props: { api: string }) { let params = new URLSearchParams(document.location.search) - const sessionId = params.get("id") + const id = params.get("id") const [store, setStore] = createStore<{ info?: SessionInfo @@ -233,12 +232,8 @@ export default function Share(props: { api: string }) { onMount(() => { const apiUrl = props.api - console.log("Mounting Share component with ID:", sessionId) - console.log("API URL:", apiUrl) - - if (!sessionId) { - console.error("Session ID not found in environment variables") - setConnectionStatus(["error", "Session ID not found"]) + if (!id) { + setConnectionStatus(["error", "id not found"]) return } @@ -262,7 +257,7 @@ export default function Share(props: { api: string }) { // Always use secure WebSocket protocol (wss) const wsBaseUrl = apiUrl.replace(/^https?:\/\//, "wss://") - const wsUrl = `${wsBaseUrl}/share_poll?id=${sessionId}` + const wsUrl = `${wsBaseUrl}/share_poll?id=${id}` console.log("Connecting to WebSocket URL:", wsUrl) // Create WebSocket connection |
