waveterm
waveterm copied to clipboard
[Bug]: `wsh ai` don't pipe the additional message
Current Behavior
On wsh reference there's the following example: tail -n 50 mylog.log | wsh ai - "can you tell me what this error means?". Currently it doesn't work. It pipes stdin to the ai block but not the additional message.
Expected Behavior
I expected the message to be piped.
Steps To Reproduce
In a terminal block run:
for i in $(seq 1 100); do echo "2023-10-$(printf "%02d" $((RANDOM % 30 + 1))) $(printf "%02d:%02d:%02d" $((RANDOM % 24)) $((RANDOM % 60)) $((RANDOM % 60))) - INFO - This is a fake log entry number $i" >> mylog.log; done
tail -n 50 mylog.log | wsh ai - "can you tell me what this error means?"
Wave Version
Client Version 0.11.2 (202503082049)
Platform
macOS
OS Version/Distribution
macOS Sequoia 15.3.2
Architecture
arm64
Anything else?
No response
Questionnaire
- [ ] I'm interested in fixing this myself but don't know where to start
- [ ] I would like to fix and I have a solution
- [ ] I don't have time to fix this right now, but maybe later
I do think this is a bug, however you can work around it like so.
(echo "can you tell me what this error means?" & & tail -n 50 mylog.log) | wsh ai -
just pushed a fix for this to main... #2129