Skip to content

Commit 27d8baa

Browse files
reniowoodcopybara-github
authored andcommitted
ADK changes
PiperOrigin-RevId: 858328513
1 parent 96fa672 commit 27d8baa

File tree

4 files changed

+102
-0
lines changed

4 files changed

+102
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* @license
3+
* Copyright 2025 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import {Injectable} from '@angular/core';
19+
20+
import {Feedback, FeedbackService as FeedbackServiceInterface,} from './interfaces/feedback';
21+
22+
@Injectable({providedIn: 'root'})
23+
export class FeedbackService implements FeedbackServiceInterface {
24+
sendFeedback(
25+
sessionId: string,
26+
eventId: string,
27+
feedback: Feedback,
28+
): void {}
29+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license
3+
* Copyright 2025 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import {InjectionToken} from '@angular/core';
19+
20+
/**
21+
* Feedback metadata.
22+
*/
23+
export interface Feedback {
24+
direction: 'up'|'down';
25+
reasons?: string[];
26+
comment?: string;
27+
}
28+
29+
/**
30+
* Feedback service interface.
31+
*/
32+
export declare abstract class FeedbackService {
33+
abstract sendFeedback(
34+
sessionId: string,
35+
eventId: string,
36+
feedback: Feedback,
37+
): void;
38+
}
39+
40+
/**
41+
* Injection token for feedback service.
42+
*/
43+
export const FEEDBACK_SERVICE = new InjectionToken<FeedbackService>(
44+
'FeedbackService',
45+
);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* @license
3+
* Copyright 2025 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import {FeedbackService} from '../interfaces/feedback';
19+
20+
/**
21+
* Mock feedback service for testing.
22+
*/
23+
export class MockFeedbackService implements Partial<FeedbackService> {
24+
sendFeedback = jasmine.createSpy('sendFeedback');
25+
}

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ import {EventService} from './app/core/services/event.service';
4444
import {FeatureFlagService} from './app/core/services/feature-flag.service';
4545
import {GraphService} from './app/core/services/graph.service';
4646
import {AGENT_SERVICE} from './app/core/services/interfaces/agent';
47+
import {FeedbackService} from './app/core/services/feedback.service';
4748
import {AGENT_BUILDER_SERVICE} from './app/core/services/interfaces/agent-builder';
4849
import {ARTIFACT_SERVICE} from './app/core/services/interfaces/artifact';
4950
import {AUDIO_PLAYING_SERVICE} from './app/core/services/interfaces/audio-playing';
5051
import {AUDIO_RECORDING_SERVICE, AUDIO_WORKLET_MODULE_PATH} from './app/core/services/interfaces/audio-recording';
5152
import {DOWNLOAD_SERVICE} from './app/core/services/interfaces/download';
5253
import {EVAL_SERVICE} from './app/core/services/interfaces/eval';
5354
import {EVENT_SERVICE} from './app/core/services/interfaces/event';
55+
import {FEEDBACK_SERVICE} from './app/core/services/interfaces/feedback';
5456
import {FEATURE_FLAG_SERVICE} from './app/core/services/interfaces/feature-flag';
5557
import {GRAPH_SERVICE} from './app/core/services/interfaces/graph';
5658
import {LOCAL_FILE_SERVICE} from './app/core/services/interfaces/localfile';
@@ -90,6 +92,7 @@ fetch('./assets/config/runtime-config.json')
9092
MatInputModule, MatFormFieldModule, MatButtonModule),
9193
{provide: SESSION_SERVICE, useClass: SessionService},
9294
{provide: AGENT_SERVICE, useClass: AgentService},
95+
{provide: FEEDBACK_SERVICE, useClass: FeedbackService},
9396
{provide: WEBSOCKET_SERVICE, useClass: WebSocketService},
9497
{
9598
provide: AUDIO_WORKLET_MODULE_PATH,

0 commit comments

Comments
 (0)