Skip to content

Phase D: TUI + AI Assistant - #39

Merged
ridhoassuryadi merged 53 commits into
mainfrom
feature/workspace-phase-b
Jun 20, 2026
Merged

Phase D: TUI + AI Assistant#39
ridhoassuryadi merged 53 commits into
mainfrom
feature/workspace-phase-b

Conversation

@ridhoassuryadi

Copy link
Copy Markdown
Member

Phase D: Workspace TUI + AI Assistant

Adds a terminal UI (bubbletea) with dashboard and AI chat views, plus an offline command interpreter for chat input.

New packages

  • apps/cli/internal/ai/ — Provider abstraction, OpenAI streaming, Tool Registry, Chat loop, Cost tracking, Config, System prompt
  • apps/cli/internal/tui/ — bubbletea Model, Dashboard, Chat view, :command parser, Help overlay, Entry point

New commands

  • radas (no args + TTY) → TUI dashboard
  • radas workspace generate <template> (Phase C carryover)
  • radas workspace template list|add|create

Features

  • Multi-provider AI (OpenAI, OpenRouter, configurable via ai: in radas.yml)
  • Tool calling with iterative execution (max 10 iterations, configurable)
  • Cost ceiling per session (ai.cost_ceiling, default $0.10)
  • Streaming chat with text + tool calls via SSE
  • Offline mode — chat input interpreted via keyword matching (run api test:run api test) when no AI provider configured
  • Env-var API keys (``, etc.) with explicit errors on missing

Test count

358 → 361 passing in 35 packages (was 302/33 before Phase D)

Phase history

  • v4.3.0 Phase A: Monorepo Manager
  • v4.4.0 Phase B: Task Runner + Cache
  • v4.5.0 Phase C: Code Generator
  • v4.6.0 Phase D: TUI + AI

Notes

  • Pre-commit go vet clean, go build ./... clean
  • Cost tracking Add() is wired but only updates from manual cost entries (not auto-computed from API usage) — known limitation
  • Chat view offline wiring (auto-route through interpreter when no provider) is deferred; interpreter is tested in isolation and ready
  • api_key: $ resolution returns explicit error on missing env var
  • 21 commits since Phase C

…e B)

- internal/runner/: pipeline resolution, Kahn's scheduler, parallel batch executor (B5-B8)

- internal/cache/: content-addressable SHA256 hasher, local store, manifest with replay (B1-B3)

- internal/graph/affected.go: git diff -> affected project set + transitive expansion (B4)

- cmd/workspace/run: topological task execution with cache (B10)

- cmd/workspace/affected: list affected projects (B11)

- cmd/workspace/cache: status/clear commands (B12)

- Full integration test: cache miss -> hit workflow (B15)

- 272 tests passing (was 247), 23 files, +3325 lines
@ridhoassuryadi
ridhoassuryadi merged commit cf5d948 into main Jun 20, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant