mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-10 05:37:29 +03:00
d77e553466
Introducing the Active File Context portion of #9705. When someone is in the assistant panel it now includes the active file as a system message on send while showing them a nice little display in the lower right: ![image](https://github.com/zed-industries/zed/assets/836375/9abc56e0-e8f2-45ee-9e7e-b83b28b483ea) For this iteration, I'd love to see the following before we land this: * [x] Toggle-able context - user should be able to disable sending this context * [x] Show nothing if there is no context coming in * [x] Update token count as we change items * [x] Listen for a more finely scoped event for when the active item changes * [x] Create a global for pulling a file icon based on a path. Zed's main way to do this is nested within project panel's `FileAssociation`s. * [x] Get the code fence name for a Language for the system prompt * [x] Update the token count when the buffer content changes I'm seeing this PR as the foundation for providing other kinds of context -- diagnostic summaries, failing tests, additional files, etc. Release Notes: - Added file context to assistant chat panel ([#9705](https://github.com/zed-industries/zed/issues/9705)). <img width="1558" alt="image" src="https://github.com/zed-industries/zed/assets/836375/86eb7e50-3e28-4754-9c3f-895be588616d"> --------- Co-authored-by: Conrad Irwin <conrad@zed.dev> Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Mikayla Maki <mikayla@zed.dev>
45 lines
1.1 KiB
TOML
45 lines
1.1 KiB
TOML
[package]
|
|
name = "project_panel"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
publish = false
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/project_panel.rs"
|
|
doctest = false
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
collections.workspace = true
|
|
db.workspace = true
|
|
editor.workspace = true
|
|
file_icons.workspace = true
|
|
gpui.workspace = true
|
|
menu.workspace = true
|
|
pretty_assertions.workspace = true
|
|
project.workspace = true
|
|
schemars.workspace = true
|
|
search.workspace = true
|
|
serde.workspace = true
|
|
serde_derive.workspace = true
|
|
serde_json.workspace = true
|
|
settings.workspace = true
|
|
theme.workspace = true
|
|
ui.workspace = true
|
|
unicase.workspace = true
|
|
util.workspace = true
|
|
client.workspace = true
|
|
workspace.workspace = true
|
|
|
|
[dev-dependencies]
|
|
client = { workspace = true, features = ["test-support"] }
|
|
editor = { workspace = true, features = ["test-support"] }
|
|
gpui = { workspace = true, features = ["test-support"] }
|
|
language = { workspace = true, features = ["test-support"] }
|
|
serde_json.workspace = true
|
|
workspace = { workspace = true, features = ["test-support"] }
|