feat: record agent approvals
This commit is contained in:
@@ -81,6 +81,7 @@ impl App {
|
||||
self.config.model,
|
||||
&self.conversation[index - 1].content,
|
||||
None,
|
||||
&self.conversation[index - 1].tool_approval_reasons,
|
||||
)
|
||||
.is_empty()
|
||||
{
|
||||
@@ -191,6 +192,7 @@ impl App {
|
||||
self.config.model,
|
||||
&message.content,
|
||||
stored_result,
|
||||
&message.tool_approval_reasons,
|
||||
)
|
||||
};
|
||||
if !cards.is_empty() {
|
||||
@@ -540,9 +542,25 @@ fn tool_cards(cards: Vec<crate::agent::ToolCard>) -> Element<'static, Message> {
|
||||
.gap(6),
|
||||
);
|
||||
}
|
||||
let mut name = row![text(card.call.name).size(13)]
|
||||
.spacing(5)
|
||||
.align_y(Alignment::Center);
|
||||
if let Some(reason) = &card.approval_reason {
|
||||
name = name.push(
|
||||
tooltip(
|
||||
icon(ICON_ROBOT, 13),
|
||||
container(text(reason.clone()).size(12))
|
||||
.padding(8)
|
||||
.max_width(320)
|
||||
.style(preference_group_style),
|
||||
tooltip::Position::Top,
|
||||
)
|
||||
.gap(5),
|
||||
);
|
||||
}
|
||||
let mut content = column![
|
||||
row![
|
||||
text(card.call.name).size(13),
|
||||
name,
|
||||
Space::new().width(Length::Fill),
|
||||
text(card.state.label()).size(11).color(muted_text()),
|
||||
actions,
|
||||
|
||||
Reference in New Issue
Block a user