Add chat functionality between technician and client
- Add ChatMessage to protobuf definitions - Server relays chat messages between agent and viewer - Agent chat module shows messages via MessageBox - Dashboard chat modal with WebSocket connection - Simplified protobuf encoder/decoder in JavaScript 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
//! for a one-time support session.
|
||||
|
||||
mod capture;
|
||||
mod chat;
|
||||
mod config;
|
||||
mod encoder;
|
||||
mod input;
|
||||
@@ -198,6 +199,12 @@ async fn run_agent(config: config::Config) -> Result<()> {
|
||||
}
|
||||
};
|
||||
|
||||
// Create chat controller
|
||||
let chat_ctrl = chat::ChatController::new();
|
||||
if chat_ctrl.is_some() {
|
||||
info!("Chat controller created");
|
||||
}
|
||||
|
||||
// Connect to server and run main loop
|
||||
loop {
|
||||
info!("Connecting to server...");
|
||||
@@ -219,8 +226,8 @@ async fn run_agent(config: config::Config) -> Result<()> {
|
||||
t.update_status("Status: Connected");
|
||||
}
|
||||
|
||||
// Run session until disconnect, passing tray for event processing
|
||||
if let Err(e) = session.run_with_tray(tray.as_ref()).await {
|
||||
// Run session until disconnect, passing tray and chat for event processing
|
||||
if let Err(e) = session.run_with_tray(tray.as_ref(), chat_ctrl.as_ref()).await {
|
||||
let error_msg = e.to_string();
|
||||
|
||||
// Check if this is a user-initiated exit
|
||||
|
||||
Reference in New Issue
Block a user