feat: renderin imrpovements

This commit is contained in:
2026-03-12 14:48:19 +01:00
parent f43e2df019
commit 909359ea53
5 changed files with 379 additions and 84 deletions

View File

@@ -20,14 +20,21 @@ export type SourceRenderingLogicContext = {
setNodes?: (updater: (nodes: { id: string; type?: string; data?: unknown }[]) => { id: string; type?: string; data?: unknown }[]) => void
/** Optional: AI connection for agent source (used when Rendering node runs the agent). */
aiConnection?: unknown
/** Optional: called when agent streaming starts (Rendering node can show streaming preview). */
onStreamingStart?: () => void
/** Optional: called with each text chunk during agent stream (Rendering node can update preview). */
onStreamingChunk?: (chunk: string) => void
}
/**
* Result of getResolvedContent: resolved string plus the config type to use for final render.
* When the source is an agent with reasoning enabled, reasoning may be set for a collapsible section.
*/
export type ResolvedContentResult = {
resolved: string
outputTypeId: ConfigTypeId
/** Optional reasoning section (e.g. agent with reasoning enabled); renderer shows it in a collapsible. */
reasoning?: string
}
/**