parent
72761797a2
commit
308cb9e537
47 changed files with 177 additions and 77 deletions
36
Cargo.lock
generated
36
Cargo.lock
generated
|
@ -6,9 +6,9 @@ version = 4
|
||||||
name = "acp_thread"
|
name = "acp_thread"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"action_log",
|
||||||
"agent-client-protocol",
|
"agent-client-protocol",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"assistant_tool",
|
|
||||||
"buffer_diff",
|
"buffer_diff",
|
||||||
"editor",
|
"editor",
|
||||||
"env_logger 0.11.8",
|
"env_logger 0.11.8",
|
||||||
|
@ -32,6 +32,32 @@ dependencies = [
|
||||||
"workspace-hack",
|
"workspace-hack",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "action_log"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"buffer_diff",
|
||||||
|
"clock",
|
||||||
|
"collections",
|
||||||
|
"ctor",
|
||||||
|
"futures 0.3.31",
|
||||||
|
"gpui",
|
||||||
|
"indoc",
|
||||||
|
"language",
|
||||||
|
"log",
|
||||||
|
"pretty_assertions",
|
||||||
|
"project",
|
||||||
|
"rand 0.8.5",
|
||||||
|
"serde_json",
|
||||||
|
"settings",
|
||||||
|
"text",
|
||||||
|
"util",
|
||||||
|
"watch",
|
||||||
|
"workspace-hack",
|
||||||
|
"zlog",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "activity_indicator"
|
name = "activity_indicator"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
@ -84,6 +110,7 @@ dependencies = [
|
||||||
name = "agent"
|
name = "agent"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"action_log",
|
||||||
"agent_settings",
|
"agent_settings",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"assistant_context",
|
"assistant_context",
|
||||||
|
@ -156,6 +183,7 @@ name = "agent2"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"acp_thread",
|
"acp_thread",
|
||||||
|
"action_log",
|
||||||
"agent-client-protocol",
|
"agent-client-protocol",
|
||||||
"agent_servers",
|
"agent_servers",
|
||||||
"agent_settings",
|
"agent_settings",
|
||||||
|
@ -261,6 +289,7 @@ name = "agent_ui"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"acp_thread",
|
"acp_thread",
|
||||||
|
"action_log",
|
||||||
"agent",
|
"agent",
|
||||||
"agent-client-protocol",
|
"agent-client-protocol",
|
||||||
"agent2",
|
"agent2",
|
||||||
|
@ -842,13 +871,13 @@ dependencies = [
|
||||||
name = "assistant_tool"
|
name = "assistant_tool"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"action_log",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"buffer_diff",
|
"buffer_diff",
|
||||||
"clock",
|
"clock",
|
||||||
"collections",
|
"collections",
|
||||||
"ctor",
|
"ctor",
|
||||||
"derive_more 0.99.19",
|
"derive_more 0.99.19",
|
||||||
"futures 0.3.31",
|
|
||||||
"gpui",
|
"gpui",
|
||||||
"icons",
|
"icons",
|
||||||
"indoc",
|
"indoc",
|
||||||
|
@ -865,7 +894,6 @@ dependencies = [
|
||||||
"settings",
|
"settings",
|
||||||
"text",
|
"text",
|
||||||
"util",
|
"util",
|
||||||
"watch",
|
|
||||||
"workspace",
|
"workspace",
|
||||||
"workspace-hack",
|
"workspace-hack",
|
||||||
"zlog",
|
"zlog",
|
||||||
|
@ -875,6 +903,7 @@ dependencies = [
|
||||||
name = "assistant_tools"
|
name = "assistant_tools"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"action_log",
|
||||||
"agent_settings",
|
"agent_settings",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"assistant_tool",
|
"assistant_tool",
|
||||||
|
@ -13523,6 +13552,7 @@ dependencies = [
|
||||||
name = "remote_server"
|
name = "remote_server"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"action_log",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"askpass",
|
"askpass",
|
||||||
"assistant_tool",
|
"assistant_tool",
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"crates/acp_thread",
|
"crates/acp_thread",
|
||||||
|
"crates/action_log",
|
||||||
"crates/activity_indicator",
|
"crates/activity_indicator",
|
||||||
"crates/agent",
|
"crates/agent",
|
||||||
"crates/agent2",
|
"crates/agent2",
|
||||||
|
@ -229,6 +230,7 @@ edition = "2024"
|
||||||
#
|
#
|
||||||
|
|
||||||
acp_thread = { path = "crates/acp_thread" }
|
acp_thread = { path = "crates/acp_thread" }
|
||||||
|
action_log = { path = "crates/action_log" }
|
||||||
agent = { path = "crates/agent" }
|
agent = { path = "crates/agent" }
|
||||||
agent2 = { path = "crates/agent2" }
|
agent2 = { path = "crates/agent2" }
|
||||||
activity_indicator = { path = "crates/activity_indicator" }
|
activity_indicator = { path = "crates/activity_indicator" }
|
||||||
|
|
|
@ -16,9 +16,9 @@ doctest = false
|
||||||
test-support = ["gpui/test-support", "project/test-support"]
|
test-support = ["gpui/test-support", "project/test-support"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
action_log.workspace = true
|
||||||
agent-client-protocol.workspace = true
|
agent-client-protocol.workspace = true
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
assistant_tool.workspace = true
|
|
||||||
buffer_diff.workspace = true
|
buffer_diff.workspace = true
|
||||||
editor.workspace = true
|
editor.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
|
|
|
@ -4,9 +4,9 @@ mod diff;
|
||||||
pub use connection::*;
|
pub use connection::*;
|
||||||
pub use diff::*;
|
pub use diff::*;
|
||||||
|
|
||||||
|
use action_log::ActionLog;
|
||||||
use agent_client_protocol as acp;
|
use agent_client_protocol as acp;
|
||||||
use anyhow::{Context as _, Result};
|
use anyhow::{Context as _, Result};
|
||||||
use assistant_tool::ActionLog;
|
|
||||||
use editor::Bias;
|
use editor::Bias;
|
||||||
use futures::{FutureExt, channel::oneshot, future::BoxFuture};
|
use futures::{FutureExt, channel::oneshot, future::BoxFuture};
|
||||||
use gpui::{AppContext, Context, Entity, EventEmitter, SharedString, Task};
|
use gpui::{AppContext, Context, Entity, EventEmitter, SharedString, Task};
|
||||||
|
|
45
crates/action_log/Cargo.toml
Normal file
45
crates/action_log/Cargo.toml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
[package]
|
||||||
|
name = "action_log"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition.workspace = true
|
||||||
|
publish.workspace = true
|
||||||
|
license = "GPL-3.0-or-later"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
path = "src/action_log.rs"
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
anyhow.workspace = true
|
||||||
|
buffer_diff.workspace = true
|
||||||
|
clock.workspace = true
|
||||||
|
collections.workspace = true
|
||||||
|
futures.workspace = true
|
||||||
|
gpui.workspace = true
|
||||||
|
language.workspace = true
|
||||||
|
project.workspace = true
|
||||||
|
text.workspace = true
|
||||||
|
util.workspace = true
|
||||||
|
watch.workspace = true
|
||||||
|
workspace-hack.workspace = true
|
||||||
|
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
buffer_diff = { workspace = true, features = ["test-support"] }
|
||||||
|
collections = { workspace = true, features = ["test-support"] }
|
||||||
|
clock = { workspace = true, features = ["test-support"] }
|
||||||
|
ctor.workspace = true
|
||||||
|
gpui = { workspace = true, features = ["test-support"] }
|
||||||
|
indoc.workspace = true
|
||||||
|
language = { workspace = true, features = ["test-support"] }
|
||||||
|
log.workspace = true
|
||||||
|
pretty_assertions.workspace = true
|
||||||
|
project = { workspace = true, features = ["test-support"] }
|
||||||
|
rand.workspace = true
|
||||||
|
serde_json.workspace = true
|
||||||
|
settings = { workspace = true, features = ["test-support"] }
|
||||||
|
text = { workspace = true, features = ["test-support"] }
|
||||||
|
util = { workspace = true, features = ["test-support"] }
|
||||||
|
zlog.workspace = true
|
1
crates/action_log/LICENSE-GPL
Symbolic link
1
crates/action_log/LICENSE-GPL
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../LICENSE-GPL
|
|
@ -19,6 +19,7 @@ test-support = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
action_log.workspace = true
|
||||||
agent_settings.workspace = true
|
agent_settings.workspace = true
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
assistant_context.workspace = true
|
assistant_context.workspace = true
|
||||||
|
|
|
@ -326,7 +326,7 @@ mod tests {
|
||||||
_input: serde_json::Value,
|
_input: serde_json::Value,
|
||||||
_request: Arc<language_model::LanguageModelRequest>,
|
_request: Arc<language_model::LanguageModelRequest>,
|
||||||
_project: Entity<Project>,
|
_project: Entity<Project>,
|
||||||
_action_log: Entity<assistant_tool::ActionLog>,
|
_action_log: Entity<action_log::ActionLog>,
|
||||||
_model: Arc<dyn language_model::LanguageModel>,
|
_model: Arc<dyn language_model::LanguageModel>,
|
||||||
_window: Option<gpui::AnyWindowHandle>,
|
_window: Option<gpui::AnyWindowHandle>,
|
||||||
_cx: &mut App,
|
_cx: &mut App,
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Result, anyhow, bail};
|
use anyhow::{Result, anyhow, bail};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult, ToolSource};
|
use assistant_tool::{Tool, ToolResult, ToolSource};
|
||||||
use context_server::{ContextServerId, types};
|
use context_server::{ContextServerId, types};
|
||||||
use gpui::{AnyWindowHandle, App, Entity, Task};
|
use gpui::{AnyWindowHandle, App, Entity, Task};
|
||||||
use icons::IconName;
|
use icons::IconName;
|
||||||
|
|
|
@ -8,9 +8,10 @@ use crate::{
|
||||||
},
|
},
|
||||||
tool_use::{PendingToolUse, ToolUse, ToolUseMetadata, ToolUseState},
|
tool_use::{PendingToolUse, ToolUse, ToolUseMetadata, ToolUseState},
|
||||||
};
|
};
|
||||||
|
use action_log::ActionLog;
|
||||||
use agent_settings::{AgentProfileId, AgentSettings, CompletionMode, SUMMARIZE_THREAD_PROMPT};
|
use agent_settings::{AgentProfileId, AgentSettings, CompletionMode, SUMMARIZE_THREAD_PROMPT};
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, AnyToolCard, Tool, ToolWorkingSet};
|
use assistant_tool::{AnyToolCard, Tool, ToolWorkingSet};
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use client::{ModelRequestUsage, RequestUsage};
|
use client::{ModelRequestUsage, RequestUsage};
|
||||||
use cloud_llm_client::{CompletionIntent, CompletionRequestStatus, Plan, UsageLimit};
|
use cloud_llm_client::{CompletionIntent, CompletionRequestStatus, Plan, UsageLimit};
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
[package]
|
[package]
|
||||||
name = "agent2"
|
name = "agent2"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition.workspace = true
|
||||||
|
publish.workspace = true
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
publish = false
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
path = "src/agent2.rs"
|
path = "src/agent2.rs"
|
||||||
|
@ -13,6 +13,7 @@ workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
acp_thread.workspace = true
|
acp_thread.workspace = true
|
||||||
|
action_log.workspace = true
|
||||||
agent-client-protocol.workspace = true
|
agent-client-protocol.workspace = true
|
||||||
agent_servers.workspace = true
|
agent_servers.workspace = true
|
||||||
agent_settings.workspace = true
|
agent_settings.workspace = true
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use crate::{templates::Templates, AgentResponseEvent, Thread};
|
use crate::{AgentResponseEvent, Thread, templates::Templates};
|
||||||
use crate::{EditFileTool, FindPathTool, ReadFileTool, ThinkingTool, ToolCallAuthorization};
|
use crate::{EditFileTool, FindPathTool, ReadFileTool, ThinkingTool, ToolCallAuthorization};
|
||||||
use acp_thread::ModelSelector;
|
use acp_thread::ModelSelector;
|
||||||
use agent_client_protocol as acp;
|
use agent_client_protocol as acp;
|
||||||
use anyhow::{anyhow, Context as _, Result};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use futures::{future, StreamExt};
|
use futures::{StreamExt, future};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
App, AppContext, AsyncApp, Context, Entity, SharedString, Subscription, Task, WeakEntity,
|
App, AppContext, AsyncApp, Context, Entity, SharedString, Subscription, Task, WeakEntity,
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,7 @@ use gpui::{App, Entity, Task};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use prompt_store::PromptStore;
|
use prompt_store::PromptStore;
|
||||||
|
|
||||||
use crate::{templates::Templates, NativeAgent, NativeAgentConnection};
|
use crate::{NativeAgent, NativeAgentConnection, templates::Templates};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct NativeAgentServer;
|
pub struct NativeAgentServer;
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
use super::*;
|
use super::*;
|
||||||
use acp_thread::AgentConnection;
|
use acp_thread::AgentConnection;
|
||||||
|
use action_log::ActionLog;
|
||||||
use agent_client_protocol::{self as acp};
|
use agent_client_protocol::{self as acp};
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assistant_tool::ActionLog;
|
|
||||||
use client::{Client, UserStore};
|
use client::{Client, UserStore};
|
||||||
use fs::FakeFs;
|
use fs::FakeFs;
|
||||||
use futures::channel::mpsc::UnboundedReceiver;
|
use futures::channel::mpsc::UnboundedReceiver;
|
||||||
use gpui::{http_client::FakeHttpClient, AppContext, Entity, Task, TestAppContext};
|
use gpui::{AppContext, Entity, Task, TestAppContext, http_client::FakeHttpClient};
|
||||||
use indoc::indoc;
|
use indoc::indoc;
|
||||||
use language_model::{
|
use language_model::{
|
||||||
fake_provider::FakeLanguageModel, LanguageModel, LanguageModelCompletionError,
|
LanguageModel, LanguageModelCompletionError, LanguageModelCompletionEvent, LanguageModelId,
|
||||||
LanguageModelCompletionEvent, LanguageModelId, LanguageModelRegistry, LanguageModelToolResult,
|
LanguageModelRegistry, LanguageModelToolResult, LanguageModelToolUse, MessageContent, Role,
|
||||||
LanguageModelToolUse, MessageContent, Role, StopReason,
|
StopReason, fake_provider::FakeLanguageModel,
|
||||||
};
|
};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use prompt_store::ProjectContext;
|
use prompt_store::ProjectContext;
|
||||||
|
@ -149,19 +149,21 @@ async fn test_basic_tool_calls(cx: &mut TestAppContext) {
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(stop_events(events), vec![acp::StopReason::EndTurn]);
|
assert_eq!(stop_events(events), vec![acp::StopReason::EndTurn]);
|
||||||
thread.update(cx, |thread, _cx| {
|
thread.update(cx, |thread, _cx| {
|
||||||
assert!(thread
|
assert!(
|
||||||
.messages()
|
thread
|
||||||
.last()
|
.messages()
|
||||||
.unwrap()
|
.last()
|
||||||
.content
|
.unwrap()
|
||||||
.iter()
|
.content
|
||||||
.any(|content| {
|
.iter()
|
||||||
if let MessageContent::Text(text) = content {
|
.any(|content| {
|
||||||
text.contains("Ding")
|
if let MessageContent::Text(text) = content {
|
||||||
} else {
|
text.contains("Ding")
|
||||||
false
|
} else {
|
||||||
}
|
false
|
||||||
}));
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,7 +335,7 @@ async fn expect_tool_call_update_fields(
|
||||||
.unwrap();
|
.unwrap();
|
||||||
match event {
|
match event {
|
||||||
AgentResponseEvent::ToolCallUpdate(acp_thread::ToolCallUpdate::UpdateFields(update)) => {
|
AgentResponseEvent::ToolCallUpdate(acp_thread::ToolCallUpdate::UpdateFields(update)) => {
|
||||||
return update
|
return update;
|
||||||
}
|
}
|
||||||
event => {
|
event => {
|
||||||
panic!("Unexpected event {event:?}");
|
panic!("Unexpected event {event:?}");
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
use crate::{SystemPromptTemplate, Template, Templates};
|
use crate::{SystemPromptTemplate, Template, Templates};
|
||||||
use acp_thread::Diff;
|
use acp_thread::Diff;
|
||||||
|
use action_log::ActionLog;
|
||||||
use agent_client_protocol as acp;
|
use agent_client_protocol as acp;
|
||||||
use anyhow::{anyhow, Context as _, Result};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{adapt_schema_to_format, ActionLog};
|
use assistant_tool::adapt_schema_to_format;
|
||||||
use cloud_llm_client::{CompletionIntent, CompletionMode};
|
use cloud_llm_client::{CompletionIntent, CompletionMode};
|
||||||
use collections::HashMap;
|
use collections::HashMap;
|
||||||
use futures::{
|
use futures::{
|
||||||
|
@ -23,7 +24,7 @@ use schemars::{JsonSchema, Schema};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use smol::stream::StreamExt;
|
use smol::stream::StreamExt;
|
||||||
use std::{cell::RefCell, collections::BTreeMap, fmt::Write, future::Future, rc::Rc, sync::Arc};
|
use std::{cell::RefCell, collections::BTreeMap, fmt::Write, future::Future, rc::Rc, sync::Arc};
|
||||||
use util::{markdown::MarkdownCodeBlock, ResultExt};
|
use util::{ResultExt, markdown::MarkdownCodeBlock};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct AgentMessage {
|
pub struct AgentMessage {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::{AgentTool, Thread, ToolCallEventStream};
|
use crate::{AgentTool, Thread, ToolCallEventStream};
|
||||||
use acp_thread::Diff;
|
use acp_thread::Diff;
|
||||||
use agent_client_protocol as acp;
|
use agent_client_protocol as acp;
|
||||||
use anyhow::{anyhow, Context as _, Result};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tools::edit_agent::{EditAgent, EditAgentOutput, EditAgentOutputEvent, EditFormat};
|
use assistant_tools::edit_agent::{EditAgent, EditAgentOutput, EditAgentOutputEvent, EditFormat};
|
||||||
use cloud_llm_client::CompletionIntent;
|
use cloud_llm_client::CompletionIntent;
|
||||||
use collections::HashSet;
|
use collections::HashSet;
|
||||||
|
@ -457,7 +457,7 @@ mod tests {
|
||||||
use crate::Templates;
|
use crate::Templates;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use assistant_tool::ActionLog;
|
use action_log::ActionLog;
|
||||||
use client::TelemetrySettings;
|
use client::TelemetrySettings;
|
||||||
use fs::Fs;
|
use fs::Fs;
|
||||||
use gpui::{TestAppContext, UpdateGlobal};
|
use gpui::{TestAppContext, UpdateGlobal};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{AgentTool, ToolCallEventStream};
|
use crate::{AgentTool, ToolCallEventStream};
|
||||||
use agent_client_protocol as acp;
|
use agent_client_protocol as acp;
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{Result, anyhow};
|
||||||
use gpui::{App, AppContext, Entity, SharedString, Task};
|
use gpui::{App, AppContext, Entity, SharedString, Task};
|
||||||
use language_model::LanguageModelToolResultContent;
|
use language_model::LanguageModelToolResultContent;
|
||||||
use project::Project;
|
use project::Project;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
|
use action_log::ActionLog;
|
||||||
use agent_client_protocol::{self as acp};
|
use agent_client_protocol::{self as acp};
|
||||||
use anyhow::{anyhow, Context, Result};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{outline, ActionLog};
|
use assistant_tool::outline;
|
||||||
use gpui::{Entity, Task};
|
use gpui::{App, Entity, SharedString, Task};
|
||||||
use indoc::formatdoc;
|
use indoc::formatdoc;
|
||||||
use language::{Anchor, Point};
|
use language::{Anchor, Point};
|
||||||
use language_model::{LanguageModelImage, LanguageModelToolResultContent};
|
use language_model::{LanguageModelImage, LanguageModelToolResultContent};
|
||||||
use project::{image_store, AgentLocation, ImageItem, Project, WorktreeSettings};
|
use project::{AgentLocation, ImageItem, Project, WorktreeSettings, image_store};
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use ui::{App, SharedString};
|
|
||||||
|
|
||||||
use crate::{AgentTool, ToolCallEventStream};
|
use crate::{AgentTool, ToolCallEventStream};
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ impl AgentTool for ReadFileTool {
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use gpui::{AppContext, TestAppContext, UpdateGlobal as _};
|
use gpui::{AppContext, TestAppContext, UpdateGlobal as _};
|
||||||
use language::{tree_sitter_rust, Language, LanguageConfig, LanguageMatcher};
|
use language::{Language, LanguageConfig, LanguageMatcher, tree_sitter_rust};
|
||||||
use project::{FakeFs, Project};
|
use project::{FakeFs, Project};
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use settings::SettingsStore;
|
use settings::SettingsStore;
|
||||||
|
|
|
@ -17,6 +17,7 @@ test-support = ["gpui/test-support", "language/test-support"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
acp_thread.workspace = true
|
acp_thread.workspace = true
|
||||||
|
action_log.workspace = true
|
||||||
agent-client-protocol.workspace = true
|
agent-client-protocol.workspace = true
|
||||||
agent.workspace = true
|
agent.workspace = true
|
||||||
agent2.workspace = true
|
agent2.workspace = true
|
||||||
|
|
|
@ -10,8 +10,8 @@ use std::rc::Rc;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
use action_log::ActionLog;
|
||||||
use agent_client_protocol as acp;
|
use agent_client_protocol as acp;
|
||||||
use assistant_tool::ActionLog;
|
|
||||||
use buffer_diff::BufferDiff;
|
use buffer_diff::BufferDiff;
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use editor::{
|
use editor::{
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use crate::{Keep, KeepAll, OpenAgentDiff, Reject, RejectAll};
|
use crate::{Keep, KeepAll, OpenAgentDiff, Reject, RejectAll};
|
||||||
use acp_thread::{AcpThread, AcpThreadEvent};
|
use acp_thread::{AcpThread, AcpThreadEvent};
|
||||||
|
use action_log::ActionLog;
|
||||||
use agent::{Thread, ThreadEvent, ThreadSummary};
|
use agent::{Thread, ThreadEvent, ThreadSummary};
|
||||||
use agent_settings::AgentSettings;
|
use agent_settings::AgentSettings;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assistant_tool::ActionLog;
|
|
||||||
use buffer_diff::DiffHunkStatus;
|
use buffer_diff::DiffHunkStatus;
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use editor::{
|
use editor::{
|
||||||
|
|
|
@ -12,12 +12,10 @@ workspace = true
|
||||||
path = "src/assistant_tool.rs"
|
path = "src/assistant_tool.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
action_log.workspace = true
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
buffer_diff.workspace = true
|
|
||||||
clock.workspace = true
|
|
||||||
collections.workspace = true
|
collections.workspace = true
|
||||||
derive_more.workspace = true
|
derive_more.workspace = true
|
||||||
futures.workspace = true
|
|
||||||
gpui.workspace = true
|
gpui.workspace = true
|
||||||
icons.workspace = true
|
icons.workspace = true
|
||||||
language.workspace = true
|
language.workspace = true
|
||||||
|
@ -30,7 +28,6 @@ serde.workspace = true
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
text.workspace = true
|
text.workspace = true
|
||||||
util.workspace = true
|
util.workspace = true
|
||||||
watch.workspace = true
|
|
||||||
workspace.workspace = true
|
workspace.workspace = true
|
||||||
workspace-hack.workspace = true
|
workspace-hack.workspace = true
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
mod action_log;
|
|
||||||
pub mod outline;
|
pub mod outline;
|
||||||
mod tool_registry;
|
mod tool_registry;
|
||||||
mod tool_schema;
|
mod tool_schema;
|
||||||
|
@ -10,6 +9,7 @@ use std::fmt::Formatter;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use gpui::AnyElement;
|
use gpui::AnyElement;
|
||||||
use gpui::AnyWindowHandle;
|
use gpui::AnyWindowHandle;
|
||||||
|
@ -25,7 +25,6 @@ use language_model::LanguageModelToolSchemaFormat;
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
|
|
||||||
pub use crate::action_log::*;
|
|
||||||
pub use crate::tool_registry::*;
|
pub use crate::tool_registry::*;
|
||||||
pub use crate::tool_schema::*;
|
pub use crate::tool_schema::*;
|
||||||
pub use crate::tool_working_set::*;
|
pub use crate::tool_working_set::*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::ActionLog;
|
use action_log::ActionLog;
|
||||||
use anyhow::{Context as _, Result};
|
use anyhow::{Context as _, Result};
|
||||||
use gpui::{AsyncApp, Entity};
|
use gpui::{AsyncApp, Entity};
|
||||||
use language::{OutlineItem, ParseStatus};
|
use language::{OutlineItem, ParseStatus};
|
||||||
|
|
|
@ -15,6 +15,7 @@ path = "src/assistant_tools.rs"
|
||||||
eval = []
|
eval = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
action_log.workspace = true
|
||||||
agent_settings.workspace = true
|
agent_settings.workspace = true
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
assistant_tool.workspace = true
|
assistant_tool.workspace = true
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Context as _, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use gpui::AnyWindowHandle;
|
use gpui::AnyWindowHandle;
|
||||||
use gpui::{App, AppContext, Entity, Task};
|
use gpui::{App, AppContext, Entity, Task};
|
||||||
use language_model::LanguageModel;
|
use language_model::LanguageModel;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Context as _, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use gpui::AnyWindowHandle;
|
use gpui::AnyWindowHandle;
|
||||||
use gpui::{App, Entity, Task};
|
use gpui::{App, Entity, Task};
|
||||||
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Context as _, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use futures::{SinkExt, StreamExt, channel::mpsc};
|
use futures::{SinkExt, StreamExt, channel::mpsc};
|
||||||
use gpui::{AnyWindowHandle, App, AppContext, Entity, Task};
|
use gpui::{AnyWindowHandle, App, AppContext, Entity, Task};
|
||||||
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use gpui::{AnyWindowHandle, App, Entity, Task};
|
use gpui::{AnyWindowHandle, App, Entity, Task};
|
||||||
use language::{DiagnosticSeverity, OffsetRangeExt};
|
use language::{DiagnosticSeverity, OffsetRangeExt};
|
||||||
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
||||||
|
|
|
@ -5,8 +5,8 @@ mod evals;
|
||||||
mod streaming_fuzzy_matcher;
|
mod streaming_fuzzy_matcher;
|
||||||
|
|
||||||
use crate::{Template, Templates};
|
use crate::{Template, Templates};
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assistant_tool::ActionLog;
|
|
||||||
use cloud_llm_client::CompletionIntent;
|
use cloud_llm_client::CompletionIntent;
|
||||||
use create_file_parser::{CreateFileParser, CreateFileParserEvent};
|
use create_file_parser::{CreateFileParser, CreateFileParserEvent};
|
||||||
pub use edit_parser::EditFormat;
|
pub use edit_parser::EditFormat;
|
||||||
|
|
|
@ -4,11 +4,11 @@ use crate::{
|
||||||
schema::json_schema_for,
|
schema::json_schema_for,
|
||||||
ui::{COLLAPSED_LINES, ToolOutputPreview},
|
ui::{COLLAPSED_LINES, ToolOutputPreview},
|
||||||
};
|
};
|
||||||
|
use action_log::ActionLog;
|
||||||
use agent_settings;
|
use agent_settings;
|
||||||
use anyhow::{Context as _, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{
|
use assistant_tool::{
|
||||||
ActionLog, AnyToolCard, Tool, ToolCard, ToolResult, ToolResultContent, ToolResultOutput,
|
AnyToolCard, Tool, ToolCard, ToolResult, ToolResultContent, ToolResultOutput, ToolUseStatus,
|
||||||
ToolUseStatus,
|
|
||||||
};
|
};
|
||||||
use buffer_diff::{BufferDiff, BufferDiffSnapshot};
|
use buffer_diff::{BufferDiff, BufferDiffSnapshot};
|
||||||
use editor::{Editor, EditorMode, MinimapVisibility, MultiBuffer, PathKey};
|
use editor::{Editor, EditorMode, MinimapVisibility, MultiBuffer, PathKey};
|
||||||
|
|
|
@ -3,8 +3,9 @@ use std::sync::Arc;
|
||||||
use std::{borrow::Cow, cell::RefCell};
|
use std::{borrow::Cow, cell::RefCell};
|
||||||
|
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Context as _, Result, anyhow, bail};
|
use anyhow::{Context as _, Result, anyhow, bail};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use futures::AsyncReadExt as _;
|
use futures::AsyncReadExt as _;
|
||||||
use gpui::{AnyWindowHandle, App, AppContext as _, Entity, Task};
|
use gpui::{AnyWindowHandle, App, AppContext as _, Entity, Task};
|
||||||
use html_to_markdown::{TagHandler, convert_html_to_markdown, markdown};
|
use html_to_markdown::{TagHandler, convert_html_to_markdown, markdown};
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
use crate::{schema::json_schema_for, ui::ToolCallCardHeader};
|
use crate::{schema::json_schema_for, ui::ToolCallCardHeader};
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use assistant_tool::{
|
use assistant_tool::{
|
||||||
ActionLog, Tool, ToolCard, ToolResult, ToolResultContent, ToolResultOutput, ToolUseStatus,
|
Tool, ToolCard, ToolResult, ToolResultContent, ToolResultOutput, ToolUseStatus,
|
||||||
};
|
};
|
||||||
use editor::Editor;
|
use editor::Editor;
|
||||||
use futures::channel::oneshot::{self, Receiver};
|
use futures::channel::oneshot::{self, Receiver};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use gpui::{AnyWindowHandle, App, Entity, Task};
|
use gpui::{AnyWindowHandle, App, Entity, Task};
|
||||||
use language::{OffsetRangeExt, ParseStatus, Point};
|
use language::{OffsetRangeExt, ParseStatus, Point};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use gpui::{AnyWindowHandle, App, Entity, Task};
|
use gpui::{AnyWindowHandle, App, Entity, Task};
|
||||||
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
||||||
use project::{Project, WorktreeSettings};
|
use project::{Project, WorktreeSettings};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Context as _, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use gpui::{AnyWindowHandle, App, AppContext, Entity, Task};
|
use gpui::{AnyWindowHandle, App, AppContext, Entity, Task};
|
||||||
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use chrono::{Local, Utc};
|
use chrono::{Local, Utc};
|
||||||
use gpui::{AnyWindowHandle, App, Entity, Task};
|
use gpui::{AnyWindowHandle, App, Entity, Task};
|
||||||
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Context as _, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use gpui::{AnyWindowHandle, App, AppContext, Entity, Task};
|
use gpui::{AnyWindowHandle, App, AppContext, Entity, Task};
|
||||||
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use gpui::{AnyWindowHandle, App, Entity, Task};
|
use gpui::{AnyWindowHandle, App, Entity, Task};
|
||||||
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Context as _, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use assistant_tool::{ToolResultContent, outline};
|
use assistant_tool::{ToolResultContent, outline};
|
||||||
use gpui::{AnyWindowHandle, App, Entity, Task};
|
use gpui::{AnyWindowHandle, App, Entity, Task};
|
||||||
use project::{ImageItem, image_store};
|
use project::{ImageItem, image_store};
|
||||||
|
@ -286,7 +287,7 @@ impl Tool for ReadFileTool {
|
||||||
Using the line numbers in this outline, you can call this tool again
|
Using the line numbers in this outline, you can call this tool again
|
||||||
while specifying the start_line and end_line fields to see the
|
while specifying the start_line and end_line fields to see the
|
||||||
implementations of symbols in the outline.
|
implementations of symbols in the outline.
|
||||||
|
|
||||||
Alternatively, you can fall back to the `grep` tool (if available)
|
Alternatively, you can fall back to the `grep` tool (if available)
|
||||||
to search the file for specific content."
|
to search the file for specific content."
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,10 @@ use crate::{
|
||||||
schema::json_schema_for,
|
schema::json_schema_for,
|
||||||
ui::{COLLAPSED_LINES, ToolOutputPreview},
|
ui::{COLLAPSED_LINES, ToolOutputPreview},
|
||||||
};
|
};
|
||||||
|
use action_log::ActionLog;
|
||||||
use agent_settings;
|
use agent_settings;
|
||||||
use anyhow::{Context as _, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolCard, ToolResult, ToolUseStatus};
|
use assistant_tool::{Tool, ToolCard, ToolResult, ToolUseStatus};
|
||||||
use futures::{FutureExt as _, future::Shared};
|
use futures::{FutureExt as _, future::Shared};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
Animation, AnimationExt, AnyWindowHandle, App, AppContext, Empty, Entity, EntityId, Task,
|
Animation, AnimationExt, AnyWindowHandle, App, AppContext, Empty, Entity, EntityId, Task,
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use assistant_tool::{ActionLog, Tool, ToolResult};
|
use assistant_tool::{Tool, ToolResult};
|
||||||
use gpui::{AnyWindowHandle, App, Entity, Task};
|
use gpui::{AnyWindowHandle, App, Entity, Task};
|
||||||
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
use language_model::{LanguageModel, LanguageModelRequest, LanguageModelToolSchemaFormat};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
|
|
|
@ -2,9 +2,10 @@ use std::{sync::Arc, time::Duration};
|
||||||
|
|
||||||
use crate::schema::json_schema_for;
|
use crate::schema::json_schema_for;
|
||||||
use crate::ui::ToolCallCardHeader;
|
use crate::ui::ToolCallCardHeader;
|
||||||
|
use action_log::ActionLog;
|
||||||
use anyhow::{Context as _, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use assistant_tool::{
|
use assistant_tool::{
|
||||||
ActionLog, Tool, ToolCard, ToolResult, ToolResultContent, ToolResultOutput, ToolUseStatus,
|
Tool, ToolCard, ToolResult, ToolResultContent, ToolResultOutput, ToolUseStatus,
|
||||||
};
|
};
|
||||||
use cloud_llm_client::{WebSearchResponse, WebSearchResult};
|
use cloud_llm_client::{WebSearchResponse, WebSearchResult};
|
||||||
use futures::{Future, FutureExt, TryFutureExt};
|
use futures::{Future, FutureExt, TryFutureExt};
|
||||||
|
|
|
@ -74,6 +74,7 @@ libc.workspace = true
|
||||||
minidumper.workspace = true
|
minidumper.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
action_log.workspace = true
|
||||||
assistant_tool.workspace = true
|
assistant_tool.workspace = true
|
||||||
assistant_tools.workspace = true
|
assistant_tools.workspace = true
|
||||||
client = { workspace = true, features = ["test-support"] }
|
client = { workspace = true, features = ["test-support"] }
|
||||||
|
|
|
@ -1724,7 +1724,7 @@ async fn test_remote_agent_fs_tool_calls(cx: &mut TestAppContext, server_cx: &mu
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let action_log = cx.new(|_| assistant_tool::ActionLog::new(project.clone()));
|
let action_log = cx.new(|_| action_log::ActionLog::new(project.clone()));
|
||||||
let model = Arc::new(FakeLanguageModel::default());
|
let model = Arc::new(FakeLanguageModel::default());
|
||||||
let request = Arc::new(LanguageModelRequest::default());
|
let request = Arc::new(LanguageModelRequest::default());
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
[package]
|
[package]
|
||||||
name = "workspace-hack"
|
name = "workspace-hack"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
|
||||||
description = "workspace-hack package, managed by hakari"
|
description = "workspace-hack package, managed by hakari"
|
||||||
publish = false
|
edition.workspace = true
|
||||||
|
publish.workspace = true
|
||||||
|
|
||||||
# The parts of the file between the BEGIN HAKARI SECTION and END HAKARI SECTION comments
|
# The parts of the file between the BEGIN HAKARI SECTION and END HAKARI SECTION comments
|
||||||
# are managed by hakari.
|
# are managed by hakari.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue