feat(M4-013,M5-001,M5-002,M5-003): routing e2e tests, agent config loading, model+agent switching (#323)
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #323.
This commit is contained in:
@@ -40,6 +40,7 @@ const mockRedis = {
|
||||
del: vi.fn(),
|
||||
};
|
||||
|
||||
// Mock agent config returned by brain.agents.findByName for "my-agent-id"
|
||||
const mockAgentConfig = {
|
||||
id: 'my-agent-id',
|
||||
name: 'my-agent-id',
|
||||
@@ -67,6 +68,10 @@ const mockBrain = {
|
||||
},
|
||||
};
|
||||
|
||||
const mockChatGateway = {
|
||||
broadcastSessionInfo: vi.fn(),
|
||||
};
|
||||
|
||||
function buildService(): CommandExecutorService {
|
||||
return new CommandExecutorService(
|
||||
mockRegistry as never,
|
||||
@@ -76,7 +81,7 @@ function buildService(): CommandExecutorService {
|
||||
mockRedis as never,
|
||||
mockBrain as never,
|
||||
null,
|
||||
null,
|
||||
mockChatGateway as never,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { forwardRef, Inject, Injectable, Logger, Optional } from '@nestjs/common';
|
||||
import type { QueueHandle } from '@mosaic/queue';
|
||||
import type { SlashCommandPayload, SlashCommandResultPayload } from '@mosaic/types';
|
||||
import type { Brain } from '@mosaic/brain';
|
||||
import type { SlashCommandPayload, SlashCommandResultPayload } from '@mosaic/types';
|
||||
import { AgentService } from '../agent/agent.service.js';
|
||||
import { ChatGateway } from '../chat/chat.gateway.js';
|
||||
import { SessionGCService } from '../gc/session-gc.service.js';
|
||||
import { SystemOverrideService } from '../preferences/system-override.service.js';
|
||||
import { ReloadService } from '../reload/reload.service.js';
|
||||
import { BRAIN } from '../brain/brain.tokens.js';
|
||||
import { COMMANDS_REDIS } from './commands.tokens.js';
|
||||
import { CommandRegistryService } from './command-registry.service.js';
|
||||
import { BRAIN } from '../brain/brain.tokens.js';
|
||||
|
||||
@Injectable()
|
||||
export class CommandExecutorService {
|
||||
|
||||
Reference in New Issue
Block a user