- 引入AgentTeamOrchestrator支持多agent协同任务执行 - 增加第三方swarms库依赖并配置git协议替换以改善包管理 - 扩展DelegationManager支持团队任务调度和进度跟踪 - 实现中文bigram分词算法提升中文任务检索准确性 - 调整A2AClient和DelegationManager超时时间从30秒增至600秒 - 优化AgentRunResult状态判断逻辑增加有意义摘要检测 - 修改Dockerfile配置npm仓库镜像地址和git协议映射 - 更新CLI命令行接口支持网关端口配置传递 - 调整提供者超时配置机制增强请求稳定性 - 移除过时的support_group字段简化agent描述符结构 - 增强错误处理和进度事件报告机制改进用户体验
53 lines
1.3 KiB
TypeScript
53 lines
1.3 KiB
TypeScript
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
|
|
import { useChatStore } from '@/lib/store';
|
|
|
|
describe('chat store process event ingestion', () => {
|
|
beforeEach(() => {
|
|
useChatStore.setState({
|
|
sessionId: 'web:alpha',
|
|
processRuns: [],
|
|
processEvents: [],
|
|
processArtifacts: [],
|
|
selectedRunId: null,
|
|
selectedArtifactId: null,
|
|
lastCancelAck: null,
|
|
});
|
|
});
|
|
|
|
afterEach(() => {
|
|
useChatStore.setState({
|
|
sessionId: 'web:default',
|
|
processRuns: [],
|
|
processEvents: [],
|
|
processArtifacts: [],
|
|
selectedRunId: null,
|
|
selectedArtifactId: null,
|
|
lastCancelAck: null,
|
|
});
|
|
});
|
|
|
|
it('assigns session_id when the first observed event is progress', () => {
|
|
useChatStore.getState().ingestProcessEvent({
|
|
type: 'process_run_progress',
|
|
session_id: 'web:alpha',
|
|
run_id: 'run-progress-only',
|
|
parent_run_id: null,
|
|
actor_type: 'agent',
|
|
actor_id: 'agent-a',
|
|
actor_name: 'Agent A',
|
|
text: 'still working',
|
|
created_at: '2026-03-24T11:20:00.000Z',
|
|
});
|
|
|
|
expect(useChatStore.getState().processRuns).toEqual([
|
|
expect.objectContaining({
|
|
run_id: 'run-progress-only',
|
|
session_id: 'web:alpha',
|
|
status: 'running',
|
|
title: 'Agent A',
|
|
}),
|
|
]);
|
|
});
|
|
});
|