feat: unify CLI output handling and enhance theme variables

- Updated `CliStreamMonitorNew`, `CliStreamMonitorLegacy`, and `CliViewerPage` components to prioritize `unitContent` from payloads, falling back to `data` when necessary.
- Enhanced `colorGenerator` to include legacy variables for compatibility with shadcn/ui.
- Refactored orchestrator index to unify node exports under a single module.
- Improved `appStore` to clear both new and legacy CSS variables when applying themes.
- Added new options to CLI execution for raw and final output modes, improving programmatic output handling.
- Enhanced `cli-output-converter` to normalize cumulative delta frames and avoid duplication in streaming outputs.
- Introduced a new unified workflow specification for prompt template-based workflows, replacing the previous multi-type node system.
- Added tests for CLI final output handling and streaming output converter to ensure correct behavior in various scenarios.
This commit is contained in:
catlog22
2026-02-04 22:57:41 +08:00
parent 4ee165119b
commit de989aa038
12 changed files with 899 additions and 107 deletions

View File

@@ -232,7 +232,7 @@ export function CliViewerPage() {
invalidateActive();
} else if (type === 'CLI_OUTPUT') {
const p = payload as CliStreamOutputPayload;
const unitContent = p.unit?.content;
const unitContent = p.unit?.content ?? p.data;
const unitType = p.unit?.type || p.chunkType;
let content: string;
@@ -249,7 +249,7 @@ export function CliViewerPage() {
content = JSON.stringify(unitContent);
}
} else {
content = typeof p.data === 'string' ? p.data : JSON.stringify(p.data);
content = typeof unitContent === 'string' ? unitContent : JSON.stringify(unitContent);
}
const lines = content.split('\n');

View File

@@ -8,8 +8,5 @@ export { NodePalette } from './NodePalette';
export { PropertyPanel } from './PropertyPanel';
export { FlowToolbar } from './FlowToolbar';
// Node components
export { SlashCommandNode } from './nodes/SlashCommandNode';
export { FileOperationNode } from './nodes/FileOperationNode';
export { ConditionalNode } from './nodes/ConditionalNode';
export { ParallelNode } from './nodes/ParallelNode';
// Node components (unified system)
export { NodeWrapper, PromptTemplateNode, nodeTypes } from './nodes';