feat: 优化 Agent 运行时与聊天设置体验
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:social_app/features/chat/presentation/bloc/agent_stage.dart';
|
||||
|
||||
void main() {
|
||||
group('agent stage mapping', () {
|
||||
test('maps protocol step router to intent stage label', () {
|
||||
final stage = stageFromStepName('router');
|
||||
|
||||
expect(stage, AgentStage.intent);
|
||||
expect(stageLabel(stage), '意图识别中');
|
||||
});
|
||||
|
||||
test('maps protocol step worker to execution stage label', () {
|
||||
final stage = stageFromStepName('worker');
|
||||
|
||||
expect(stage, AgentStage.execution);
|
||||
expect(stageLabel(stage), '任务执行中');
|
||||
});
|
||||
|
||||
test('uses processing label when step is unknown', () {
|
||||
final stage = stageFromStepName('unexpected');
|
||||
|
||||
expect(stage, isNull);
|
||||
expect(stageLabel(stage), '任务处理中');
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user