feat: 重构 memory 系统,支持 user memory 和 work memory 分离
This commit is contained in:
@@ -45,7 +45,7 @@ void main() {
|
||||
expect(result.toolCallId, 'call_1');
|
||||
expect(result.toolName, 'calendar_read');
|
||||
expect(result.resultSummary, '找到 2 条结果');
|
||||
expect(result.uiSchema, isNull);
|
||||
expect(result.status, 'success');
|
||||
});
|
||||
|
||||
test('parses history snapshot with ui_schema', () {
|
||||
|
||||
@@ -44,6 +44,11 @@ class _FakeApiClient implements IApiClient {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response<T>> put<T>(String path, {data, Options? options}) {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response<T>> post<T>(String path, {data, Options? options}) async {
|
||||
final runIdFactory = this.runIdFactory;
|
||||
|
||||
@@ -33,6 +33,11 @@ class _NoopApiClient implements IApiClient {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response<T>> put<T>(String path, {data, Options? options}) {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response<T>> post<T>(String path, {data, Options? options}) {
|
||||
throw UnimplementedError();
|
||||
@@ -152,7 +157,6 @@ void main() {
|
||||
toolName: 'ocr_image',
|
||||
resultSummary: 'done',
|
||||
status: 'success',
|
||||
uiSchema: null,
|
||||
),
|
||||
);
|
||||
toolItem = bloc.state.items.last as ToolCallItem;
|
||||
|
||||
@@ -83,6 +83,11 @@ class _TestApiClient implements IApiClient {
|
||||
return Response<T>(requestOptions: RequestOptions(path: path));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response<T>> put<T>(String path, {data, Options? options}) async {
|
||||
return Response<T>(requestOptions: RequestOptions(path: path));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response<T>> post<T>(String path, {data, Options? options}) async {
|
||||
return Response<T>(requestOptions: RequestOptions(path: path));
|
||||
|
||||
@@ -41,6 +41,11 @@ class _TestApiClient implements IApiClient {
|
||||
Future<Response<T>> post<T>(String path, {data, Options? options}) async {
|
||||
return Response<T>(requestOptions: RequestOptions(path: path));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Response<T>> put<T>(String path, {data, Options? options}) async {
|
||||
return Response<T>(requestOptions: RequestOptions(path: path));
|
||||
}
|
||||
}
|
||||
|
||||
class _FakeUsersApi extends UsersApi {
|
||||
|
||||
Reference in New Issue
Block a user