|
@@ -8,7 +8,7 @@
|
|
|
* client half (see the contract module doc). Export discipline:
|
|
* client half (see the contract module doc). Export discipline:
|
|
|
* packages/client/AGENTS.md.
|
|
* packages/client/AGENTS.md.
|
|
|
*/
|
|
*/
|
|
|
-import type { ConnectionHandle, HostDescriptionSource } from '@deepseek-ai/dsh-client-connection/client'
|
|
|
|
|
|
|
+import type { ConnectionHandle } from '@deepseek-ai/dsh-client-connection/client'
|
|
|
import type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots'
|
|
import type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots'
|
|
|
import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'
|
|
import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'
|
|
|
// Type-only: pulls the locale plugin's Context merge (ctx.locale).
|
|
// Type-only: pulls the locale plugin's Context merge (ctx.locale).
|
|
@@ -45,11 +45,6 @@ const NS = 'workspace'
|
|
|
*/
|
|
*/
|
|
|
export const inject = ['slots', 'sessions', 'workspaces', 'locale', 'connection']
|
|
export const inject = ['slots', 'sessions', 'workspaces', 'locale', 'connection']
|
|
|
|
|
|
|
|
-const absentHostDescription: HostDescriptionSource = {
|
|
|
|
|
- getSnapshot: () => undefined,
|
|
|
|
|
- subscribe: () => () => {},
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* Register the browser and picker once their slot declarations are on the
|
|
* Register the browser and picker once their slot declarations are on the
|
|
|
* ledger. Inject factories return plain callbacks; data reads use the
|
|
* ledger. Inject factories return plain callbacks; data reads use the
|
|
@@ -58,7 +53,7 @@ const absentHostDescription: HostDescriptionSource = {
|
|
|
*/
|
|
*/
|
|
|
export function apply(ctx: ClientContext): void {
|
|
export function apply(ctx: ClientContext): void {
|
|
|
const connection = ctx.get('connection') as ConnectionHandle
|
|
const connection = ctx.get('connection') as ConnectionHandle
|
|
|
- const hostDescription = connection.hostDescription ?? absentHostDescription
|
|
|
|
|
|
|
+ const hostDescription = connection.hostDescription
|
|
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'ui-workspace: dictionaries')
|
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'ui-workspace: dictionaries')
|
|
|
|
|
|
|
|
const searchSessions: WorkspaceBrowserInjected['searchSessions'] = async (query, signal) => {
|
|
const searchSessions: WorkspaceBrowserInjected['searchSessions'] = async (query, signal) => {
|