@deepseek-ai/dsh-client-schema-form rehydrates the wire's serialized
schemastery envelope (new Schema(json)) and edits a draft user section
against it: presence-in-draft marks a field overridden with a per-field
reset, inherited values render as placeholders, role('secret') slots are
write-only with configured-state placeholders from the wire's secrets
list, dict adds take a union-typed sKey as their vocabulary, and any
node the renderer cannot faithfully edit falls back to a read-only view
instead of silently disappearing. renderField(context) is the role hook
the Models page will use for the credential-ref control; validateDraft
runs the same rehydrated validator the host uses, so the browser and
host judge one schema.
17 lines
680 B
TypeScript
17 lines
680 B
TypeScript
/**
|
|
* Schema-driven React form renderer for settings sections. `SchemaForm`
|
|
* rehydrates the wire's serialized schemastery envelope and edits a draft
|
|
* user section against it; the model helpers expose the same introspection
|
|
* and immutable path editing for page-level composition.
|
|
* @module @deepseek-ai/dsh-client-schema-form
|
|
*/
|
|
|
|
export { SchemaForm } from './SchemaForm.tsx'
|
|
export type {
|
|
SchemaFieldContext, SchemaFormLabels, SchemaFormProps, SchemaFormSecret,
|
|
} from './SchemaForm.tsx'
|
|
export {
|
|
deletePath, getPath, hasPath, nodeKind, rehydrateSchema, setPath, unionChoices, validateDraft,
|
|
} from './model.ts'
|
|
export type { NodeKind, SchemaNode } from './model.ts'
|