fix: remove dead code, fix naming inconsistency, document migration
- Remove unused AGENT_CHAT_RETRY_EVENT_NAME constant (dead code) - Rename agentStreamingService to agentChatStreamingService for consistency - Add comment explaining why migration down() deletes queued messages https://claude.ai/code/session_01NGv3c62sYGMww7iuVsWzcJ
This commit is contained in:
@@ -1 +0,0 @@
|
||||
export const AGENT_CHAT_RETRY_EVENT_NAME = 'agent-chat-retry' as const;
|
||||
+2
@@ -25,6 +25,8 @@ export class AddStatusToAgentMessage1774776000000
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."agentMessage" DROP COLUMN "processedAt"`,
|
||||
);
|
||||
// Queued messages have turnId=NULL. They must be deleted before
|
||||
// restoring the NOT NULL constraint on turnId.
|
||||
await queryRunner.query(
|
||||
`DELETE FROM "core"."agentMessage" WHERE "turnId" IS NULL`,
|
||||
);
|
||||
|
||||
+2
-2
@@ -52,7 +52,7 @@ import { AiModelRegistryService } from 'src/engine/metadata-modules/ai/ai-models
|
||||
)
|
||||
export class AgentChatController {
|
||||
constructor(
|
||||
private readonly agentStreamingService: AgentChatStreamingService,
|
||||
private readonly agentChatStreamingService: AgentChatStreamingService,
|
||||
private readonly agentChatService: AgentChatService,
|
||||
private readonly eventPublisherService: AgentChatEventPublisherService,
|
||||
private readonly billingService: BillingService,
|
||||
@@ -132,7 +132,7 @@ export class AgentChatController {
|
||||
return { messageId: message.id, queued: true };
|
||||
}
|
||||
|
||||
const result = await this.agentStreamingService.streamAgentChat({
|
||||
const result = await this.agentChatStreamingService.streamAgentChat({
|
||||
threadId,
|
||||
browsingContext: body.browsingContext ?? null,
|
||||
modelId: body.modelId,
|
||||
|
||||
Reference in New Issue
Block a user