feat(apps/chat): 新增 UI Schema 导航和路由导航工具

This commit is contained in:
zl-q
2026-03-19 00:51:57 +08:00
parent bfc3096199
commit 81cbc14219
8 changed files with 113 additions and 103 deletions
@@ -3,13 +3,6 @@ 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');
@@ -17,6 +10,13 @@ void main() {
expect(stageLabel(stage), '任务执行中');
});
test('maps protocol step memory to memory stage label', () {
final stage = stageFromStepName('memory');
expect(stage, AgentStage.memory);
expect(stageLabel(stage), '记忆提取中');
});
test('uses processing label when step is unknown', () {
final stage = stageFromStepName('unexpected');