acp: Model-specific prompt capabilities for 1PA (#36879)
Adds support for per-session prompt capabilities and capability changes on the Zed side (ACP itself still only has per-connection static capabilities for now), and uses it to reflect image support accurately in 1PA threads based on the currently-selected model. Release Notes: - N/A
This commit is contained in:
parent
f1204dfc33
commit
5fd29d37a6
10 changed files with 98 additions and 53 deletions
|
@ -162,6 +162,19 @@ impl<T> Receiver<T> {
|
|||
pending_waker_id: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new [`Receiver`] holding an initial value that will never change.
|
||||
pub fn constant(value: T) -> Self {
|
||||
let state = Arc::new(RwLock::new(State {
|
||||
value,
|
||||
wakers: BTreeMap::new(),
|
||||
next_waker_id: WakerId::default(),
|
||||
version: 0,
|
||||
closed: false,
|
||||
}));
|
||||
|
||||
Self { state, version: 0 }
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Clone> Receiver<T> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue