fix: build

This commit is contained in:
imccyu
2026-08-11 23:33:18 +08:00
parent 91e7b3d086
commit 6332bd3513
3 changed files with 18 additions and 9 deletions
+1 -2
View File
@@ -9,7 +9,6 @@ import type { AgentHandle } from '@deepseek-ai/dsh-agent'
import { CallId, createUserMessage, LlmAdapter } from '@deepseek-ai/dsh-llm'
import type { GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm'
import { SessionId, type SessionEvent } from '@deepseek-ai/dsh-session'
import { conversationContextKey } from '@deepseek-ai/dsh-client-runtime/client'
import {
ScheduleId,
createEveryScheduleRecord,
@@ -26,7 +25,7 @@ import {
webSnapshotMode,
type WebScaffold,
} from './scaffold.ts'
import { connectFreshWorkspace, saveFailureShot } from './support.ts'
import { connectFreshWorkspace, conversationContextKey, saveFailureShot } from './support.ts'
const MODE = webSnapshotMode()
const OVERLAY = fileURLToPath(new URL('../../../examples/web-schedule/cordis.yml', import.meta.url))
@@ -8,9 +8,6 @@
"src"
],
"references": [
{
"path": "../connection"
},
{
"path": "../locale"
},
@@ -20,8 +20,6 @@ import HttpServer from '@deepseek-ai/dsh-host-webserver'
import type { DirectoryPicker } from '@deepseek-ai/dsh-host-directory-picker'
import BrowseDirectoryPicker from '@deepseek-ai/dsh-host-directory-picker-browse'
import NativeDirectoryPicker from '@deepseek-ai/dsh-host-directory-picker-native'
import * as BrowseSurface from '@deepseek-ai/dsh-client-ui-directory-picker'
import * as NativeSurface from '@deepseek-ai/dsh-client-ui-directory-picker-native'
import * as DirectoryPickerAuto from '../src/index.ts'
const renameControl = vi.hoisted(() => ({
@@ -53,6 +51,21 @@ const BROWSE = '@deepseek-ai/dsh-host-directory-picker-browse'
const NATIVE_SURFACE = '@deepseek-ai/dsh-client-ui-directory-picker-native'
const BROWSE_SURFACE = '@deepseek-ai/dsh-client-ui-directory-picker'
/**
* Loader-visible stand-in for a client surface package: the surfaces belong to
* the Client program and publish browser entry points only, so a Host-face spec
* can neither name them in a static import nor resolve them from source. What
* the chooser owns is the mounting decision, which every case observes through
* the Loader store; the surface's own browser contributions belong to the
* assembled web coverage.
*
* @param name Surface package specifier the chooser mounts.
* @returns A function-plugin module the Loader can mount under that specifier.
*/
function surfaceModule(name: string): unknown {
return { name, apply: () => undefined }
}
let root: string | undefined
let fakeBin: string | undefined
let context: Context | undefined
@@ -96,8 +109,8 @@ async function loadComposition(bindHost: '127.0.0.1' | '0.0.0.0'): Promise<{ ctx
[AUTO, DirectoryPickerAuto],
[NATIVE, NativeDirectoryPicker],
[BROWSE, BrowseDirectoryPicker],
[NATIVE_SURFACE, NativeSurface],
[BROWSE_SURFACE, BrowseSurface],
[NATIVE_SURFACE, surfaceModule(NATIVE_SURFACE)],
[BROWSE_SURFACE, surfaceModule(BROWSE_SURFACE)],
])
context.loader.internal = {
version: 'v2',