ZIm/crates
KyleBarton 16f625bd07
Add persistence to command palette history (#26948)
Closes #20391

### Summary
This adds a persistence layer to the command palette so that usages can
persist after Zed is closed and re-opened.

The current "usage" algorithm is unchanged, e.g.:
- Sorts by number of usages descending (no recency preference)
- Once a user's query is active, removes these suggestions in favor of
fuzzy matching

There are some additional considerations in order to keep the DB from
growing uncontrollably (and to make long-term use ergonomic):
- The "invocations" count handles max values (though at u16, it seems
unlikely a user will deal with this)
- If a command is un-invoked for more than a month, it stops being
considered a recent usage, and its next update will update its usages
back to 1

### Future Considerations
- Could make the "command expiry" configurable in settings, so the user
can decide how long to hold onto recent usages
- Could make a more sophisticated algorithm which balances recency and
total invocations - e.g. if I've used COMMAND_A 100 times in the last
month, but COMMAND_B 10 times today, should COMMAND_B actually be
preferred?
- Could do preferential fuzzy-matching against these matches once the
user starts a query.

Release Notes:

- Added persistent history of command palette usages.

---------

Co-authored-by: Peter Finn <mastion11@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-04-01 15:46:35 -06:00
..
activity_indicator Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
anthropic chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
askpass chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assets chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant Preserve cursor position when resetting excerpts (#27850) 2025-04-01 16:55:10 +00:00
assistant2 Use new multibuffer excerpts in find-all-references and friends (#27876) 2025-04-01 15:42:32 -06:00
assistant_context_editor chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant_eval chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant_settings assistant_settings: Show JSON schema for profile settings (#27855) 2025-04-01 16:34:48 +00:00
assistant_slash_command chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant_slash_commands chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant_tool assistant2: Allow profiles to enable all context servers (#27847) 2025-04-01 15:25:23 +00:00
assistant_tools find-replace tool: Return diff in output (#27868) 2025-04-01 19:57:32 +00:00
audio chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
auto_update chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
auto_update_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
aws_http_client chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791) 2025-03-31 20:10:36 +02:00
bedrock chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
breadcrumbs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
buffer_diff Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
call Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
channel chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
cli chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
client chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
clock chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
collab Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
collab_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
collections chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
command_palette Add persistence to command palette history (#26948) 2025-04-01 15:46:35 -06:00
command_palette_hooks vim: :set support (#24209) 2025-02-11 04:55:40 +00:00
component chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
component_preview chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
context_server chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
context_server_settings chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
copilot Preserve cursor position when resetting excerpts (#27850) 2025-04-01 16:55:10 +00:00
credentials_provider Use the development credentials provider in development by default (#25273) 2025-02-20 19:07:16 +00:00
dap chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
dap_adapters chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
db chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
debugger_tools chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
debugger_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
deepseek chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
diagnostics Preserve cursor position when resetting excerpts (#27850) 2025-04-01 16:55:10 +00:00
docs_preprocessor docs: Improve Git page (#26566) 2025-03-25 09:22:01 -03:00
editor Use new multibuffer excerpts in find-all-references and friends (#27876) 2025-04-01 15:42:32 -06:00
evals chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extension chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extension_api chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extension_cli chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extension_host chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extensions_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
feature_flags chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
feedback chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
file_finder chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
file_icons Allow icon themes to provide their own file associations (#24926) 2025-02-15 00:35:13 +00:00
fs Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
fsevent chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
fuzzy chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
git Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
git_hosting_providers chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
git_ui Use new multibuffer excerpts in find-all-references and friends (#27876) 2025-04-01 15:42:32 -06:00
go_to_line chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
google_ai chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
gpui keymap: Allow upper-case keys in keybinds (#27813) 2025-03-31 22:31:01 +00:00
gpui_macros chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
gpui_tokio Switch fully to Rust Livekit (redux) (#27126) 2025-03-28 17:58:23 +00:00
html_to_markdown chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
http_client chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
http_client_tls chore: Extract http-client-tls crate (#26895) 2025-03-17 02:36:37 +00:00
icons assistant2: Adjust elements in the message editor (#27696) 2025-03-28 19:34:16 -03:00
image_viewer chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
indexed_docs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
inline_completion edit predictions: Show user if current project is open source (#24587) 2025-02-10 22:28:56 -03:00
inline_completion_button edit prediction: Show display mode options just for Zed (#27844) 2025-04-01 11:07:24 -03:00
install_cli chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
journal chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
language Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
language_extension chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
language_model assistant2: Ensure errors are also displayed in populated new thread view (#27869) 2025-04-01 17:06:34 -03:00
language_model_selector chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
language_models assistant2: Ensure errors are also displayed in populated new thread view (#27869) 2025-04-01 17:06:34 -03:00
language_selector chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
language_tools chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
languages python: Add recognition of worktree -> venv links (#26759) 2025-04-01 19:12:16 +02:00
livekit_api chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
livekit_client chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
lmstudio chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
lsp chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
markdown chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
markdown_preview chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
media chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
menu Remove unneeded inline tables in Cargo.tomls (#27563) 2025-03-27 02:36:47 +00:00
migrator chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
mistral chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
multi_buffer Use new multibuffer excerpts in find-all-references and friends (#27876) 2025-04-01 15:42:32 -06:00
node_runtime chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
notifications chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
ollama chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
open_ai chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
outline chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
outline_panel chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
panel chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
paths Notify about broken task file contents (#27185) 2025-03-20 13:06:10 +00:00
picker chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
prettier chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
project Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
project_panel Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
project_symbols chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
prompt_library chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
prompt_store chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
proto Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
recent_projects workspace: Fix SSH remote restore on second open + Fix panel not opening automatically on new SSH remote (#27830) 2025-04-01 14:05:28 +05:30
refineable chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
release_channel windows: Missing commit of #25412 (#25732) 2025-02-27 08:00:42 +00:00
remote chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
remote_server Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
repl chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
reqwest_client chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
rich_text Allow too many arguments (#26375) 2025-03-10 13:38:30 -06:00
rope chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
rpc chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
schema_generator Improve schema_generator CLI (#25898) 2025-03-06 04:59:57 +00:00
search chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
semantic_index chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
semantic_version chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
session chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
settings chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
settings_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
snippet chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
snippet_provider chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
snippets_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
sqlez chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
sqlez_macros windows: Fix tests on Windows (#22616) 2025-02-05 14:30:09 +00:00
story chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
storybook chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
streaming_diff chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sum_tree Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
supermaven chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
supermaven_api chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
tab_switcher chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
task chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
tasks_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
telemetry Git telemetry (#26222) 2025-03-06 10:56:28 -07:00
telemetry_events Remove unused AssistantThreadFeedback event (#27021) 2025-03-18 20:39:54 +00:00
terminal keymap: Allow upper-case keys in keybinds (#27813) 2025-03-31 22:31:01 +00:00
terminal_view chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
text chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
theme chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
theme_extension theme: Don't log errors for missing themes until extensions have loaded (#25098) 2025-02-18 17:47:25 +00:00
theme_importer chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
theme_selector chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
time_format chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
title_bar Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
toolchain_selector chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
ui assistant2: Ensure errors are also displayed in populated new thread view (#27869) 2025-04-01 17:06:34 -03:00
ui_input Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
ui_macros chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
ui_prompt chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
util chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
util_macros chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
vim Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
vim_mode_setting Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
welcome Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
workspace workspace: Do not call set_active when deserializing a dock if that dock was not visible (#27852) 2025-04-01 16:33:52 +00:00
worktree Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
zed chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
zed_actions chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
zeta chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
zlog chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
zlog_settings zlog: Init (#27273) 2025-03-21 20:08:03 +00:00