feat(chat): persistance bornee du brouillon custom chat par projet/layout (#182)

This commit is contained in:
2026-08-11 16:24:20 +02:00
parent 25ad44a3d9
commit 94b4ce7e5f
23 changed files with 1552 additions and 70 deletions

View File

@ -3100,6 +3100,42 @@ impl From<TerminalSession> for TerminalSessionDto {
// Structured chat sessions (§17 — D4)
// ---------------------------------------------------------------------------
/// Request scoped to one persisted custom chat draft.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ChatDraftScopeRequestDto {
/// Project id.
pub project_id: String,
/// Named layout id.
pub layout_id: String,
/// Layout node id.
pub node_id: String,
}
/// Request for saving one custom chat draft.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SaveChatDraftRequestDto {
/// Project id.
pub project_id: String,
/// Named layout id.
pub layout_id: String,
/// Layout node id.
pub node_id: String,
/// Draft text. Empty text clears the draft.
pub text: String,
}
/// Response for reading one custom chat draft.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ReadChatDraftResponseDto {
/// Draft text, or `null` when absent.
pub text: Option<String>,
/// Last update time, epoch milliseconds, or `null` when absent.
pub updated_at_ms: Option<u64>,
}
/// Structured attachment intent sent by the chat frontend.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]