-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Allow arbitraty text as part of the chain #71
Comments
😆 Creative! 👏 Just curious: where does |
Well, Example mixed use case of text nodes and a note: All those messages are static, not loading spinners, they don't get replaced after loading is complete and are not intended to. They serve as a "history" line of what's been happening. |
Right.
Now this is where you lose me. Looking at your example, the majority seem to be a perfect match for I'm not saying this ain't happening, I'll let @natemoo-re be the judge here. I just don't see the point. |
OK, giving it a second round of thought. While still standing by the above: if each step is more less instant (thus no need for a spinner and getting rid of the intermediary states) in this case and all you want to do is log the completion of each step, now that I would buy. Although not the best use case, hypothetically your example would be compressed to: ✅ Base project downloaded # (although this ought to take some time, so this should use a spinner for best UX)
✅ Template applied # (again, if there is a risk of not being instantaneous, taking more than a few hundred ms, use a spinner)
🎉 Project created! |
Although, the last step should use So still struggling to see a valid use case 🤷 |
Maybe that wasn't the best use case for this, it was just what I was working on at the moment 😅 Maybe provide some short contextual information: Or even show some errors/information that are non-blocking with more data: Or any other case where you just want to do a simple |
OK, I think I'm onboard. Thanks for clarifying with more reasonable examples. So, let's flip things around a little and try to play devil's advocate for a second: What if we took it to the next level and exposed a lightweight, but enhanced I'm thinking, the base would be Then we could provide convenience wrappers around that, like: log.info(text) = log.message(text, { symbol: 'ℹ' }) // would be blue
log.success(text) = log.message(text, { symbol: '✔' }) // would be green
log.warn(text) = log.message(text, { symbol: '⚠' }) // would be yellow
log.error(text) = log.message(text, { symbol: '✘' }) // would be red One could even take it even further and add Thoughts? // cc @natemoo-re |
That sounds great! Fits right in with what I'm building for my CLI 😄 |
@ulken that sounds like the perfect API! Will try to get to this as soon as I can. ❤️ |
Cool, cool. I can kick things off tonight, if you'd like? Free for you to build upon. I'll open and reference a PR with progress. |
Currently there is not (or I couldn't find) a way to append arbitraty entries as part of the current prompt chain.
You can add new prompts, notes or spinners, but not just a single line of text without breaking the left side bar.
I've hacked a way into it by creating a fake no-time spinner like so:
It would be nice to have a straightforward way to just append a line of text, no prompt, no fancy stuff, just text that doesn't break the line with a function called something else like
message
or similar:The text was updated successfully, but these errors were encountered: