forked from genewildish/Mainline
Add REPL effect detection and input handling to pipeline runner
- Detect REPL effect in pipeline and enable interactive mode - Enable raw terminal mode for REPL input capture - Add keyboard input loop for REPL commands (return, up/down arrows, backspace) - Process commands and handle pipeline mutations from REPL - Fix lint issues in graph and REPL modules (type annotations, imports)
This commit is contained in:
@@ -4,12 +4,12 @@ This module bridges the new graph-based abstraction with the existing
|
||||
Stage-based pipeline system for backward compatibility.
|
||||
"""
|
||||
|
||||
from typing import Dict, Any, List, Optional
|
||||
from typing import Any, Optional
|
||||
|
||||
from engine.pipeline.graph import Graph, NodeType
|
||||
from engine.pipeline.controller import Pipeline, PipelineConfig
|
||||
from engine.pipeline.core import PipelineContext
|
||||
from engine.pipeline.params import PipelineParams
|
||||
from engine.camera import Camera
|
||||
from engine.data_sources.sources import EmptyDataSource, HeadlinesDataSource
|
||||
from engine.display import DisplayRegistry
|
||||
from engine.effects import get_registry
|
||||
from engine.pipeline.adapters import (
|
||||
CameraStage,
|
||||
DataSourceStage,
|
||||
@@ -18,15 +18,12 @@ from engine.pipeline.adapters import (
|
||||
FontStage,
|
||||
MessageOverlayStage,
|
||||
PositionStage,
|
||||
ViewportFilterStage,
|
||||
create_stage_from_display,
|
||||
create_stage_from_effect,
|
||||
)
|
||||
from engine.pipeline.adapters.positioning import PositioningMode
|
||||
from engine.display import DisplayRegistry
|
||||
from engine.effects import get_registry
|
||||
from engine.data_sources.sources import EmptyDataSource, HeadlinesDataSource
|
||||
from engine.camera import Camera
|
||||
from engine.pipeline.controller import Pipeline, PipelineConfig
|
||||
from engine.pipeline.core import PipelineContext
|
||||
from engine.pipeline.graph import Graph, NodeType
|
||||
from engine.pipeline.params import PipelineParams
|
||||
|
||||
|
||||
class GraphAdapter:
|
||||
@@ -34,8 +31,8 @@ class GraphAdapter:
|
||||
|
||||
def __init__(self, graph: Graph):
|
||||
self.graph = graph
|
||||
self.pipeline: Optional[Pipeline] = None
|
||||
self.context: Optional[PipelineContext] = None
|
||||
self.pipeline: Pipeline | None = None
|
||||
self.context: PipelineContext | None = None
|
||||
|
||||
def build_pipeline(
|
||||
self, viewport_width: int = 80, viewport_height: int = 24
|
||||
@@ -154,7 +151,7 @@ def graph_to_pipeline(
|
||||
|
||||
|
||||
def dict_to_pipeline(
|
||||
data: Dict[str, Any], viewport_width: int = 80, viewport_height: int = 24
|
||||
data: dict[str, Any], viewport_width: int = 80, viewport_height: int = 24
|
||||
) -> Pipeline:
|
||||
"""Convert a dictionary to a Pipeline."""
|
||||
graph = Graph().from_dict(data)
|
||||
|
||||
Reference in New Issue
Block a user