pub enum ChatActorMessage {
UserInput(String),
UserInputWithImages {
text: String,
images: Vec<ImageData>,
},
ChangeProvider(String),
GetSettings,
SaveSettings {
settings: Value,
persist: bool,
},
SwitchProfile {
profile_name: String,
},
SaveProfile {
profile_name: String,
},
ListProfiles,
ListSessions,
ResumeSession {
session_id: String,
},
GetModuleSchemas,
}Expand description
Defines the possible input messages to the ChatActor.
These messages derive serde for use across processes. Applications such as VSCode spawn tycode-core in a sub-process and communicate to the actor over stdin/stdout. In such applications, these messages are serialized to json and sent over stdin.
Variants§
UserInput(String)
A user input to the conversation with the current AI agent
UserInputWithImages
A user input with attached images
ChangeProvider(String)
Changes the AI provider (i.e. Bedrock, OpenRouter, etc) that this actor is using. This is an in-memory only change that only lasts for the duration of this actor’s lifetime.
GetSettings
Sends the current settings (from SettingsManager) to the EventSender
SaveSettings
SwitchProfile
Switches to a different settings profile
SaveProfile
Saves current settings as a new profile
ListProfiles
Lists all available settings profiles
ListSessions
Requests all available sessions
ResumeSession
Requests to resume a specific session
GetModuleSchemas
Requests JSON schemas for all module settings
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChatActorMessage
impl<'de> Deserialize<'de> for ChatActorMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ChatActorMessage
impl RefUnwindSafe for ChatActorMessage
impl Send for ChatActorMessage
impl Sync for ChatActorMessage
impl Unpin for ChatActorMessage
impl UnwindSafe for ChatActorMessage
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
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