greetingカードの作成

This commit is contained in:
2026-04-15 10:35:15 +09:00
parent c48abf062e
commit 0c29de1b10
11 changed files with 369 additions and 56 deletions
+8 -2
View File
@@ -1,4 +1,4 @@
use protocol::{Event, Method};
use protocol::{Event, Greeting, Method};
pub struct App {
pub pod_name: String,
@@ -23,6 +23,7 @@ pub enum OutputItem {
TurnHeader(String),
Padded(MessageKind, String),
PaddedRight(MessageKind, String),
GreetingCard(Greeting),
Blank,
}
@@ -165,8 +166,13 @@ impl App {
self.current_tool = None;
}
Event::ToolCallArgsDelta { .. } => {}
Event::History { items } => {
Event::History { items, greeting } => {
self.restore_history(&items);
if self.turn_index == 0 {
self.output_queue
.insert(0, OutputItem::GreetingCard(greeting));
self.output_queue.insert(1, OutputItem::Blank);
}
}
}
}