feat: rendering for agents
This commit is contained in:
@@ -40,7 +40,7 @@ export type FlowContextValue = {
|
||||
connectionPathPausedSegmentNodeIds: Set<string>
|
||||
/** Path nodes not in the paused segment (downstream of pause). Only those edges are blue (updating). */
|
||||
connectionPathActiveSegmentNodeIds: Set<string>
|
||||
/** Archon-type nodes that are on hold (e.g. Agent waiting for Run). */
|
||||
/** Nodes that are on hold (e.g. Renderer in manual mode waiting for Run). */
|
||||
connectionPathPausedNodeIds: string[]
|
||||
/** Add this node as paused (on hold); remove when user continues. */
|
||||
addConnectionPathPausedNode: (nodeId: string) => void
|
||||
|
||||
@@ -92,7 +92,7 @@ export function getPathNodeIds(
|
||||
}
|
||||
|
||||
/**
|
||||
* Path nodes from triggers up to and including the first paused node (Archon on hold).
|
||||
* Path nodes from triggers up to and including the first paused node (e.g. Renderer waiting for Run).
|
||||
* Used to color those edges yellow; rest of path stays blue.
|
||||
*/
|
||||
export function getPausedSegmentNodeIds(
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
* - **Trigger** – Node's output changed (e.g. config content, variable value). Reported
|
||||
* automatically when the node calls `updateData()` from useAbstractNode. Downstream
|
||||
* path is computed from triggers + updating nodes.
|
||||
* - **Updating** – Node is doing async work (e.g. agent running, renderer loading).
|
||||
* - **Updating** – Node is doing async work (e.g. renderer loading, agent run triggered by renderer).
|
||||
* Report `updating: true` at start, `updating: false` when done. Incoming/outgoing
|
||||
* edges on the path show "updating" (blue).
|
||||
* - **Paused** – Node is on hold (e.g. agent waiting for Run after inputs changed).
|
||||
* - **Paused** – Node is on hold (e.g. renderer in manual mode waiting for Run after inputs changed).
|
||||
* Report `paused: true` when waiting, `paused: false` when not. Edges in the paused
|
||||
* segment show "paused" (yellow).
|
||||
* - **Error** – Node has an error to show. Report `error: true` when error is set,
|
||||
|
||||
@@ -16,6 +16,10 @@ export type SourceRenderingLogicContext = {
|
||||
renderNodeId: string
|
||||
viewportWidth?: number
|
||||
viewportHeight?: number
|
||||
/** Optional: allows source logic to update other nodes (e.g. agent run updates agent node). */
|
||||
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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user