-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Tasks are using file parameters from previous runs #10845
Comments
Exactly this.
|
This should be a default:
|
I suspect that from a product perspective what makes sense is to have revaluate_context true by default, and that alt-t should explicitly mark it as false. In most commands that use the context you will want to reevaluate it at every execution. @SomeoneToIgnore @JosephTLyons |
This does not work. The Its explicitly defined on zed/crates/tasks_ui/src/modal.rs Lines 42 to 47 in 5ef7591
And not on zed/crates/tasks_ui/src/modal.rs Lines 25 to 31 in 5ef7591
I currently see no way to force re-evaluation of What's the mental model here? If you PS. I did find the {
"label": "RSpec: current file",
"args": ["$ZED_FILE"],
"command": "rspec --order defined --format doc --no-profile",
"ignore_previously_resolved": true
} But that breaks the ability to re-run a task without re-evaluating |
I believe this should be improved in #10873, see #11026 (comment) for more details. |
The screenshots shared here #11026 (comment) looks awesome! 🤩 I was indeed thinking that the mental model (UX) needed some improvements. Rather than the "hack" of "if I use the spawn modal -> it resets context, but when I use rerun it does not". The mental model of Task Templates vs. Task "instances" works really well there I think. Awesome idea!
I'm curious @osiewicz, are there any plans to show the arguments for the task in the UI? Say I have the following tasks defined: [
{
"label": "rspec: single file",
"args": ["$ZED_FILE"],
"command": "rspec --order defined --format doc --no-profile",
},
{
"label": "rspec: single line",
"args": ["$ZED_FILE:$ZED_ROW"],
"command": "rspec --order defined --format doc --no-profile",
},
] I'd want to be able to tell the difference between two recent instances of "RSpec: single line". Note: |
Hey @jessevdp, Note though that if you were to run the same task twice, you'd only get one instance in your task history. |
Ah I see. I suppose that works well enough for the problem as described in this issue. But I wonder if there would still be room for a proper “arguments” concept for tasks. Where a “template” could have arguments of different types: fillable through pre-defined variables like Perhaps with some option to override defaulted values? (Though for the use case of running the file under cursor, less UI is better.) If these arguments were first-class citizens, they could show up in the task selection UI too.
Just dreaming/spitballing a bit here. Do you think it’s a worthwhile idea? Would you like me to write it out further and create a separate issue? |
I think that would be nice, yeah, but I don't think now is a good time to tackle that. We probably should sort out various wrinkles with tasks first (e.g. how they're gonna integrate with extensions). I'd rather have us focus on that for now and actually get tasks more to forefront of Zed experience and then see how common of a limitation the lack of user input is. |
Check for existing issues
Describe the bug / provide steps to reproduce it
When running the same task a second time using Ctrol-Shift-T , the values from the old run for $ZED_FILE, and $ZED_ROW are used instead of the ones of the current context. Please notice that this might be desirable when reruning tasks with Ctrol-T.
Environment
Zed: v0.132.0 (Zed Preview)
OS: macOS 14.4.1
Memory: 8 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.No response
The text was updated successfully, but these errors were encountered: