feat(cli): références d'attachments [file n]/[image n] dans le transcript + zone chat redimensionnable — #188 (QA verte)
- Attachments: projection canonique ChatPromptAttachmentDto (référence [file n]/[image n] par compteur de type, ordre d'import) insérée dans le prompt modèle et transportée par ReplyChunk::UserPrompt (attachmentRefs) ; rendu compact côté CustomAgentChatView. - Resize: la zone chat (LeafView/LayoutGrid) est redimensionnable, taille actuelle conservée par défaut, préférence locale persistée. - Tests: commands (projection des refs), dto_chat, chat_bridge, CustomAgentChatView, LayoutGrid.chat.
This commit is contained in:
@ -3206,6 +3206,22 @@ pub struct ChatAttachmentDto {
|
||||
pub created_at: u64,
|
||||
}
|
||||
|
||||
/// Canonical attachment projection attached to a streamed user prompt.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ChatPromptAttachmentDto {
|
||||
/// Stable textual reference inserted in the model prompt, e.g. `[file 1]`.
|
||||
pub reference: String,
|
||||
/// Original display filename.
|
||||
pub filename: String,
|
||||
/// MIME type.
|
||||
pub mime: String,
|
||||
/// Size in bytes.
|
||||
pub size_bytes: u64,
|
||||
/// Absolute managed path readable by the target agent sandbox.
|
||||
pub readable_path: String,
|
||||
}
|
||||
|
||||
impl From<domain::ChatAttachment> for ChatAttachmentDto {
|
||||
fn from(value: domain::ChatAttachment) -> Self {
|
||||
Self {
|
||||
@ -3359,6 +3375,9 @@ pub enum ReplyChunk {
|
||||
/// Display labels for attachments submitted with the prompt.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
attachments: Vec<String>,
|
||||
/// Canonical attachment references for this prompt, in backend import order.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
attachment_refs: Vec<ChatPromptAttachmentDto>,
|
||||
},
|
||||
/// An assistant text fragment (incremental chat rendering).
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
||||
Reference in New Issue
Block a user