refactor: 统一项目名称从OpenFang到ZCLAW
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
重构所有代码和文档中的项目名称,将OpenFang统一更新为ZCLAW。包括: - 配置文件中的项目名称 - 代码注释和文档引用 - 环境变量和路径 - 类型定义和接口名称 - 测试用例和模拟数据 同时优化部分代码结构,移除未使用的模块,并更新相关依赖项。
This commit is contained in:
@@ -572,40 +572,6 @@ describe('chatStore', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('dispatchSwarmTask', () => {
|
||||
it('should return task id on success', async () => {
|
||||
const { dispatchSwarmTask } = useChatStore.getState();
|
||||
|
||||
const result = await dispatchSwarmTask('Test task');
|
||||
|
||||
expect(result).toBe('task-1');
|
||||
});
|
||||
|
||||
it('should add swarm result message', async () => {
|
||||
const { dispatchSwarmTask } = useChatStore.getState();
|
||||
|
||||
await dispatchSwarmTask('Test task');
|
||||
|
||||
const state = useChatStore.getState();
|
||||
const swarmMsg = state.messages.find(m => m.role === 'assistant');
|
||||
expect(swarmMsg).toBeDefined();
|
||||
});
|
||||
|
||||
it('should return null on failure', async () => {
|
||||
const { dispatchSwarmTask } = useChatStore.getState();
|
||||
|
||||
// Mock the agent-swarm module to throw
|
||||
vi.doMock('../../src/lib/agent-swarm', () => ({
|
||||
getAgentSwarm: vi.fn(() => {
|
||||
throw new Error('Swarm error');
|
||||
}),
|
||||
}));
|
||||
|
||||
// Since we can't easily re-mock, just verify the function exists
|
||||
expect(typeof dispatchSwarmTask).toBe('function');
|
||||
});
|
||||
});
|
||||
|
||||
describe('message types', () => {
|
||||
it('should handle tool message', () => {
|
||||
const { addMessage } = useChatStore.getState();
|
||||
|
||||
Reference in New Issue
Block a user