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
before_long_help = "Use context hooks to specify shell commands to run. The output from these
392
-
commands will be appended to the prompt to Amazon Q.
393
-
394
-
Refer to the documentation for how to configure hooks with your agent: https://github.com/aws/amazon-q-developer-cli/blob/main/docs/agent-format.md#hooks-field
395
-
396
-
Notes:
397
-
• Hooks are executed in parallel
398
-
• 'conversation_start' hooks run on the first user prompt and are attached once to the conversation history sent to Amazon Q
399
-
• 'per_prompt' hooks run on each user prompt and are attached to the prompt, but are not stored in conversation history"
392
+
before_long_help = hooks_long_help()
400
393
)]
401
394
/// Arguments for the hooks command that displays configured context hooks
/// Command-line arguments for managing tools in the chat session
@@ -197,10 +198,7 @@ impl ToolsArgs {
197
198
#[deny(missing_docs)]
198
199
#[derive(Debug,PartialEq,Subcommand)]
199
200
#[command(
200
-
before_long_help = "By default, Amazon Q will ask for your permission to use certain tools. You can control which tools you
201
-
trust so that no confirmation is required.
202
-
203
-
Refer to the documentation for how to configure tools with your agent: https://github.com/aws/amazon-q-developer-cli/blob/main/docs/agent-format.md#tools-field"
201
+
before_long_help = tools_long_help()
204
202
)]
205
203
/// Subcommands for managing tool permissions and configurations
@@ -161,6 +169,11 @@ use crate::cli::experiment::experiment_manager::{
161
169
ExperimentManager,
162
170
ExperimentName,
163
171
};
172
+
usecrate::constants::{
173
+
error_messages,
174
+
tips,
175
+
ui_text,
176
+
};
164
177
usecrate::database::settings::Setting;
165
178
usecrate::os::Os;
166
179
usecrate::telemetry::core::{
@@ -183,29 +196,6 @@ use crate::util::{
183
196
ui,
184
197
};
185
198
186
-
constLIMIT_REACHED_TEXT:&str = color_print::cstr! {"You've used all your free requests for this month. You have two options:
187
-
1. Upgrade to a paid subscription for increased limits. See our Pricing page for what's included> <blue!>https://aws.amazon.com/q/developer/pricing/</blue!>
188
-
2. Wait until next month when your limit automatically resets."};
189
-
190
-
pubconstEXTRA_HELP:&str = color_print::cstr! {"
191
-
<cyan,em>MCP:</cyan,em>
192
-
<black!>You can now configure the Amazon Q CLI to use MCP servers. \nLearn how: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/qdev-mcp.html</black!>
193
-
194
-
<cyan,em>Tips:</cyan,em>
195
-
<em>!{command}</em> <black!>Quickly execute a command in your current session</black!>
196
-
<em>Ctrl(^) + j</em> <black!>Insert new-line to provide multi-line prompt</black!>
Just run <green!>q settings chat.enableNotifications true</green!>"},
477
-
color_print::cstr! {"You can use
478
-
<green!>/editor</green!> to edit your prompt with a vim-like experience"},
479
-
color_print::cstr! {"<green!>/usage</green!> shows you a visual breakdown of your current context window usage"},
480
-
color_print::cstr! {"Get notified whenever Q CLI finishes responding. Just run <green!>q settings
481
-
chat.enableNotifications true</green!>"},
482
-
color_print::cstr! {"You can execute bash commands by typing
483
-
<green!>!</green!> followed by the command"},
484
-
color_print::cstr! {"Q can use tools without asking for
485
-
confirmation every time. Give <green!>/tools trust</green!> a try"},
486
-
color_print::cstr! {"You can
487
-
programmatically inject context to your prompts by using hooks. Check out <green!>/context hooks
488
-
help</green!>"},
489
-
color_print::cstr! {"You can use <green!>/compact</green!> to replace the conversation
490
-
history with its summary to free up the context space"},
491
-
color_print::cstr! {"If you want to file an issue
492
-
to the Q CLI team, just tell me, or run <green!>q issue</green!>"},
493
-
color_print::cstr! {"You can enable
494
-
custom tools with <green!>MCP servers</green!>. Learn more with /help"},
495
-
color_print::cstr! {"You can
496
-
specify wait time (in ms) for mcp server loading with <green!>q settings mcp.initTimeout {timeout in
497
-
int}</green!>. Servers that takes longer than the specified time will continue to load in the background. Use
498
-
/tools to see pending servers."},
499
-
color_print::cstr! {"You can see the server load status as well as any
500
-
warnings or errors associated with <green!>/mcp</green!>"},
501
-
color_print::cstr! {"Use <green!>/model</green!> to select the model to use for this conversation"},
502
-
color_print::cstr! {"Set a default model by running <green!>q settings chat.defaultModel MODEL</green!>. Run <green!>/model</green!> to learn more."},
503
-
color_print::cstr! {"Run <green!>/prompts</green!> to learn how to build & run repeatable workflows"},
504
-
color_print::cstr! {"Use <green!>/tangent</green!> or <green!>ctrl + t</green!> (customizable) to start isolated conversations ( ↯ ) that don't affect your main chat history"},
505
-
color_print::cstr! {"Ask me directly about my capabilities! Try questions like <green!>\"What can you do?\"</green!> or <green!>\"Can you save conversations?\"</green!>"},
506
-
color_print::cstr! {"Stay up to date with the latest features and improvements! Use <green!>/changelog</green!> to see what's new in Amazon Q CLI"},
507
-
color_print::cstr! {"Enable workspace checkpoints to snapshot & restore changes. Just run <green!>q</green!> <green!>settings chat.enableCheckpoint true</green!>"},
constPOPULAR_SHORTCUTS:&str = color_print::cstr! {"<black!><green!>/help</green!> all commands <em>•</em> <green!>ctrl + j</green!> new lines <em>•</em> <green!>ctrl + s</green!> fuzzy search</black!>"};
513
-
constSMALL_SCREEN_POPULAR_SHORTCUTS:&str = color_print::cstr! {"<black!><green!>/help</green!> all commands
514
-
<green!>ctrl + j</green!> new lines
515
-
<green!>ctrl + s</green!> fuzzy search
516
-
</black!>"};
517
-
518
454
constRESPONSE_TIMEOUT_CONTENT:&str = "Response timed out - message took too long to generate";
519
-
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.\
520
-
\nAgents can sometimes do unexpected things so understand the risks.</green!>
521
-
\nLearn more at https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-chat-security.html#command-line-chat-trustall-safety"};
0 commit comments