pub enum Command {
Chat {
chat: ChatId,
command: ChatCommand,
},
OpenChat {
chat: ChatId,
session: Option<String>,
preferences: Option<ChatPreferences>,
},
OpenRemote {
chat: ChatId,
task_id: String,
},
Activate(ChatId),
RenameSession {
session: String,
name: String,
},
DeleteSession(String),
ExportSession {
session: String,
path: PathBuf,
},
Answer {
request_id: String,
answer: String,
},
Approve {
request_id: String,
allow: bool,
},
ListSessions,
Refresh,
Shutdown,
}Variants§
Chat
OpenChat
Opens session as chat chat, or a new chat when it is None.
OpenRemote
Replays the last session of the cloud agent task task_id as chat
chat. The chat is read-only: it connects to a session Copilot ran
elsewhere, so no message is sent and nothing is saved.
Activate(ChatId)
The tab Zack is now in, which a restart reopens as the active one.
RenameSession
Names a saved chat, whether or not it is open in a tab.
DeleteSession(String)
Deletes a saved chat, closing its tab first when it has one.
ExportSession
Writes a saved chat’s transcript to path as Markdown.
Answer
Answers and approvals are global: a request id identifies one chat’s pending callback on its own.
Approve
ListSessions
Refresh
Republishes the model list, which is the same for every chat.
Shutdown
Trait Implementations§
Auto Trait Implementations§
impl Forget for Command
impl Freeze for Commandwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<Canvas> is !null: Freeze,
PhantomData<ArcInner<Canvas>>: Freeze,
PhantomData<ContextRef>: Freeze,
PhantomData<ImageAttachment>: Freeze,
impl Move for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Commandwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Canvas> is !null: UnsafeUnpin,
PhantomData<ArcInner<Canvas>>: UnsafeUnpin,
PhantomData<ContextRef>: UnsafeUnpin,
PhantomData<ImageAttachment>: UnsafeUnpin,
impl UnwindSafe for Command
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
Mutably borrows from an owned value. Read more