Skip to content

If extract_last is set, start with the last row #821

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yn-academia
Copy link

@yn-academia yn-academia commented Mar 8, 2025

llm logs -r

will return back the last response, but will load up in memory the last three rows.

llm logs -r --xl

will load up in memory the last three responses, and will return back the last command block of the first row that has command blocks.

I found this confusing in my workflow. I would type in llm logs -r, see the command that i would want, then type in llm logs -r --xl and get a different command extracted. This oughta fix that.

An alternative approach would be to treat -r as -n 1 since it effectively throws away all the rows except the last one.

@simonw
Copy link
Owner

simonw commented Mar 22, 2025

An alternative approach would be to treat -r as -n 1 since it effectively throws away all the rows except the last one.

Yeah, that's a great idea - I prefer that fix.

@simonw simonw added the bug Something isn't working label Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants