Files
deepseek-harness/packages/client/web/src/seed.ts
T
creatixchu e611e825b1 feat(web): align attachment display with DeepSeek Chat via ui-attachment atoms
Single-click original preview in the composer rail and chat history; remove
control inside the thumbnail, revealed on hover/focus (always on touch);
hidden-scrollbar rail overflow paged by edge arrows with wheel panning and
end-reveal on add; image-intake rejections and prompt failures announce as a
transient top-center toast instead of inline strips.

The attachment atoms move to a new zero-cordis package
@deepseek-ai/dsh-client-ui-attachment (rail, message gallery, lightbox),
seeded as a platform module; the toast is a ui-primitives atom. Strings
arrive as label props bridged from the conversation dictionary.
2026-08-11 17:01:29 +08:00

42 lines
1.9 KiB
TypeScript

/**
* Platform-singleton module-table. These are the ONLY entities the shell
* shares into the frozen module table — fetch bundles resolve their externals
* against exactly this set through the loader's require. Keys come from the
* platform constant module ({@link ./platform.ts}, the single source
* of truth with the tsdown client externals); values stay shell-static
* imports so every bundle sees the same instance.
*/
import * as React from 'react'
import * as ReactJsxRuntime from 'react/jsx-runtime'
import * as ReactDom from 'react-dom'
import * as ReactDomClient from 'react-dom/client'
import * as Cordis from '@deepseek-ai/cordis'
import * as UiSlots from '@deepseek-ai/dsh-client-ui-slots'
import * as WebReact from '@deepseek-ai/dsh-client-web-react'
import * as UiPrimitives from '@deepseek-ai/dsh-client-ui-primitives'
import * as UiAttachment from '@deepseek-ai/dsh-client-ui-attachment'
import * as SchemaForm from '@deepseek-ai/dsh-client-schema-form'
import type { PlatformModule } from './platform.ts'
/**
* Build the static table handed to the module loader at boot.
* @returns module specifier → exported entity (one entry per platform word).
*/
export function getStaticModules(): Record<string, unknown> {
// The satisfies pin is the projection contract: a word added to
// PLATFORM_MODULES without a static import here (or vice versa) fails to
// compile instead of drifting into a runtime require miss.
return {
'react': React,
'react/jsx-runtime': ReactJsxRuntime,
'react-dom': ReactDom,
'react-dom/client': ReactDomClient,
'@deepseek-ai/cordis': Cordis,
'@deepseek-ai/dsh-client-ui-slots': UiSlots,
'@deepseek-ai/dsh-client-web-react': WebReact,
'@deepseek-ai/dsh-client-ui-primitives': UiPrimitives,
'@deepseek-ai/dsh-client-ui-attachment': UiAttachment,
'@deepseek-ai/dsh-client-schema-form': SchemaForm,
} satisfies Record<PlatformModule, unknown>
}