promptops / cli

um is a GPT-powered CLI assistant. Ask questions in plain English, get the perfect shell command.
https://promptops.com
GNU General Public License v3.0
122 stars 3 forks source link

`um` initialization is silent and takes a long time #5

Closed wgordon17 closed 1 year ago

wgordon17 commented 1 year ago

Finally updating the um CLI (after #3), and I ran a naked um to initialize it. It just sits there, staring at me, with no feedback until it finally dies with an error from #4.

This isn't a bug per se, mostly just feedback that it would be nice to have some kind of spinner, message, or otherwise that helps me understand what's going on, and that it's not just hanging indefinitely.

jj-ctrlstack commented 1 year ago

This should now give you progress bar if the number of history commands to index requires multiple batches. Thanks for reporting!

wgordon17 commented 1 year ago

I see the new progress bar, very nice 👍 It seemed to stick on 6% for the longest time, but I left it to run overnight and it eventually hit 100% ¯_(ツ)_/¯

jj-ctrlstack commented 1 year ago

Hey @wgordon17 glad this eventually completed! Out of curiosity how many history entries do you currently have? I'm wondering if we should index the last 5k by default and if we find more warn that it might take longer. Thoughts?

wgordon17 commented 1 year ago

Well, considering that this history file goes back 6 years 😅 there's 75k lines of history (fish history includes other metadata like timestamps, etc...so it's not all just command history).

It would definitely be nice to have more configuration options, like only indexing the past ~1 year or only indexing the last ~5k commands. And then prompt to continue indexing or stop. Alternatively, perhaps an option to move indexing to a background task, while still allowing the um to be usable.

jj-ctrlstack commented 1 year ago

Got it so something like 30k commands. What you are suggesting sounds good, coming soon!

jj-ctrlstack commented 1 year ago

Fixed in 0.1.6. Thanks!