Files
deepseek-harness/packages/client/connection/tests/synced-config.client.ts
T
imccyu 3c0cef3560 refactor(client): deliver page-global Host configuration through synced plugin Config
Move shortcuts, account notifications, Models onboarding, document preview,
account contact, and connection recovery off their own webserver/index-inject
page globals onto top-level volatile Config fields that reach each browser face
as SyncedConfig. Keep cordis.yml keys and defaults, keep a typed Host config
parameter so the config catalog still lists these packages (also restoring
ui-context-menu), and regenerate catalogs.
2026-11-17 22:20:29 +08:00

14 lines
791 B
TypeScript

/** Synced Config objects for Connection Client specs; this package cannot depend on the test runtime that depends on it. */
import type { SyncedConfig } from '@deepseek-ai/dsh-client-config/types'
import type { ConnectionRecoveryConfig } from '../src/recovery-config.ts'
import type { ConnectionConfig } from '../src/types.ts'
/**
* Build the activation's synced Config holding a fixed recovery value.
* @param recovery - synced recovery timing; omission models a value the Host did not send.
* @returns the object a Client activation receives as its `apply` config.
*/
export function syncedConnectionConfig(recovery?: ConnectionRecoveryConfig): SyncedConfig<ConnectionConfig> {
return { recovery: { get: () => recovery, getSnapshot: () => recovery, subscribe: () => () => {} } }
}