Skip to content

Commit 061ba89

Browse files
authored
Retire genUI configuration. (#586)
1 parent bdbe4e2 commit 061ba89

24 files changed

+29
-141
lines changed

packages/genui/lib/genui.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ library;
1212
export 'src/catalog/core_catalog.dart';
1313
export 'src/content_generator.dart';
1414
export 'src/conversation/gen_ui_conversation.dart';
15-
export 'src/core/genui_configuration.dart';
1615
export 'src/core/genui_manager.dart';
1716
export 'src/core/genui_surface.dart';
1817
export 'src/core/prompt_fragments.dart';

packages/genui/lib/src/core/genui_configuration.dart

Lines changed: 0 additions & 39 deletions
This file was deleted.

packages/genui/lib/src/core/genui_manager.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import '../model/chat_message.dart';
1313
import '../model/data_model.dart';
1414
import '../model/ui_models.dart';
1515
import '../primitives/logging.dart';
16-
import 'genui_configuration.dart';
1716

1817
/// A sealed class representing an update to the UI managed by [GenUiManager].
1918
///
@@ -86,12 +85,7 @@ abstract interface class GenUiHost {
8685
/// of `GenUiUpdate` events so that the application can react to changes.
8786
class GenUiManager implements GenUiHost {
8887
/// Creates a new [GenUiManager] with a list of supported widget catalogs.
89-
GenUiManager({
90-
required this.catalogs,
91-
this.configuration = const GenUiConfiguration(),
92-
});
93-
94-
final GenUiConfiguration configuration;
88+
GenUiManager({required this.catalogs});
9589

9690
@override
9791
final Iterable<Catalog> catalogs;

packages/genui/lib/src/core/ui_tools.dart

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,23 @@ import '../model/catalog.dart';
1010
import '../model/tools.dart';
1111
import '../model/ui_models.dart';
1212
import '../primitives/simple_items.dart';
13-
import 'genui_configuration.dart';
1413

1514
/// An [AiTool] for adding or updating a UI surface.
1615
///
1716
/// This tool allows the AI to create a new UI surface or update an existing
1817
/// one with a new definition.
1918
class SurfaceUpdateTool extends AiTool<JsonMap> {
2019
/// Creates an [SurfaceUpdateTool].
21-
SurfaceUpdateTool({
22-
required this.handleMessage,
23-
required Catalog catalog,
24-
required this.configuration,
25-
}) : super(
26-
name: 'surfaceUpdate',
27-
description: 'Updates a surface with a new set of components.',
28-
parameters: A2uiSchemas.surfaceUpdateSchema(catalog),
29-
);
20+
SurfaceUpdateTool({required this.handleMessage, required Catalog catalog})
21+
: super(
22+
name: 'surfaceUpdate',
23+
description: 'Updates a surface with a new set of components.',
24+
parameters: A2uiSchemas.surfaceUpdateSchema(catalog),
25+
);
3026

3127
/// The callback to invoke when adding or updating a surface.
3228
final void Function(A2uiMessage message) handleMessage;
3329

34-
/// The configuration of the Gen UI system.
35-
final GenUiConfiguration configuration;
36-
3730
@override
3831
Future<JsonMap> invoke(JsonMap args) async {
3932
final surfaceId = args[surfaceIdKey] as String;

packages/genui/test/catalog/core_widgets/button_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ void main() {
1818
CoreCatalogItems.text,
1919
], catalogId: 'test_catalog'),
2020
],
21-
configuration: const GenUiConfiguration(),
2221
);
2322
manager.onSubmit.listen((event) => message = event);
2423
const surfaceId = 'testSurface';

packages/genui/test/catalog/core_widgets/card_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ void main() {
1515
CoreCatalogItems.text,
1616
], catalogId: 'test_catalog'),
1717
],
18-
configuration: const GenUiConfiguration(),
1918
);
2019
const surfaceId = 'testSurface';
2120
final components = [

packages/genui/test/catalog/core_widgets/check_box_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ void main() {
1414
catalogs: [
1515
Catalog([CoreCatalogItems.checkBox], catalogId: 'test_catalog'),
1616
],
17-
configuration: const GenUiConfiguration(),
1817
);
1918
const surfaceId = 'testSurface';
2019
final components = [

packages/genui/test/catalog/core_widgets/column_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ void main() {
1515
CoreCatalogItems.text,
1616
], catalogId: 'test_catalog'),
1717
],
18-
configuration: const GenUiConfiguration(),
1918
);
2019
const surfaceId = 'testSurface';
2120
final components = [
@@ -79,7 +78,6 @@ void main() {
7978
CoreCatalogItems.text,
8079
], catalogId: 'test_catalog'),
8180
],
82-
configuration: const GenUiConfiguration(),
8381
);
8482
const surfaceId = 'testSurface';
8583
final components = [

packages/genui/test/catalog/core_widgets/date_time_input_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ void main() {
1717
CoreCatalogItems.text,
1818
], catalogId: 'test_catalog'),
1919
],
20-
configuration: const GenUiConfiguration(),
2120
);
2221
const surfaceId = 'testSurface';
2322
final components = [

packages/genui/test/catalog/core_widgets/divider_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ void main() {
1212
catalogs: [
1313
Catalog([CoreCatalogItems.divider], catalogId: 'test_catalog'),
1414
],
15-
configuration: const GenUiConfiguration(),
1615
);
1716
const surfaceId = 'testSurface';
1817
final components = [

0 commit comments

Comments
 (0)