Skip to content

Commit 97b1f27

Browse files
committed
feat: add enableDebug flag
1 parent e31c854 commit 97b1f27

File tree

1 file changed

+5
-3
lines changed
  • packages/agent-webapp/src/components

1 file changed

+5
-3
lines changed

packages/agent-webapp/src/components/chat.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ export type ChatComponentState = {
1818
};
1919

2020
export type ChatComponentOptions = ChatRequestOptions & {
21-
enablePromptSuggestions: boolean;
22-
promptSuggestions: string[];
2321
apiUrl?: string;
22+
promptSuggestions: string[];
23+
enablePromptSuggestions: boolean;
2424
enableMarkdown?: boolean;
25+
enableDebug?: boolean;
2526
strings: {
2627
promptSuggestionsTitle: string;
2728
citationsTitle: string;
@@ -41,6 +42,7 @@ export const chatDefaultOptions: ChatComponentOptions = {
4142
apiUrl: '',
4243
enablePromptSuggestions: true,
4344
enableMarkdown: true,
45+
enableDebug: true,
4446
promptSuggestions: [
4547
'What burgers do you have on the menu?',
4648
'What toppings are available?',
@@ -253,7 +255,7 @@ export class ChatComponent extends LitElement {
253255
<div class="message ${message.role} animation">
254256
${message.role === 'assistant' ? html`<slot name="message-header"></slot>` : nothing}
255257
<div class="message-body">
256-
${message.role === 'assistant'
258+
${message.role === 'assistant' && this.options.enableDebug
257259
? html`<azc-debug .message=${message}></azc-debug>`
258260
: nothing}
259261
${!message.content ? html`<slot name="loader"><div class="loader-animation"></div></slot>` : nothing}

0 commit comments

Comments
 (0)