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:
@ -256,8 +256,22 @@ fn progress_entity_key(progress: &ReplyProgressDto) -> Option<String> {
|
||||
|
||||
fn reply_chunk_bytes(chunk: &ReplyChunk) -> usize {
|
||||
match chunk {
|
||||
ReplyChunk::UserPrompt { text, attachments } => {
|
||||
text.len() + attachments.iter().map(String::len).sum::<usize>()
|
||||
ReplyChunk::UserPrompt {
|
||||
text,
|
||||
attachments,
|
||||
attachment_refs,
|
||||
} => {
|
||||
text.len()
|
||||
+ attachments.iter().map(String::len).sum::<usize>()
|
||||
+ attachment_refs
|
||||
.iter()
|
||||
.map(|attachment| {
|
||||
attachment.reference.len()
|
||||
+ attachment.filename.len()
|
||||
+ attachment.mime.len()
|
||||
+ attachment.readable_path.len()
|
||||
})
|
||||
.sum::<usize>()
|
||||
}
|
||||
ReplyChunk::TextDelta { text } => text.len(),
|
||||
ReplyChunk::ToolActivity { label } => label.len(),
|
||||
|
||||
Reference in New Issue
Block a user