fix: tighten up some logic around session timestamps and ids (#922)
* update `SessionConfigured` event to include the UUID for the session * show the UUID in the Rust TUI * use local timestamps in log files instead of UTC * include timestamps in log file names for easier discovery
This commit is contained in:
@@ -10,6 +10,7 @@ use std::path::PathBuf;
|
||||
use mcp_types::CallToolResult;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::model_provider_info::ModelProviderInfo;
|
||||
|
||||
@@ -323,10 +324,7 @@ pub enum EventMsg {
|
||||
},
|
||||
|
||||
/// Ack the client's configure message.
|
||||
SessionConfigured {
|
||||
/// Tell the client what model is being queried.
|
||||
model: String,
|
||||
},
|
||||
SessionConfigured(SessionConfiguredEvent),
|
||||
|
||||
McpToolCallBegin {
|
||||
/// Identifier so this can be paired with the McpToolCallEnd event.
|
||||
@@ -429,6 +427,15 @@ pub enum EventMsg {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Deserialize, Serialize)]
|
||||
pub struct SessionConfiguredEvent {
|
||||
/// Unique id for this session.
|
||||
pub session_id: Uuid,
|
||||
|
||||
/// Tell the client what model is being queried.
|
||||
pub model: String,
|
||||
}
|
||||
|
||||
/// User's decision in response to an ExecApprovalRequest.
|
||||
#[derive(Debug, Default, Clone, Copy, Deserialize, Serialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
|
||||
Reference in New Issue
Block a user