feat: 优化 Agent 运行时与聊天设置体验

This commit is contained in:
qzl
2026-03-16 18:32:09 +08:00
parent 3f79cf0df7
commit 5a34616287
41 changed files with 2603 additions and 1263 deletions
@@ -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), '任务处理中');
});
});
}