telekinesis 0.5.4

AI coding agent TUI — rx4 harness + crepuscularity-tui, pi-first UX
div w-full h-fit flex-col
  if {show_header}
    div h-fit flex-col
      span text-xs text-zinc-600
        "Telekinesis v{version} · press f1 for help"
      if {busy}
        span w-fit text-xs text-amber-400
          "{spinner}"

  div h-fit flex-col
    for message in {messages}
      if {is_tool}
        div h-fit flex-col
          span text-xs text-zinc-500
            "| {tool_name}"
          for line in {lines}
            span text-xs text-zinc-500
              "  {text}"
      else if {is_user}
        div h-fit flex-col
          for line in {lines}
            span text-sm text-blue-400
              "{text}"
      else
        div h-fit flex-col
          if {is_thinking}
            span text-sm text-zinc-500
              "· thinking{cursor}"
          for line in {lines}
            span text-sm text-zinc-200
              "{text}"

  if {permission_prompt}
    div h-fit border-t border-amber-700 flex-col
      span text-sm text-amber-400
        "| permission · {permission_tool}"
      span text-xs text-zinc-500
        "  y allow · n deny"

  div h-fit flex-col
    if {config_open}
      div h-fit flex-col
        span text-sm text-indigo-400
          "config · ↑/↓ select · enter apply · esc close"
        for row in {config_rows}
          if {selected}
            span text-sm text-indigo-300
              "  › {label}"
            span text-xs text-indigo-500
              "    {hint}"
          else
            span text-xs text-zinc-500
              "    {label}"
            span text-xs text-zinc-600
              "    {hint}"
    else if {selecting_model}
      div h-fit flex-col
        span text-sm text-indigo-400
          "model · ‹ {selected_provider} › · search: {input_before}{cursor}{input_after}"
        for model in {model_rows}
          if {selected}
            span text-sm text-indigo-300
              "  › {model_id}"
          else
            span text-xs text-zinc-500
              "    {model_id}"
        if {no_model_matches}
          span text-xs text-amber-400
            "  no models match — check the provider or /login to add one"
        span text-xs text-zinc-600
          "←/→ provider · ↑/↓ model · type to search all · enter apply · esc cancel"
    else
      if {has_slash_suggestions}
        div h-fit flex-col
          for command in {slash_rows}
            if {selected}
              span text-sm text-indigo-300
                "  › {command} — {desc}"
            else
              span text-xs text-zinc-500
                "    {command} — {desc}"
          span text-xs text-zinc-600
            "↑/↓ command · tab insert"
      else if {has_file_suggestions}
        div h-fit flex-col
          for file in {file_rows}
            if {selected}
              span text-sm text-indigo-300
                "  › @{path}"
            else
              span text-xs text-zinc-500
                "    @{path}"
          span text-xs text-zinc-600
            "↑/↓ file · tab insert"
      span text-sm text-{input_color}
        "{prompt_char} {input_before}{cursor}{input_after}"

  div h-fit flex-col
    div h-[1] flex-row gap-2
      span w-fit text-xs text-zinc-600
        "${cost}"
      span w-fit text-xs text-zinc-600
        "· {project} ({branch})"
    div h-[1] flex-row gap-2
      span w-fit text-xs text-indigo-400
        "{model} · {effort} · {agent_mode}"
      span w-fit text-xs text-{context_color}
        "{context_pct}%/{context_window}"
      span w-fit text-xs text-zinc-600
        "· {permission_mode}"
    if {has_running_subagents}
      for subagent in {running_subagents}
        span text-xs text-zinc-500
          "↳ {name}"