This PR factors some more code related to the `RecentBuffersContext` out of the `AssistantPanel` and into the corresponding module. We're trying to strike a balance between keeping this code easy to evolve as we work on the Assistant, while also having some semblance of separation/structure. This also adds the missing functionality of updating the remaining token count when the `CurrentProjectContext` is enabled/disabled. Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev>
18 lines
360 B
Rust
18 lines
360 B
Rust
mod current_project;
|
|
mod recent_buffers;
|
|
|
|
pub use current_project::*;
|
|
pub use recent_buffers::*;
|
|
|
|
#[derive(Default)]
|
|
pub struct AmbientContext {
|
|
pub recent_buffers: RecentBuffersContext,
|
|
pub current_project: CurrentProjectContext,
|
|
}
|
|
|
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
|
|
pub enum ContextUpdated {
|
|
Updating,
|
|
Disabled,
|
|
}
|