pub struct ChatPanel { /* private fields */ }Implementations§
Source§impl ChatPanel
impl ChatPanel
pub fn canvas_gallery(&self) -> bool
pub fn render_canvas( &self, window: &mut Window, cx: &mut Context<'_, Self>, ) -> Option<AnyElement>
Source§impl ChatPanel
impl ChatPanel
Sourcepub fn refresh_sessions(&mut self, cx: &mut Context<'_, Self>)
pub fn refresh_sessions(&mut self, cx: &mut Context<'_, Self>)
Asks the runtime for a fresh session list. The shell calls this for a dashboard that lists the saved chats.
Source§impl ChatPanel
impl ChatPanel
pub fn engine(&self) -> ChatEngine
pub fn is_disabled(&self) -> bool
pub fn engine_label(&self) -> &'static str
Sourcepub fn engine_icon(&self) -> SvgIcon
pub fn engine_icon(&self) -> SvgIcon
The mark shown beside the engine’s name wherever the app names it.
Source§impl ChatPanel
impl ChatPanel
Sourcepub fn attach_reference(
&mut self,
reference: ContextRef,
cx: &mut Context<'_, Self>,
)
pub fn attach_reference( &mut self, reference: ContextRef, cx: &mut Context<'_, Self>, )
Pins reference to the chat shown, replacing one with the same key.
Source§impl ChatPanel
impl ChatPanel
Sourcepub fn dismiss_popups(
&mut self,
window: &mut Window,
cx: &mut Context<'_, Self>,
)
pub fn dismiss_popups( &mut self, window: &mut Window, cx: &mut Context<'_, Self>, )
Dismiss toolbar surfaces before the panel is hidden or deactivated.
Source§impl ChatPanel
impl ChatPanel
Whether the chat runtime failed to start or stopped. Before the panel first opens there is no runtime and no failure, which is not this.
Source§impl ChatPanel
impl ChatPanel
Sourcepub fn show_session(
&mut self,
id: &str,
window: &mut Window,
cx: &mut Context<'_, Self>,
)
pub fn show_session( &mut self, id: &str, window: &mut Window, cx: &mut Context<'_, Self>, )
Shows the saved session id in a chat tab: its own tab when one
holds it, else a new tab. The shell opens the pane first.
Sourcepub fn show_cloud_session(
&mut self,
task: &CloudSession,
window: &mut Window,
cx: &mut Context<'_, Self>,
)
pub fn show_cloud_session( &mut self, task: &CloudSession, window: &mut Window, cx: &mut Context<'_, Self>, )
Replays a cloud agent task’s last session in a read-only tab. Every replay opens a fresh tab: the connected session is transient, so there is no saved chat to focus instead. The shell opens the pane first.
Source§impl ChatPanel
impl ChatPanel
pub fn new(window: &mut Window, cx: &mut Context<'_, Self>) -> Self
pub fn on_open(&mut self, window: &mut Window, cx: &mut Context<'_, Self>)
Sourcepub fn set_context(
&mut self,
context: Option<ContextRef>,
_cx: &mut Context<'_, Self>,
)
pub fn set_context( &mut self, context: Option<ContextRef>, _cx: &mut Context<'_, Self>, )
Only stores an already loaded snapshot; no service requests or notifications.
pub fn set_context_provider(&mut self, provider: ContextProvider)
Sourcepub fn set_chat_tools(&mut self, provider: ChatToolsProvider)
pub fn set_chat_tools(&mut self, provider: ChatToolsProvider)
The app’s tools for ACP sessions. A running runtime keeps the ones it started with; Reconnect reads them again.
pub fn indicator(&self) -> &'static str
Sourcepub fn needs_attention(&self) -> bool
pub fn needs_attention(&self) -> bool
Whether any chat tab waits for an approval or an answer.
Trait Implementations§
impl EventEmitter<ChatPanelEvent> for ChatPanel
Auto Trait Implementations§
impl !Freeze for ChatPanel
impl !RefUnwindSafe for ChatPanel
impl !Send for ChatPanel
impl !Sync for ChatPanel
impl !UnwindSafe for ChatPanel
impl Forget for ChatPanel
impl Move for ChatPanel
impl Unpin for ChatPanel
impl UnsafeUnpin for ChatPanel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more