mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
cargo fmt
This commit is contained in:
@@ -497,7 +497,6 @@ pub async fn build_session(session_config: SessionBuilderConfig) -> CliSession {
|
||||
process::exit(1);
|
||||
});
|
||||
|
||||
|
||||
if session_config.resume {
|
||||
let session = agent
|
||||
.config
|
||||
|
||||
@@ -116,7 +116,10 @@ impl FinalOutputTool {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn execute_tool_call(&mut self, tool_call: CallToolRequestParams) -> DeferredToolCall {
|
||||
pub async fn execute_tool_call(
|
||||
&mut self,
|
||||
tool_call: CallToolRequestParams,
|
||||
) -> DeferredToolCall {
|
||||
match tool_call.name.to_string().as_str() {
|
||||
FINAL_OUTPUT_TOOL_NAME => {
|
||||
let result = self.validate_json_output(&tool_call.arguments.into()).await;
|
||||
|
||||
@@ -67,7 +67,9 @@ pub trait McpClientTrait: Send + Sync {
|
||||
arguments: Option<JsonObject>,
|
||||
cancel_token: CancellationToken,
|
||||
) -> Result<DeferredToolCall, Error> {
|
||||
let result = self.call_tool(session_id, name, arguments, cancel_token).await;
|
||||
let result = self
|
||||
.call_tool(session_id, name, arguments, cancel_token)
|
||||
.await;
|
||||
Ok(DeferredToolCall {
|
||||
result: Box::new(futures::future::ready(result.map_err(|e| match e {
|
||||
ServiceError::McpError(error_data) => error_data,
|
||||
|
||||
Reference in New Issue
Block a user