mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
The Models settings section joins llm.providers (the configurable directory with live state), settings.describe (schemas, layered redacted values, secret slots), and credentials.describe (value-free badges) into provider rows with one editor card at a time. The editor renders the provider's profile subtree through dsh-client-schema-form; the credential-ref role mounts a control that shows configured/source state and stores keys write-only through credentials.set. Apply without removals merges a minimal patch (stored secrets outside it survive); apply after a reset — and row deletion — replace the user section so removals land. The client runtime bridges the three new host frames to typed ctx events (settings/credentials/models changed), the page refetches on any of them once loaded, and ui-model's per-session picker directories reload on models/changed so a settings-born route appears in open pickers without a reopen.
24 lines
930 B
TypeScript
24 lines
930 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { Context } from 'cordis'
|
|
import * as ModelsInvariant from '@deepseek-ai/dsh-client-ui-models/invariant'
|
|
import InvariantService from '@deepseek-ai/dsh-invariants'
|
|
import { ModelsSection } from '../src/client/ModelsSection.tsx'
|
|
|
|
describe('invariant companion', () => {
|
|
it('registers under the package name with an empty installer', async () => {
|
|
const ctx = new Context()
|
|
await ctx.plugin(InvariantService, { enabled: true })
|
|
await expect(ctx.plugin(ModelsInvariant).await()).resolves.toBeDefined()
|
|
})
|
|
|
|
it('node-half apply is a no-op host placeholder', async () => {
|
|
const { apply } = await import('@deepseek-ai/dsh-client-ui-models')
|
|
apply()
|
|
expect(true).toBe(true) // reaching here without throw is the contract
|
|
})
|
|
|
|
it('renders null until the shell injects the section dependencies', () => {
|
|
expect(ModelsSection({})).toBeNull()
|
|
})
|
|
})
|