Skip to content

feat & fix: Full Web UI, OpenRouter Integration, Tool Propagation Fixes, and CI Resolution#166

Open
Priyanshu-x wants to merge 4 commits intovirattt:mainfrom
Priyanshu-x:main
Open

feat & fix: Full Web UI, OpenRouter Integration, Tool Propagation Fixes, and CI Resolution#166
Priyanshu-x wants to merge 4 commits intovirattt:mainfrom
Priyanshu-x:main

Conversation

@Priyanshu-x
Copy link

What does this PR do?

This is a substantial update that introduces a brand new React-based Web UI, extends AI model support via OpenRouter, fixes critical bugs in tool API key propagation, resolves complex merge conflicts, and ensures the CI pipeline (typecheck and test) passes smoothly.

Key Achievements & Features:

1. 🖥️ New Web Application UI (React + Vite + Hono)

  • Built a modern, responsive React frontend (client/ directory) to complement the CLI.
  • Implemented a functional Hono.js server (src/server.ts) to bridge the backend AI agent with the frontend via streaming responses.
  • Added a dynamic Model Selector Dropdown to the Web UI, allowing users to switch models on the fly.
  • Integrated visual "Thinking..." indicators and comprehensive API key management via a settings modal.

2. 🧠 OpenRouter Integration & Model Registry

  • Integrated OpenRouter as a primary AI provider, granting access to top-tier models like DeepSeek, Claude 3.5 Sonnet, Google Gemini, xAI, and more.
  • Updated the AgentRunnerController (src/controllers/agent-runner.ts) with an updateConfig method to synchronize model selections dynamically between the CLI and the Web UI.
  • Robustified the model prefix parser in llm.ts to seamlessly handle OpenRouter's specific model ID formats (e.g., openrouter/deepseek/deepseek-chat).
  • Updated the Model Registry (model.ts) to replace fake/placeholder IDs with real, working model names.

3. 🛠️ Tool Execution & API Key Propagation Fixes

  • Fixed a critical bug where API keys (like ALPHA_VANTAGE_API_KEY) were not being correctly propagated to the executing tools.
  • Refactored the tool registry in src/agent/agent.ts to correctly map configured API keys down to the TavilySearch, AlphaVantage, and custom financial tools.
  • Cleaned up duplicate tool declarations in src/tools/finance/financial-search.ts.

4. 🔀 Merge Conflict Resolution & Code Cleanup

  • Successfully resolved deep merge conflicts in bun.lock, package.json, src/agent/types.ts, src/model/llm.ts, and multiple tool files.
  • Removed obsolete files (like ModelSelector.tsx and env.example) that were causing tracking issues.

5. ✅ CI Pipeline & Test Stability

  • Restored missing dependencies (@mariozechner/pi-tui, @whiskeysockets/baileys, etc.) to package.json that were dropped during merge conflict resolution, fixing the remote CI typecheck failures.
  • Repaired TypeScript syntax and missing properties (errorValue, pendingApprovalValue) in the AgentRunnerController.
  • Resolved an ENOENT crash in the WhatsApp outbound channel tests by ensuring the ~/.dexter/ debugging directory is automatically created before log writes.
  • Both bun run typecheck and bun test now pass locally and on GitHub Actions with 0 errors.

Testing Performed

  • Locally verified the Web UI on http://localhost:3000.
  • Locally executed financial queries using OpenAI, Anthropic, and OpenRouter models in both CLI (bun start) and Web UI (bun run src/server.ts).
  • Confirmed zero TypeScript errors (tsc --noEmit).
  • Confirmed all 23 tests format correctly (bun test).

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