File tree Expand file tree Collapse file tree 2 files changed +66
-0
lines changed
Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Test with environment variables only
4+ echo " 🚀 Testing with environment variables only"
5+ echo " =========================================="
6+
7+ echo " Environment variables:"
8+ echo " DTUI_CFG__ai__shell__command=echo"
9+ echo " DTUI_CFG__ai__shell__args='[\" [ENV_VARS_ONLY]:\" ]'"
10+ echo " DTUI_CFG__ai__shell__template='{command} {args} \" {prompt}\" '"
11+ echo " "
12+ echo " Expected output: [ENV_VARS_ONLY]: <your_message>"
13+ echo " Look for: 'No DTUI_USER_CONFIGFILE specified, skipping user config file stage'"
14+ echo " "
15+ echo " Press Ctrl+C to stop the app when done testing..."
16+ echo " "
17+
18+ # Launch with environment variables only
19+ DTUI_CFG__ai__shell__command=echo \
20+ DTUI_CFG__ai__shell__args=' ["[ENV_VARS_ONLY]:"]' \
21+ DTUI_CFG__ai__shell__template=' {command} {args} "{prompt}"' \
22+ npm run electron
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Test with temporary custom config file
4+ echo " 🧪 Testing with temporary custom config file"
5+ echo " ============================================"
6+
7+ # Create temporary config file
8+ TEMP_CONFIG=" /tmp/dtui-temp-config-$( date +%s) .json"
9+ cat > " $TEMP_CONFIG " << 'EOF '
10+ {
11+ "ai": {
12+ "provider": "shell",
13+ "shell": {
14+ "command": "echo",
15+ "args": ["[TEMP_CUSTOM_FILE]:"],
16+ "template": "{command} {args} \"{prompt}\"",
17+ "timeout": 12000,
18+ "outputFormat": {
19+ "useCodeBlock": true,
20+ "codeBlockSyntax": "bash"
21+ }
22+ }
23+ }
24+ }
25+ EOF
26+
27+ echo " Created temporary config: $TEMP_CONFIG "
28+ echo " Config contents:"
29+ echo " $( cat $TEMP_CONFIG ) "
30+ echo " "
31+ echo " Expected output: [TEMP_CUSTOM_FILE]: <your_message>"
32+ echo " Look for: 'Loaded user config file: $TEMP_CONFIG '"
33+ echo " "
34+ echo " Press Ctrl+C to stop the app when done testing..."
35+ echo " "
36+
37+ # Launch with temporary config
38+ DTUI_USER_CONFIGFILE=" $TEMP_CONFIG " npm run electron
39+
40+ # Clean up
41+ echo " "
42+ echo " Cleaning up temporary config file: $TEMP_CONFIG "
43+ rm -f " $TEMP_CONFIG "
44+ echo " ✅ Cleanup completed"
You can’t perform that action at this time.
0 commit comments