Skip to content

feat: align terminal AI with OpenRouter config - #1

Merged
MishukAdhikari merged 1 commit into
mainfrom
feat/align-openrouter-ai-mode
Jun 1, 2026
Merged

feat: align terminal AI with OpenRouter config#1
MishukAdhikari merged 1 commit into
mainfrom
feat/align-openrouter-ai-mode

Conversation

@MishukAdhikari

Copy link
Copy Markdown
Member

Craft Mishuk — align xCloud Terminal with issue #5099 AI direction

Requested by Master Mishuk Adhikari: check whether xCloudDev/xcloud-terminal is aligned with xCloud issue #5099 / the OpenRouter-backed AI branch, and bring the terminal-side entrypoint closer to that direction.

Summary

  • Replaced the old AI scaffold response with a real terminal-side AI entrypoint for one-shot prompts.
  • Added OpenRouter/OpenAI-compatible and Anthropic provider config loading.
  • Supports the xCloud AI branch env naming:
    • OPENROUTER_API_KEY
    • OPENROUTER_API_URL=https://openrouter.ai/api/v1
    • OPENROUTER_DEFAULT_MODEL
  • Keeps portable aliases:
    • XCLOUD_AI_PROVIDER
    • XCLOUD_AI_API_KEY
    • XCLOUD_AI_BASE_URL
    • XCLOUD_AI_MODEL
  • Added xterm doctor to report provider/model/base URL/configured status with redacted keys only.
  • Anchored the AI system prompt to issue #5099: self-support, read-only diagnostics first, safe CLI/Public API capability layer, confirmations for destructive/billing-impacting actions, and no secrets in prompts/logs.
  • Updated README and architecture docs for the current alignment and env setup.
  • Added smoke coverage for AI setup guidance, OpenRouter config, doctor redaction, and hosted skills repo display.

Alignment note

This PR does not merge the big Laravel AI/chatbox branch into the standalone terminal repo. That branch belongs in xCloudDev/xCloud for the in-app chatbox/gateway. This PR makes xcloud-terminal the terminal-side entrypoint that is compatible with the same provider/env and safety direction.

Verification

  • git diff --check
  • node --check bin/xterm.js
  • node --check lib/ai/config.js
  • node --check lib/ai/provider.js
  • npm test
  • npm pack --dry-run
  • node ./bin/xterm.js --ai
  • node ./bin/xterm.js doctor
  • node ./bin/xterm.js --ai why is my site down

@MishukAdhikari
MishukAdhikari merged commit be65af6 into main Jun 1, 2026
4 checks passed
@MishukAdhikari
MishukAdhikari deleted the feat/align-openrouter-ai-mode branch June 1, 2026 09:25
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