mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-30 10:52:15 +00:00
- Rewrite .github/workflows/desktop.yml: 2-job pipeline (validate + build-and-release) with rolling desktop-latest pre-release on push to main and stable desktop-v* releases - Add UpdateChecker component: checks for updates on startup + every 30 min, background download with progress bar, one-click relaunch - Configure Tauri updater: endpoints pointing to desktop-latest release, pubkey placeholder - Add tauri-plugin-process for relaunch support (Cargo.toml, lib.rs, package.json) - Add macOS Entitlements.plist for notarization (network + file access, no sandbox) - Add scripts/bump-desktop-version.sh for atomic version bumps across 3 config files - Add desktop/README.md with dev setup, auto-update architecture, signing docs - Update .gitignore for desktop/node_modules, dist, target - Configure macOS minimumSystemVersion, Windows timestampUrl - Include all Phase 14-21 work: agent hardening, RBAC, taint tracking, workflows, skills, knowledge graph, sessions, A2A, MCP templates, WASM sandbox, TUI dashboard, production tools, CLI expansion, API expansion, learning productionization, Tauri desktop app, and 10 new channels Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
49 lines
1.6 KiB
Python
49 lines
1.6 KiB
Python
"""Tests for ``jarvis chat`` interactive REPL command."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from unittest import mock
|
|
|
|
from click.testing import CliRunner
|
|
|
|
from openjarvis.cli.chat_cmd import _read_input, chat
|
|
|
|
|
|
class TestChatCommand:
|
|
"""Test the Click command definition and help output."""
|
|
|
|
def test_command_exists(self) -> None:
|
|
result = CliRunner().invoke(chat, ["--help"])
|
|
assert result.exit_code == 0
|
|
assert "interactive" in result.output.lower() or "chat" in result.output.lower()
|
|
|
|
def test_options(self) -> None:
|
|
result = CliRunner().invoke(chat, ["--help"])
|
|
assert result.exit_code == 0
|
|
assert "--engine" in result.output
|
|
assert "--model" in result.output
|
|
assert "--agent" in result.output
|
|
assert "--tools" in result.output
|
|
assert "--system" in result.output
|
|
|
|
def test_slash_commands_listed(self) -> None:
|
|
result = CliRunner().invoke(chat, ["--help"])
|
|
assert result.exit_code == 0
|
|
assert "/quit" in result.output
|
|
|
|
|
|
class TestReadInput:
|
|
"""Test the _read_input helper function."""
|
|
|
|
def test_read_input_eof(self) -> None:
|
|
with mock.patch("builtins.input", side_effect=EOFError):
|
|
assert _read_input() is None
|
|
|
|
def test_read_input_keyboard_interrupt(self) -> None:
|
|
with mock.patch("builtins.input", side_effect=KeyboardInterrupt):
|
|
assert _read_input() is None
|
|
|
|
def test_read_input_normal(self) -> None:
|
|
with mock.patch("builtins.input", return_value="hello"):
|
|
assert _read_input() == "hello"
|