Pipe-based workflows using multiple prompts
Great tool!
I have a feature idea how to extend its flexibility by providing ability to combine stdin input and user input with an option:
sc programmer "write a snake game" | sc reviewer "review the project: " --append-stdin
I can try to implement it if it looks good to you.
Isn't that exactly what -r does?
As I can see --repeat-input affects output so that it would include (prepend) initial prompt to the final output.
I want to affect user input so that stdin and agrument inputs would be merged in some way (--append-stdin or --prepend-stdin).
Current workaround for the provided simple case:
echo "review the project: " > tmp.txt
sc programmer "write a snake game" >> tmp.txt
echo tmp.txt | sc reviewer
But if someone wants to pipe-chain 10 commands it would be unbearable. It's not the case where conversation-feature can help either, because I also don't want to store initial inputs for future inputs. i.e. I don't want to include "write a snake game" to second prompt where I request a review.
Then I get it. I think it would be useful.
The only improvements to the current prompt I can do are the following two variants:
(echo "review the project: ";
sc programmer "write a snake game") | sc reviewer
or
echo "review the project:
`sc programmer "write a snake game"`" | sc reviewer
I've made https://github.com/efugier/smartcat/pull/57 but that's just a starting point, because I'm not sure how to handle different cases if it's even possible. I need an opinion.
Hey, sorry @mlavrinenko, been super busy lately. Thank you for your interest in the tool!
I'm not sure I understand what you are trying to do, how is not equivalent to:
β― sc "write a sentence with typos" | sc empty "review the typos"
Hereβs your corrected sentence with the typos fixed:
**"I received a letter yesterday that was quite important for my upcoming project."**
### Breakdown of corrections:
1. **"recieved" β "received"** (correct spelling)
2. **"lettter" β "letter"** (extra "t" removed)
3. **"yesturday" β "yesterday"** (correct spelling)
4. **"quete" β "quite"** (correct spelling)
5. **"importent" β "important"** (correct spelling)
6. **"upcomming" β "upcoming"** (correct spelling)
7. **"projct" β "project"** (missing "e" added)