Skip to main content

ChatPanel

Struct ChatPanel 

Source
pub struct ChatPanel { /* private fields */ }

Implementations§

Source§

impl ChatPanel

Source

pub fn render_canvas( &self, window: &mut Window, cx: &mut Context<'_, Self>, ) -> Option<AnyElement>

Source§

impl ChatPanel

Source

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

Source

pub fn engine(&self) -> ChatEngine

Source

pub fn is_disabled(&self) -> bool

Source

pub fn engine_label(&self) -> &'static str

Source

pub fn engine_icon(&self) -> SvgIcon

The mark shown beside the engine’s name wherever the app names it.

Source§

impl ChatPanel

Source

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

Source

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

Source

pub fn is_unavailable(&self) -> bool

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

Source

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.

Source

pub fn cloud_replay_refusal(&self) -> Option<&'static str>

Why a cloud session would not open here, when it would not. The shell asks before it opens the pane and shows the reason as a toast: the pane may be off, or on its Sessions tab, where a chat tab’s error is hidden.

Source

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, unless cloud_replay_refusal gives a reason not to.

Source§

impl ChatPanel

Source

pub fn new(window: &mut Window, cx: &mut Context<'_, Self>) -> Self

Source

pub fn on_open(&mut self, window: &mut Window, cx: &mut Context<'_, Self>)

Source

pub fn set_context( &mut self, context: Option<ContextRef>, _cx: &mut Context<'_, Self>, )

Only stores an already loaded snapshot; no service requests or notifications.

Source

pub fn set_context_provider(&mut self, provider: ContextProvider)

Source

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.

Source

pub fn indicator(&self) -> &'static str

Source

pub fn is_busy(&self) -> bool

Whether any chat tab is running a turn.

Source

pub fn needs_attention(&self) -> bool

Whether any chat tab waits for an approval or an answer.

Trait Implementations§

Source§

impl EventEmitter<ChatPanelEvent> for ChatPanel

Source§

impl Render for ChatPanel

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, Self>, ) -> impl IntoElement

Render this view into an element tree.

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
where Arc<HandleInner>: Unpin, NonZero<u32>: Unpin, *const (): Unpin, *const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: Unpin, *const u8 is !null: Unpin, &'static str: Unpin, Arc<str>: Unpin, Arc<Canvas>: Unpin, Arc<[u8]>: Unpin, NonZero<i32>: Unpin, Utc: Unpin, FixedOffset: Unpin, Rc<dyn Fn(&App) -> Option<ContextRef>>: Unpin, Rc<dyn Fn(&App) -> Option<Arc<dyn ChatToolServer>>>: Unpin, Arc<RwLock<RawRwLock, FocusMap>>: Unpin, Rc<RefCell<ScrollHandleState>>: Unpin, Box<dyn FnOnce()>: Unpin, Task<(), RunnableMeta>: Unpin, Box<Task<Box<dyn Any + Sync + Send>>>: Unpin, Arc<Mutex<RawMutex, RendezvousState<()>>>: Unpin,

§

impl UnsafeUnpin for ChatPanel
where *const ArcInner<HandleInner> is !null: UnsafeUnpin, PhantomData<ArcInner<HandleInner>>: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, *const (): UnsafeUnpin, *const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: UnsafeUnpin, PhantomData<fn(ChatInput) -> ChatInput>: UnsafeUnpin, PhantomData<fn(ChatToolbar) -> ChatToolbar>: UnsafeUnpin, PhantomData<fn(SlashList) -> SlashList>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<Tab>: UnsafeUnpin, PhantomData<fn(InputBaseState<InputMode>) -> InputBaseState<InputMode>>: UnsafeUnpin, PhantomData<fn(f32) -> f32>: UnsafeUnpin, PhantomData<fn(OverflowToolbar) -> OverflowToolbar>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const RcInner<dyn Fn(&App) -> Option<ContextRef>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&App) -> Option<ContextRef>>>: UnsafeUnpin, *const RcInner<dyn Fn(&App) -> Option<Arc<dyn ChatToolServer>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&App) -> Option<Arc<dyn ChatToolServer>>>>: UnsafeUnpin, PhantomData<ModelChoice>: UnsafeUnpin, PhantomData<Choice>: UnsafeUnpin, PhantomData<SessionSummary>: UnsafeUnpin, PhantomData<SlashCommand>: UnsafeUnpin, NonZeroI32Inner: UnsafeUnpin, Utc: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, PhantomData<(&'static str, ErrorDetails)>: UnsafeUnpin, PhantomData<Carried>: UnsafeUnpin, *const ArcInner<RwLock<RawRwLock, FocusMap>> is !null: UnsafeUnpin, PhantomData<ArcInner<RwLock<RawRwLock, FocusMap>>>: UnsafeUnpin, *const RcInner<RefCell<ScrollHandleState>> is !null: UnsafeUnpin, PhantomData<RcInner<RefCell<ScrollHandleState>>>: UnsafeUnpin, PhantomData<Subscription>: UnsafeUnpin, *const () is !null: UnsafeUnpin, PhantomData<((), RunnableMeta)>: UnsafeUnpin, *const Task<Box<dyn Any + Sync + Send>> is !null: UnsafeUnpin, PhantomData<Task<Box<dyn Any + Sync + Send>>>: UnsafeUnpin, PhantomData<fn()>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, RendezvousState<()>>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<()>>>>: UnsafeUnpin, *const dyn FnOnce() is !null: UnsafeUnpin, PhantomData<dyn FnOnce()>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ParallelSend for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more