forked from genewildish/Mainline
feat(positioning): Add configurable PositionStage for positioning modes
- Added PositioningMode enum (ABSOLUTE, RELATIVE, MIXED) - Created PositionStage class with configurable positioning modes - Updated terminal display to support positioning parameter - Updated PipelineParams to include positioning field - Updated DisplayStage to pass positioning to terminal display - Added documentation in docs/positioning-analysis.md Positioning modes: - ABSOLUTE: Each line has cursor positioning codes (\033[row;1H) - RELATIVE: Lines use newlines (no cursor codes, better for scrolling) - MIXED: Base content uses newlines, effects use absolute positioning (default) Usage: # In pipeline or preset: positioning = "absolute" # or "relative" or "mixed" # Via command line (future): --positioning absolute
This commit is contained in:
@@ -870,7 +870,17 @@ def run_pipeline_mode(preset_name: str = "demo"):
|
||||
show_border = (
|
||||
params.border if isinstance(params.border, bool) else False
|
||||
)
|
||||
display.show(result.data, border=show_border)
|
||||
# Pass positioning mode if display supports it
|
||||
positioning = getattr(params, "positioning", "mixed")
|
||||
if (
|
||||
hasattr(display, "show")
|
||||
and "positioning" in display.show.__code__.co_varnames
|
||||
):
|
||||
display.show(
|
||||
result.data, border=show_border, positioning=positioning
|
||||
)
|
||||
else:
|
||||
display.show(result.data, border=show_border)
|
||||
|
||||
if hasattr(display, "is_quit_requested") and display.is_quit_requested():
|
||||
if hasattr(display, "clear_quit_request"):
|
||||
|
||||
Reference in New Issue
Block a user