Refactor AI chat: streaming, tool calls, UI polish
All checks were successful
CI / check (pull_request) Successful in 3m25s

This commit is contained in:
2026-07-24 16:27:50 +08:00
parent e605586fc9
commit 8656394b9b
55 changed files with 2774 additions and 460 deletions

View File

@@ -1,18 +1,41 @@
import { Type } from 'class-transformer';
import { IsInt, IsNotEmpty, IsOptional, IsString, Max, MaxLength, Min } from 'class-validator';
import {
ArrayMaxSize,
IsArray,
IsIn,
IsInt,
IsNotEmpty,
IsOptional,
IsString,
IsUUID,
Max,
MaxLength,
Min,
} from 'class-validator';
export class CreateConversationDto {
@IsOptional()
@IsString()
@MaxLength(100)
title?: string;
@IsOptional()
@IsString()
@MaxLength(50)
lockedSkillKey?: string | null;
}
export class RenameConversationDto {
export class UpdateConversationDto {
@IsOptional()
@IsString()
@IsNotEmpty()
@MaxLength(100)
title: string;
title?: string;
@IsOptional()
@IsString()
@MaxLength(50)
lockedSkillKey?: string | null;
}
export class SendMessageDto {
@@ -20,6 +43,36 @@ export class SendMessageDto {
@IsNotEmpty()
@MaxLength(16000)
message: string;
@IsOptional()
@IsArray()
@ArrayMaxSize(5)
@IsInt({ each: true })
@Min(1, { each: true })
attachmentIds?: number[];
@IsOptional()
@IsString()
@MaxLength(50)
skillKey?: string | null;
@IsUUID()
clientRequestId: string;
}
export class RegenerateMessageDto {
@IsUUID()
clientRequestId: string;
}
export class MessageFeedbackDto {
@IsIn(['like', 'dislike', null])
feedback: 'like' | 'dislike' | null;
@IsOptional()
@IsString()
@MaxLength(500)
reason?: string;
}
export class MessagePageQueryDto {