feat: add chat and website updates

This commit is contained in:
Mohamed Boudra
2026-03-29 12:49:05 +07:00
parent 147482d6ed
commit 094864d779
26 changed files with 677 additions and 126 deletions
@@ -369,6 +369,7 @@ export type DeleteChatRoomOptions = {
export type PostChatMessageOptions = {
room: string;
body: string;
authorAgentId?: string;
replyToMessageId?: string | null;
requestId?: string;
};
@@ -2911,6 +2912,7 @@ export class DaemonClient {
type: "chat/post",
room: options.room,
body: options.body,
...(options.authorAgentId ? { authorAgentId: options.authorAgentId } : {}),
...(options.replyToMessageId ? { replyToMessageId: options.replyToMessageId } : {}),
},
responseType: "chat/post/response",
@@ -30,6 +30,7 @@ export const ChatPostRequestSchema = z.object({
requestId: z.string(),
room: z.string(),
body: z.string(),
authorAgentId: z.string().optional(),
replyToMessageId: z.string().optional(),
});
+3 -2
View File
@@ -7726,9 +7726,10 @@ export class Session {
request: Extract<SessionInboundMessage, { type: "chat/post" }>,
): Promise<void> {
try {
const authorAgentId = request.authorAgentId?.trim() || this.clientId;
const message = await this.chatService.postMessage({
room: request.room,
authorAgentId: this.clientId,
authorAgentId,
body: request.body,
replyToMessageId: request.replyToMessageId,
});
@@ -7742,7 +7743,7 @@ export class Session {
});
void notifyChatMentions({
room: request.room,
authorAgentId: this.clientId,
authorAgentId,
body: request.body,
mentionAgentIds: message.mentionAgentIds,
logger: this.sessionLogger,