fix(gui): remove temporary multimodal routing state

This commit is contained in:
Yichen Jiang
2026-07-30 00:30:58 +08:00
parent fca74c470b
commit 3733bd1374
35 changed files with 69 additions and 426 deletions

View File

@@ -8,7 +8,7 @@
* explicit act of widening what features may do to the sessions domain.
*/
import type { Context } from 'cordis'
import type { HostDescription, SessionId } from '@deepseek-ai/dsh-client-connection/client'
import type { SessionId } from '@deepseek-ai/dsh-client-connection/client'
import type { HostObservable, SessionMaybeProvideInfo } from '@deepseek-ai/dsh-client-ui-slots'
import type {
SessionBinding, SessionListState, SessionProvideDescriptor,
@@ -22,11 +22,6 @@ export interface ISessions {
readonly list: ObservableSnapshot<SessionListState>
/** Atomic current-session provide projection (the renderer host's `sessions.provideInfo` feed). */
readonly currentProvideInfo: HostObservable<SessionMaybeProvideInfo>
/**
* Read the latest successfully received host capability description.
* @returns host capabilities, or undefined before the first successful handshake.
*/
hostDescription(): HostDescription | undefined
/**
* Select a session as current.
* @param id - session id (must exist in the list; unknown ids fail loud).

View File

@@ -178,7 +178,6 @@ export function apply(ctx: Context): void {
console.error('[web-runtime] history host-frame routing failed:', error)
}
},
onDescription: (description) => { sessions.handleDescription(description) },
onConnected: () => {
sessions.handleConnected()
workspaces.handleConnected()

View File

@@ -17,7 +17,7 @@
*/
import type { Context, Fiber } from 'cordis'
import type {
HostDescription, IApiClient, RpcError, SessionId, WorkspaceId,
IApiClient, RpcError, SessionId, WorkspaceId,
} from '@deepseek-ai/dsh-client-connection/client'
import type {
HostObservable, SessionMaybeProvideInfo, SessionProvideInfo,
@@ -191,7 +191,6 @@ export class SessionsService implements ISessions {
private watched: SessionId | undefined
/** Removed-while-staged sessions whose teardown waits for the stage to move away. */
private readonly deferredRemovals = new Set<SessionId>()
private description: HostDescription | undefined
/**
* @param ctx - client root context (scope fibers mount under it).
@@ -231,22 +230,6 @@ export class SessionsService implements ISessions {
rootCtx.reflect.provide('sessions', this, undefined)
}
/**
* Store the latest successful connection-generation host description.
* @param description - capability and deployment snapshot from `host.describe`.
*/
handleDescription(description: HostDescription): void {
this.description = description
}
/**
* Read the latest host capability snapshot.
* @returns the last successful description, or undefined before connection.
*/
hostDescription(): HostDescription | undefined {
return this.description
}
/**
* Register a per-session standard-props provider: every session-scope slot
* component receives the contributed members as standard props (`hooks`

View File

@@ -74,12 +74,6 @@ describe('runtime client apply', () => {
expect(workspaces.list.getSnapshot().items[0]?.workspaceId).toBe('w-new')
// Mux sink and onConnected route without throwing (manager semantics own the behavior).
bench.sinks?.onMuxEnvelope?.({ rpcId: 'r2' as never, payload: { type: 'stream/error', message: 'x' } as never })
bench.sinks?.onDescription?.({ version: '0', cwd: '/f', attachedSessions: 0 })
expect((sessions as { hostDescription(): unknown }).hostDescription()).toEqual({
version: '0',
cwd: '/f',
attachedSessions: 0,
})
bench.sinks?.onConnected?.()
})