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:
2025-12-28 16:31:16 -07:00
parent 0dcbae69a0
commit aa03a87c7c
6 changed files with 694 additions and 9 deletions

View File

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