ZIm/crates/workspace/Cargo.toml
张小白 a5fe6d1e61
History manager (#26369)
While working on implementing `add_recent_documents` for Windows, I
found that the process is significantly more complex compared to macOS.
On macOS, simply registering the `add_recent_documents` function is
enough, as the system handles everything automatically.

On Windows, however, there are two cases to consider:  
- **Files opened by the app**: These appear in the "Recent" section (as
shown in the screenshot, "test.txt") and are managed automatically by
Windows (by setting windows registry), similar to macOS.

![屏幕截图 2025-03-10
230738](https://github.com/user-attachments/assets/8fc8063b-4369-43cc-aaaf-7370a7d27060)


- **Folders opened by the app**: This is more complicated because
Windows does not handle it automatically, requiring the application to
track opened folders manually.

To address this, this PR introduces a `History Manager` along with
`HistoryManagerEvent::Update` and `HistoryManagerEvent::Delete` events
to simplify the process of managing recently opened folders.



https://github.com/user-attachments/assets/a2581c15-7653-4faf-96b0-7c48ab1dcc8d



Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2025-04-11 21:34:51 +00:00

85 lines
2.2 KiB
TOML

[package]
name = "workspace"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
path = "src/workspace.rs"
doctest = false
[features]
test-support = [
"call/test-support",
"client/test-support",
"http_client/test-support",
"db/test-support",
"project/test-support",
"session/test-support",
"settings/test-support",
"gpui/test-support",
"fs/test-support",
]
[dependencies]
any_vec.workspace = true
anyhow.workspace = true
async-recursion.workspace = true
bincode = "1.2.1"
call.workspace = true
client.workspace = true
clock.workspace = true
collections.workspace = true
component.workspace = true
dap.workspace = true
db.workspace = true
derive_more.workspace = true
fs.workspace = true
futures.workspace = true
gpui.workspace = true
http_client.workspace = true
itertools.workspace = true
language.workspace = true
log.workspace = true
node_runtime.workspace = true
parking_lot.workspace = true
postage.workspace = true
project.workspace = true
remote.workspace = true
schemars.workspace = true
serde.workspace = true
serde_json.workspace = true
session.workspace = true
settings.workspace = true
smallvec.workspace = true
sqlez.workspace = true
strum.workspace = true
task.workspace = true
telemetry.workspace = true
theme.workspace = true
ui.workspace = true
util.workspace = true
uuid.workspace = true
zed_actions.workspace = true
workspace-hack.workspace = true
[target.'cfg(target_os = "windows")'.dependencies]
windows.workspace = true
[dev-dependencies]
call = { workspace = true, features = ["test-support"] }
client = { workspace = true, features = ["test-support"] }
dap = { workspace = true, features = ["test-support"] }
db = { workspace = true, features = ["test-support"] }
env_logger.workspace = true
fs = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] }
session = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
tempfile.workspace = true