acp: Hide history unless in native agent (#36644)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2025-08-21 08:43:57 -06:00 committed by GitHub
parent 001ec97c0e
commit d8fc779a67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 27 additions and 21 deletions

View file

@ -10,6 +10,7 @@ use itertools::Itertools;
use paths::contexts_dir;
use serde::{Deserialize, Serialize};
use std::{collections::VecDeque, path::Path, sync::Arc, time::Duration};
use ui::ElementId;
use util::ResultExt as _;
const MAX_RECENTLY_OPENED_ENTRIES: usize = 6;
@ -68,6 +69,15 @@ pub enum HistoryEntryId {
TextThread(Arc<Path>),
}
impl Into<ElementId> for HistoryEntryId {
fn into(self) -> ElementId {
match self {
HistoryEntryId::AcpThread(session_id) => ElementId::Name(session_id.0.into()),
HistoryEntryId::TextThread(path) => ElementId::Path(path),
}
}
}
#[derive(Serialize, Deserialize, Debug)]
enum SerializedRecentOpen {
AcpThread(String),