ctx-mgmt: ctx session management (dev mode only) (#2415)
This commit is contained in:
@@ -77,9 +77,8 @@ pub struct RedactedThinkingContent {
|
||||
pub data: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[derive(ToSchema)]
|
||||
pub struct FrontendToolRequest {
|
||||
pub id: String,
|
||||
#[serde(with = "tool_result_serde")]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use crate::session::{self, SessionMetadata};
|
||||
use anyhow::Result;
|
||||
use serde::Serialize;
|
||||
use std::cmp::Ordering;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::session::{self, SessionMetadata};
|
||||
|
||||
#[derive(Clone, Serialize)]
|
||||
#[derive(Clone, Serialize, ToSchema)]
|
||||
pub struct SessionInfo {
|
||||
pub id: String,
|
||||
pub path: String,
|
||||
|
||||
@@ -8,6 +8,7 @@ use std::fs::{self, File};
|
||||
use std::io::{self, BufRead, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
fn get_home_dir() -> PathBuf {
|
||||
choose_app_strategy(crate::config::APP_STRATEGY.clone())
|
||||
@@ -17,9 +18,10 @@ fn get_home_dir() -> PathBuf {
|
||||
}
|
||||
|
||||
/// Metadata for a session, stored as the first line in the session file
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
#[derive(Debug, Clone, Serialize, ToSchema)]
|
||||
pub struct SessionMetadata {
|
||||
/// Working directory for the session
|
||||
#[schema(value_type = String, example = "/home/user/sessions/session1")]
|
||||
pub working_dir: PathBuf,
|
||||
/// A short description of the session, typically 3 words or less
|
||||
pub description: String,
|
||||
|
||||
Reference in New Issue
Block a user