Skip to content

Commit 4236047

Browse files
google-genai-botcopybara-github
authored andcommitted
ADK changes
PiperOrigin-RevId: 840201177
1 parent f81a6c9 commit 4236047

File tree

8 files changed

+33
-1
lines changed

8 files changed

+33
-1
lines changed

src/app/components/chat/chat.component.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,16 @@
331331
></app-trace-event>
332332
</div>
333333
}
334+
@if (isDeveloperUiDisclaimerEnabledObs | async) {
335+
<div
336+
class="adk-web-developer-ui-disclaimer"
337+
[matTooltip]="i18n.disclosureTooltip"
338+
matTooltipPosition="left"
339+
style="align-self: flex-end"
340+
>
341+
{{i18n.adkWebDeveloperUiMessage}}
342+
</div>
343+
}
334344
</div>
335345
}
336346
</mat-drawer-container>

src/app/components/chat/chat.component.i18n.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ export const CHAT_MESSAGES = {
4545
cannotEditSessionMessage:
4646
'Chat is disabled to prevent changes to the end user\'s session.',
4747
readOnlyBadgeLabel: 'Read-only',
48+
disclosureTooltip:
49+
'ADK Web is for development purposes. It has access to all the data and should not be used in production.',
50+
adkWebDeveloperUiMessage: 'ADK Web Developer UI',
4851
};
4952

5053
/**

src/app/components/chat/chat.component.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,3 +735,10 @@ app-canvas {
735735
font-weight: 400;
736736
padding-left: unset;
737737
}
738+
739+
.adk-web-developer-ui-disclaimer {
740+
padding-left: 4px;
741+
padding-bottom: 4px;
742+
font-size: 10px;
743+
color: var(--adk-web-text-color-light-gray);
744+
}

src/app/components/chat/chat.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ export class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
289289
this.featureFlagService.isDeleteSessionEnabled();
290290
readonly isUserIdOnToolbarEnabledObs: Observable<boolean> =
291291
this.featureFlagService.isUserIdOnToolbarEnabled();
292+
readonly isDeveloperUiDisclaimerEnabledObs: Observable<boolean> =
293+
this.featureFlagService.isDeveloperUiDisclaimerEnabled();
292294

293295
// Trace detail
294296
bottomPanelVisible = false;

src/app/core/services/feature-flag.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ export class FeatureFlagService implements FeatureFlagServiceInterface {
119119
return of(true);
120120
}
121121

122+
isDeveloperUiDisclaimerEnabled(): Observable<boolean> {
123+
return of(true);
124+
}
125+
122126
isFeedbackServiceEnabled(): Observable<boolean> {
123127
return of(false);
124128
}

src/app/core/services/interfaces/feature-flag.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@ export declare abstract class FeatureFlagService {
5050
abstract isSessionFilteringEnabled(): Observable<boolean>;
5151
abstract isSessionReloadOnNewMessageEnabled(): Observable<boolean>;
5252
abstract isUserIdOnToolbarEnabled(): Observable<boolean>;
53+
abstract isDeveloperUiDisclaimerEnabled(): Observable<boolean>;
5354
abstract isFeedbackServiceEnabled(): Observable<boolean>;
5455
}

src/app/core/services/testing/mock-feature-flag.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ export class MockFeatureFlagService implements FeatureFlagService {
102102
isUserIdOnToolbarEnabled =
103103
jasmine.createSpy('isUserIdOnToolbarEnabled')
104104
.and.returnValue(this.isUserIdOnToolbarEnabledResponse);
105+
isDeveloperUiDisclaimerEnabledResponse = new ReplaySubject<boolean>(1);
106+
isDeveloperUiDisclaimerEnabled =
107+
jasmine.createSpy('isDeveloperUiDisclaimerEnabled')
108+
.and.returnValue(this.isDeveloperUiDisclaimerEnabledResponse);
105109
isFeedbackServiceEnabledResponse = new ReplaySubject<boolean>(1);
106110
isFeedbackServiceEnabled =
107111
jasmine.createSpy('isFeedbackServiceEnabled')

src/styles.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ html.dark-theme {
132132
// Expansion panel text color for dark theme
133133
--mat-expansion-container-text-color: #e8eaed;
134134
--mat-expansion-header-text-color: #e8eaed;
135+
--adk-web-text-color-light-gray: #c4c7c5;
135136
}
136137

137138
// Light theme custom properties
@@ -170,6 +171,7 @@ html.light-theme {
170171
// Expansion panel text color for light theme
171172
--mat-expansion-container-text-color: #202124;
172173
--mat-expansion-header-text-color: #202124;
174+
--adk-web-text-color-light-gray: #c4c7c5;
173175
}
174176

175177
// Dark theme dialog overrides
@@ -842,7 +844,6 @@ html.light-theme {
842844
// Tooltip styling to prevent overlap
843845
.mat-mdc-tooltip {
844846
z-index: 10000 !important;
845-
white-space: nowrap;
846847
max-width: 300px;
847848
}
848849

0 commit comments

Comments
 (0)