diff --git a/apps/affiliation-rating-resolver/src/App.svelte b/apps/affiliation-rating-resolver/src/App.svelte index 10d0c6c..299c94f 100644 --- a/apps/affiliation-rating-resolver/src/App.svelte +++ b/apps/affiliation-rating-resolver/src/App.svelte @@ -8,7 +8,7 @@ // context-v/specs/Augment-From-Affiliations.md. import { onMount } from 'svelte'; - import { workspace, type RecordSet, type Row } from '@augment-it/workspace'; + import { workspace, type RecordSet, type Row, resolveWsUrl } from '@augment-it/workspace'; import ColumnMapper from './components/ColumnMapper.svelte'; import { normalizeRatingRecord, guessMapping, MAPPING_NONE } from './lib/normalize'; import { @@ -23,7 +23,7 @@ import type { RatingFieldMapping, RatingNormRecord, AffiliationDetail, Link, CorpusEntry } from './lib/types'; const TOKEN_KEY = 'augment-it:session-token'; - const WS_URL = 'ws://localhost:3001/ws'; + const WS_URL = resolveWsUrl(); const ACTIVE_RECORD_SET_KEY = 'augment-it:active-record-set'; const MAPPING_KEY_PREFIX = 'augment-it:affiliation-rating-resolver:mapping:'; diff --git a/apps/chat/src/App.svelte b/apps/chat/src/App.svelte index c5dbcd7..8e2bf1a 100644 --- a/apps/chat/src/App.svelte +++ b/apps/chat/src/App.svelte @@ -6,7 +6,7 @@ // is established independently (no shared workspace singleton). import { onMount } from 'svelte'; - import { workspace } from '@augment-it/workspace'; + import { workspace, resolveWsUrl } from '@augment-it/workspace'; import CharacterCastRow from './CharacterCastRow.svelte'; import ChatSurface from './ChatSurface.svelte'; @@ -15,9 +15,7 @@ // even when mounted inside the shell, so it needs the same env-configured // WS_URL the shell and corpora-curator each read (rsbuild inlines // PUBLIC_-prefixed vars into import.meta.env at build time). - const WS_URL = - ((import.meta as { env?: Record }).env?.PUBLIC_WS_URL as string | undefined) || - 'ws://localhost:3001/ws'; + const WS_URL = resolveWsUrl(); let connectionStatus = $state<'connecting' | 'open' | 'closed' | 'error' | 'auth_required'>('connecting'); diff --git a/apps/corpora-curator/src/App.svelte b/apps/corpora-curator/src/App.svelte index 70a5bee..f8afe8f 100644 --- a/apps/corpora-curator/src/App.svelte +++ b/apps/corpora-curator/src/App.svelte @@ -1,12 +1,12 @@