/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { ITask } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import type React from "react"; import type { CliTaskLine, IterationSlotRow } from "../taskGraphCliSubscriptions"; export interface TaskRowProps { readonly task: ITask; readonly line: CliTaskLine; readonly iterationSlots: ReadonlyArray | undefined; /** * This row's path in the run census. Everything the row draws beneath itself * — an owned subgraph, a Map's live iterations — is keyed off it, which is * how the viewport plan reaches a list nested three levels down. */ readonly nodeKey: string; } export declare function hasAppendStream(schema: DataPortSchema | undefined): boolean; export type TaskRowComponent = React.ComponentType; /** * Returns the React component that should render the given task row. * * Explicit mapping: AiChatTask → ChatTaskRow. * Fallback: any task with an `x-stream: append` port → StreamingTextRow. * Default: DefaultTaskRow (progress + live map/reduce iteration tasks). * * The concrete components are injected at call time (see WorkflowRunApp) to * avoid import cycles between this module and its consumers. */ export declare function pickRenderer(taskType: string, outputSchema: DataPortSchema | undefined, components: { ChatTaskRow: TaskRowComponent; StreamingTextRow: TaskRowComponent; DefaultTaskRow: TaskRowComponent; }): TaskRowComponent;