You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<em>hooks</em> <black!>View and manage context hooks</black!>
264
267
<em>/usage</em> <black!>Show current session's context window usage</black!>
265
268
269
+
<cyan,em>MCP:</cyan,em>
270
+
<black!>You can now configure the Amazon Q CLI to use MCP servers. \nLearn how: https://docs.aws.amazon.com/en_us/amazonq/latest/qdeveloper-ug/command-line-mcp.html</black!>
271
+
266
272
<cyan,em>Tips:</cyan,em>
267
273
<em>!{command}</em> <black!>Quickly execute a command in your current session</black!>
268
274
<em>Ctrl(^) + j</em> <black!>Insert new-line to provide multi-line prompt. Alternatively, [Alt(⌥) + Enter(⏎)]</black!>
constRESPONSE_TIMEOUT_CONTENT:&str = "Response timed out - message took too long to generate";
275
281
constTRUST_ALL_TEXT:&str = color_print::cstr! {"<green!>All tools are now trusted (<red!>!</red!>). Amazon Q will execute tools <bold>without</bold> asking for confirmation.\
276
-
\nAgents can sometimes do unexpected things so understand the risks.</green!>"};
282
+
\nAgents can sometimes do unexpected things so understand the risks.</green!>
283
+
\nLearn more at https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-chat-security.html#command-line-chat-trustall-safety"};
277
284
278
285
constTOOL_BULLET:&str = " ● ";
279
286
constCONTINUATION_LINE:&str = " ⋮ ";
@@ -337,10 +344,21 @@ pub async fn chat(
337
344
_ => StreamingClient::new().await?,
338
345
};
339
346
340
-
let mcp_server_configs = McpServerConfig::load_config(&mut output).await.unwrap_or_else(|e| {
341
-
warn!("No mcp server config loaded: {}", e);
342
-
McpServerConfig::default()
343
-
});
347
+
let mcp_server_configs = matchMcpServerConfig::load_config(&mut output).await{
348
+
Ok(config) => {
349
+
execute!(
350
+
output,
351
+
style::Print(
352
+
"To learn more about MCP safety, see https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-security.html\n"
353
+
)
354
+
)?;
355
+
config
356
+
},
357
+
Err(e) => {
358
+
warn!("No mcp server config loaded: {}", e);
359
+
McpServerConfig::default()
360
+
},
361
+
};
344
362
345
363
// If profile is specified, verify it exists before starting the chat
346
364
ifletSome(ref profile_name) = profile {
@@ -3002,14 +3020,8 @@ impl ChatContext {
3002
3020
}
3003
3021
3004
3022
// Set spinner after showing all of the assistant text content so far.
0 commit comments