This commit is contained in:
2025-06-09 02:32:45 +09:00
parent 6dadc41da7
commit 5564db014a
68 changed files with 265 additions and 11470 deletions

26
scpt/test_commands.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
echo "=== Testing aigpt-rs CLI commands ==="
echo
echo "1. Testing configuration loading:"
cargo run --bin test-config
echo
echo "2. Testing fortune command:"
cargo run --bin aigpt-rs -- fortune
echo
echo "3. Testing chat with Ollama:"
cargo run --bin aigpt-rs -- chat test_user "Hello from Rust!" --provider ollama --model qwen2.5-coder:latest
echo
echo "4. Testing chat with OpenAI:"
cargo run --bin aigpt-rs -- chat test_user "What's the capital of Japan?" --provider openai --model gpt-4o-mini
echo
echo "5. Testing relationships command:"
cargo run --bin aigpt-rs -- relationships
echo
echo "=== All tests completed ==="

19
scpt/test_completion.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
echo "=== Testing aigpt-rs shell tab completion ==="
echo
echo "To test tab completion, run:"
echo "cargo run --bin aigpt-rs -- shell syui"
echo
echo "Then try these commands and press Tab:"
echo " /st[TAB] -> should complete to /status"
echo " /mem[TAB] -> should complete to /memories"
echo " !l[TAB] -> should complete to !ls"
echo " !g[TAB] -> should show !git, !grep"
echo
echo "Manual test instructions:"
echo "1. Type '/st' and press TAB - should complete to '/status'"
echo "2. Type '!l' and press TAB - should complete to '!ls'"
echo "3. Type '!g' and press TAB - should show git/grep options"
echo
echo "Run the shell now..."

18
scpt/test_shell.sh Normal file
View File

@ -0,0 +1,18 @@
#!/bin/bash
echo "=== Testing aigpt-rs shell functionality ==="
echo
echo "1. Testing shell command with help:"
echo "help" | cargo run --bin aigpt-rs -- shell test_user --provider ollama --model qwen2.5-coder:latest
echo
echo "2. Testing basic commands:"
echo -e "!pwd\n!ls\nexit" | cargo run --bin aigpt-rs -- shell test_user --provider ollama --model qwen2.5-coder:latest
echo
echo "3. Testing AI commands:"
echo -e "/status\n/fortune\nexit" | cargo run --bin aigpt-rs -- shell test_user --provider ollama --model qwen2.5-coder:latest
echo
echo "=== Shell tests completed ==="

22
scpt/test_shell_manual.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
echo "=== Testing aigpt-rs shell manually ==="
echo
# Test with echo to simulate input
echo "Testing with simple command..."
echo "/status" | timeout 10 cargo run --bin aigpt-rs -- shell syui --provider ollama --model qwen2.5-coder:latest
echo "Exit code: $?"
echo
echo "Testing with help command..."
echo "help" | timeout 10 cargo run --bin aigpt-rs -- shell syui --provider ollama --model qwen2.5-coder:latest
echo "Exit code: $?"
echo
echo "Testing with AI message..."
echo "Hello AI" | timeout 10 cargo run --bin aigpt-rs -- shell syui --provider ollama --model qwen2.5-coder:latest
echo "Exit code: $?"
echo
echo "=== Manual shell tests completed ==="