ACP history mentions (#36551)
- **TEMP** - **Update @-mentions to use new history** Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
159b5e9fb5
commit
5d2bb2466e
17 changed files with 581 additions and 392 deletions
|
@ -18,7 +18,6 @@ test-support = ["gpui/test-support", "project/test-support", "dep:parking_lot"]
|
|||
[dependencies]
|
||||
action_log.workspace = true
|
||||
agent-client-protocol.workspace = true
|
||||
agent.workspace = true
|
||||
anyhow.workspace = true
|
||||
buffer_diff.workspace = true
|
||||
collections.workspace = true
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use agent::ThreadId;
|
||||
use agent_client_protocol as acp;
|
||||
use anyhow::{Context as _, Result, bail};
|
||||
use file_icons::FileIcons;
|
||||
use prompt_store::{PromptId, UserPromptId};
|
||||
|
@ -12,7 +12,7 @@ use std::{
|
|||
use ui::{App, IconName, SharedString};
|
||||
use url::Url;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Hash)]
|
||||
pub enum MentionUri {
|
||||
File {
|
||||
abs_path: PathBuf,
|
||||
|
@ -26,7 +26,7 @@ pub enum MentionUri {
|
|||
line_range: Range<u32>,
|
||||
},
|
||||
Thread {
|
||||
id: ThreadId,
|
||||
id: acp::SessionId,
|
||||
name: String,
|
||||
},
|
||||
TextThread {
|
||||
|
@ -89,7 +89,7 @@ impl MentionUri {
|
|||
if let Some(thread_id) = path.strip_prefix("/agent/thread/") {
|
||||
let name = single_query_param(&url, "name")?.context("Missing thread name")?;
|
||||
Ok(Self::Thread {
|
||||
id: thread_id.into(),
|
||||
id: acp::SessionId(thread_id.into()),
|
||||
name,
|
||||
})
|
||||
} else if let Some(path) = path.strip_prefix("/agent/text-thread/") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue