import './tl/css-supports-shim.js'; import type { Context } from '@deepseek-ai/cordis'; import { type SettingsScopeSnapshot } from './settings-state.js'; export type { SettingsScopeSnapshot } from './settings-state.js'; export interface SettingsScope { getSnapshot(): SettingsScopeSnapshot; subscribe(listener: () => void): () => void; /** New hosts return true/false; legacy settings scopes resolve to void. */ set(field: string, value: unknown): Promise; } import type { InjectFace, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'; import { type ComfyUIWorkflowEntry } from '../shared.js'; import { type LocaleService } from './gallery-view.js'; import { type ImageResultPresentation } from './image-result-node.js'; interface CredentialInfo { configured?: boolean; source?: string; writable?: boolean; } interface CredentialResult { ok: boolean; value?: Readonly>; } interface CredentialMutationResult { ok: boolean; error?: { message?: string; }; } interface CredentialsRemote { describe(refs: string[]): Promise; set(ref: string, value: string): Promise; /** Present only on modern hosts; feature-detected before use; undefined while degraded. */ unset?: ((ref: string) => Promise) | undefined; } /** Notifies the settings card whenever any credential reference changes on the host. */ interface CredentialEvents { listen(callback: () => void): () => void; } interface SettingsFace { scope: SettingsScope; credentials: CredentialsRemote; /** False while the host core exposes no credentials service; the key UI degrades but the card stays mounted. */ credentialsAvailable: () => boolean; locale?: LocaleService | undefined; credentialEvents?: CredentialEvents | undefined; } interface ImageCardFace { locale?: LocaleService | undefined; promoted: boolean; } type SettingsCardProps = PropsRuntime<'settings.plugins.tab'> & InjectFace; type ImageCardProps = PropsRuntime<'tool.call.toolview'> & InjectFace; interface ImageResultNodeProps { node: { data: { results: readonly ImageResultPresentation[]; }; }; locale?: LocaleService | undefined; } /** * Required browser services. The settings form reader is deliberately absent: * DSH 0.1.7 serves it as `configForms` (keyed by the Loader entry id) while * 0.1.5/0.1.6 expose `settingsScope` (keyed by the legacy namespace), so it is * probed at runtime in `apply`. A static inject of either name would park this * fiber forever on hosts from the other generation — the issue #55 failure. */ export declare const inject: string[]; /** Mount the settings card, generated-image card, and native conversation gallery view. */ export declare function apply(ctx: Context): void; /** Settings persisted by this card; the workbench and tools read the same fields. */ interface ImageSettings { comfyuiBaseURL?: string; comfyuiWorkflows?: ComfyUIWorkflowEntry[]; comfyuiActiveWorkflow?: string; comfyuiActiveTextWorkflow?: string; comfyuiActiveEditWorkflow?: string; comfyuiWorkflowJson?: string; comfyuiWorkflowName?: string; comfyuiTimeoutMs?: number; /** Optional request headers as a JSON object, e.g. a reverse-proxy token. */ comfyuiHeadersJson?: string; comfyuiPythonExe?: string; comfyuiServerDir?: string; comfyuiExtraArgs?: string; comfyuiAutoStart?: boolean; comfyuiLaunchMode?: 'auto' | 'scheduled-task' | 'process'; comfyuiScheduledTaskName?: string; saveToWorkspace?: boolean; workspaceFolder?: string; } /** Mount the settings card, generated-image card, and native conversation gallery view. */ export declare function ImageGenerationSettingsCard(props: SettingsCardProps): JSX.Element; /** * The "Generating image" panel above the composer. * * Lives in the composer dock rather than in the tool card so it stays visible * while the conversation shows the thinking row and the tool call is folded * away. The thumbnail is the live ComfyUI latent preview; before the first * frame arrives it is an animated canvas, so the panel still reads as work in * progress instead of an empty box. */ export declare function GenerationDock(props: { sessionId?: string; locale?: LocaleService; }): JSX.Element | null; /** Keep the legacy Tool row for old DSH and hand modern results to the independent Chat node. */ export declare function GeneratedImageCard(props: ImageCardProps): import("react").JSX.Element; /** Suppress the folded duplicate on modern hosts; render every image on legacy hosts. */ export declare function GeneratedImagesCard(props: ImageCardProps): import("react").JSX.Element; /** Render modern image artifacts as final conversation output instead of Tool process content. */ export declare function PromotedImageResultNode(props: ImageResultNodeProps): import("react").JSX.Element;