Files
SuperCharged-Claude-Code-Up…/hooks/demo-qwen-consult.sh
uroma 932529d37f Replace placeholder files with originals from system
Found and copied original files from ~/.claude installation:

- hooks/ - Original Qwen and Ralph hook scripts with full functionality
- commands/ - Original command definitions (brainstorm, write-plan, execute-plan)
- bin/ralphloop - Original 223-line Python wrapper (6,290 bytes)
- scripts/sync-agents.sh - Original sync script with GitHub/Gitea backup
- templates/ - Original config templates from working installation
- plugins/ - Original comprehensive plugin README

Files sourced from:
- ~/.claude/skills/skills/hooks/
- ~/.claude/skills/skills/commands/
- ~/.claude/skills/skills/templates/
- /home/uroma/obsidian-web-interface/bin/ralphloop
- ~/.claude/agents/sync-agents.sh

These are the production files from the working Claude Code
installation, replacing the placeholder files I created earlier.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 18:23:28 +00:00

73 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
# Demo script showing how to use Qwen consultation hook
set -euo pipefail
echo "====================================="
echo " Qwen Consultation Hook Demo"
echo "====================================="
echo ""
# Step 1: Show current mode
echo "1. Current QWEN_CONSULT_MODE: ${QWEN_CONSULT_MODE:-off (default)}"
echo ""
# Step 2: Enable delegate mode
echo "2. Enabling delegate mode..."
export QWEN_CONSULT_MODE=delegate
echo " QWEN_CONSULT_MODE is now: $QWEN_CONSULT_MODE"
echo ""
# Step 3: Trigger consultation with delegate keyword
echo "3. Triggering Qwen consultation..."
echo " Prompt: 'please consult qwen for advice on bash scripting best practices'"
echo ""
# Clear previous log
> ~/.claude/qwen-output.log
# Trigger the hook
echo '{"prompt": "please consult qwen for advice on bash scripting best practices"}' | \
/home/uroma/.claude/hooks/qwen-consult.sh 2>&1
# Wait a moment for Qwen to start
sleep 2
# Step 4: Show Qwen is running
echo "4. Checking if Qwen is running..."
if [[ -f ~/.claude/qwen.lock ]]; then
PID=$(cat ~/.claude/qwen.lock)
if kill -0 "$PID" 2>/dev/null; then
echo " ✓ Qwen is running (PID: $PID)"
else
echo " ✗ Qwen process not found"
fi
else
echo " ✗ Qwen lock file not found"
fi
echo ""
# Step 5: Wait for output and show it
echo "5. Waiting for Qwen's response (10 seconds)..."
sleep 10
echo ""
echo "====================================="
echo " Qwen's Response:"
echo "====================================="
tail -n +4 ~/.claude/qwen-output.log
echo ""
echo "====================================="
echo " Monitoring Commands:"
echo "====================================="
echo "View output in real-time:"
echo " tail -f ~/.claude/qwen-output.log"
echo ""
echo "Check if Qwen is running:"
echo " ps aux | grep qwen"
echo ""
echo "Stop Qwen:"
echo " kill \$(cat ~/.claude/qwen.lock)"
echo ""