Skip to content

Commit 650f8c9

Browse files
fix: update dashboard gif, chat enable/disable setting (#755)
* fix: update dashboard gif, chat enable/disable setting * use get_bool_or
1 parent 1dbf841 commit 650f8c9

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

crates/q_cli/src/cli/chat/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ use fig_api_client::model::{
4444
ToolResultStatus,
4545
};
4646
use fig_os_shim::Context;
47+
use fig_settings::Settings;
4748
use fig_util::CLI_BINARY_NAME;
4849
use input_source::InputSource;
4950
use parser::{
@@ -140,6 +141,7 @@ pub async fn chat(input: Option<String>, accept_all: bool) -> Result<ExitCode> {
140141

141142
let mut chat = ChatContext::new(
142143
ctx,
144+
Settings::new(),
143145
output,
144146
input,
145147
InputSource::new()?,
@@ -184,6 +186,7 @@ pub enum ChatError {
184186

185187
pub struct ChatContext<W: Write> {
186188
ctx: Arc<Context>,
189+
settings: Settings,
187190
/// The [Write] destination for printing conversation text.
188191
output: W,
189192
initial_input: Option<String>,
@@ -207,6 +210,7 @@ impl<W: Write> ChatContext<W> {
207210
#[allow(clippy::too_many_arguments)]
208211
pub fn new(
209212
ctx: Arc<Context>,
213+
settings: Settings,
210214
output: W,
211215
input: Option<String>,
212216
input_source: InputSource,
@@ -217,6 +221,7 @@ impl<W: Write> ChatContext<W> {
217221
) -> Result<Self> {
218222
Ok(Self {
219223
ctx,
224+
settings,
220225
output,
221226
initial_input: input,
222227
input_source,
@@ -293,7 +298,7 @@ where
293298
W: Write,
294299
{
295300
async fn try_chat(&mut self) -> Result<()> {
296-
if self.interactive {
301+
if self.interactive && self.settings.get_bool_or("chat.greeting.enabled", true) {
297302
execute!(self.output, style::Print(WELCOME_TEXT))?;
298303
}
299304

@@ -1123,6 +1128,7 @@ mod tests {
11231128

11241129
ChatContext::new(
11251130
Arc::clone(&ctx),
1131+
Settings::new_fake(),
11261132
std::io::stdout(),
11271133
None,
11281134
InputSource::new_mock(vec![
315 KB
Loading
-2.28 MB
Binary file not shown.

packages/dashboard-app/src/data/chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const chatSettings: PrefSection[] = [
1818

1919
export const intro: Intro = {
2020
title: "Chat",
21-
description: `Generative AI for your command line. Just run \`${CLI_BINARY_NAME} chat\`.`,
21+
description: `Agentic AI in your command line. Just run \`${CLI_BINARY_NAME} chat\`.`,
2222
link: CHAT_WIKI_URL,
2323
};
2424

packages/dashboard-app/src/pages/terminal/chat.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { UserPrefView } from "@/components/preference/list";
22
import { Terminal } from "@/components/ui/terminal";
33
import settings, { intro } from "@/data/chat";
4-
import chatWithContextDemo from "@assets/images/chat_with_context_demo.gif";
4+
import chatDemo from "@assets/images/chat_demo.gif";
55

66
export default function Page() {
77
return (
@@ -16,13 +16,13 @@ export default function Page() {
1616
</h2>
1717
<div className="flex flex-col gap-6 mt-4">
1818
<p className="font-light leading-tight">
19-
Amazon Q is a generative AI-powered assistant tailored for your
20-
command line. Ask Amazon Q a question, and receive an in-depth
21-
answer.
19+
Amazon Q is an agentic AI assistant capable of performing complex,
20+
multi-step actions on your behalf. Amazon Q can write files locally,
21+
query AWS resources, and execute bash commands for you.
2222
</p>
23-
<Terminal title="Passing Context">
23+
<Terminal title="Chat">
2424
<Terminal.Tab>
25-
<img src={chatWithContextDemo} alt="chat with context demo" />
25+
<img src={chatDemo} alt="chat with context demo" />
2626
</Terminal.Tab>
2727
</Terminal>
2828
</div>

0 commit comments

Comments
 (0)