diff --git a/Dockerfile b/Dockerfile index f300729..dbecfc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,6 +38,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ plantuml \ jq \ + nano \ + # GUI dependencies for dearpygui + libgl1 \ + libegl1 \ + libxkbcommon0 \ + libxcb-cursor0 \ + libxcb-icccm4 \ + libxcb-keysyms1 \ + libxcb-shape0 \ + libxcb-xinerama0 \ + libxcb-randr0 \ + libxcb-render-util0 \ && rm -rf /var/lib/apt/lists/* WORKDIR /app @@ -59,6 +71,9 @@ COPY tests/ ./tests/ # Install Orchestrated Discussions RUN pip install --no-cache-dir -e ".[dev]" +# Install dearpygui for GUI (optional, may fail on some systems) +RUN pip install --no-cache-dir dearpygui || echo "dearpygui install failed, GUI will use TUI fallback" + # Create directories RUN mkdir -p /root/.smarttools /root/.local/bin diff --git a/src/discussions/runner.py b/src/discussions/runner.py index 7693f50..970b3d8 100644 --- a/src/discussions/runner.py +++ b/src/discussions/runner.py @@ -246,12 +246,16 @@ class VariableStore: else: self._store[name] = value - def get(self, ref: str): + def get(self, ref: str, default=None): """ Get a variable value. Ref can be: - $varname - simple lookup - $varname.field - JSON field access - $varname.field.subfield - nested access + + Args: + ref: Variable reference (e.g., "$varname" or "$varname.field") + default: Default value if variable not found """ if not ref.startswith("$"): return ref # Literal value @@ -261,7 +265,7 @@ class VariableStore: value = self._store.get(parts[0]) if value is None: - return None + return default # Navigate nested fields for part in parts[1:]: @@ -271,9 +275,9 @@ class VariableStore: idx = int(part) value = value[idx] if idx < len(value) else None else: - return None + return default if value is None: - return None + return default return value