refactor: apply repository naming contract
Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// @vitest-environment jsdom
|
||||
/**
|
||||
* View registration acceptance on the real framework stack: the plugin fiber
|
||||
* registers Trajectory into a real SlotsService view ring, tabs
|
||||
* registers Trajectory into a real SlotRegistry view ring, tabs
|
||||
* switch inside ConversationRoot (renderSlot share driven by the same tab
|
||||
* projection apply uses) without collapsing chat, trajectory renders the
|
||||
* event ledger with its timing overview, and fiber disposal removes the tab.
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
ConversationEventRegistry, ConversationViewRegistry, createSnapshotStore,
|
||||
EMPTY_CHAT_SNAPSHOT,
|
||||
} from '@deepseek-ai/dsh-client-runtime/client'
|
||||
import { SlotsService } from '@deepseek-ai/dsh-client-runtime/client'
|
||||
import { SlotRegistry } from '@deepseek-ai/dsh-client-runtime/client'
|
||||
import type {
|
||||
ConversationSnapshot, RequestView,
|
||||
SessionId, SessionListState, SnapshotStore, WorkspaceListState,
|
||||
@@ -45,7 +45,7 @@ import type { TrajectorySnapshot } from '../src/client/trajectory-contract.ts'
|
||||
import { deriveTrajectoryTimeline } from '../src/client/timeline.ts'
|
||||
|
||||
const SID = 's1' as SessionId
|
||||
const sessionSnapshots = new WeakMap<SlotsService, SnapshotStore<ConversationSnapshot>>()
|
||||
const sessionSnapshots = new WeakMap<SlotRegistry, SnapshotStore<ConversationSnapshot>>()
|
||||
const tConversation: ConversationSessionHeaderProps['t'] =
|
||||
key => (conversationZh as Record<string, string>)[key] ?? key
|
||||
|
||||
@@ -144,7 +144,7 @@ function fakeSession(nodes: ConversationSnapshot['nodes']) {
|
||||
/** Empty sessions-list hook; breadcrumbs therefore fall back to the raw id. */
|
||||
function emptySessions() {
|
||||
const store = createSnapshotStore<SessionListState>(
|
||||
{ ids: [], byId: {}, current: undefined, phase: 'ready', subagentsByParent: {}, tasksBySession: {}, currentAddress: undefined })
|
||||
{ ids: [], byId: {}, current: undefined, phase: 'ready', subagentsByParent: {}, jobsBySession: {}, currentAddress: undefined })
|
||||
return bindSnapshotSelector(store)
|
||||
}
|
||||
|
||||
@@ -171,10 +171,10 @@ function standaloneProps(
|
||||
} as unknown as ConvViewProps & { t: (key: LocaleKeysOf<'trajectory'>) => string }
|
||||
}
|
||||
|
||||
/** Real-stack bench: root Context + real SlotsService ring + the plugin fiber. */
|
||||
/** Real-stack bench: root Context + real SlotRegistry ring + the plugin fiber. */
|
||||
async function bench(snapshot = historySnapshot(NODES)) {
|
||||
const ctx = new Context()
|
||||
const slots = new SlotsService(ctx)
|
||||
const slots = new SlotRegistry(ctx)
|
||||
const loadOlder = vi.fn(() => Promise.resolve())
|
||||
const sessionStore = createSnapshotStore(snapshot)
|
||||
const session = {
|
||||
@@ -209,13 +209,13 @@ async function bench(snapshot = historySnapshot(NODES)) {
|
||||
}
|
||||
|
||||
/** Tab projection twin of apply's viewTabs (the render-side consumption path). */
|
||||
function tabsOf(slots: SlotsService): ViewTab[] {
|
||||
function tabsOf(slots: SlotRegistry): ViewTab[] {
|
||||
return slots.entries('conversation.view')
|
||||
.map(e => ({ id: e.options.id!, label: resolveSlotLabel(e.options.label) ?? e.options.id! }))
|
||||
}
|
||||
|
||||
/** Mount the strict Session header/body over the ring ledger with outlet-faithful render shares. */
|
||||
function mount(slots: SlotsService, nodes: ConversationSnapshot['nodes'] = NODES) {
|
||||
function mount(slots: SlotRegistry, nodes: ConversationSnapshot['nodes'] = NODES) {
|
||||
const sessionSnapshot = sessionSnapshots.get(slots) ?? createSnapshotStore(historySnapshot(nodes))
|
||||
const useSession = bindSnapshotSelector(sessionSnapshot)
|
||||
const chat = createChatStore().create()
|
||||
|
||||
Reference in New Issue
Block a user