Make chat mentions inline

This commit is contained in:
Mohamed Boudra
2026-03-28 10:51:22 +07:00
parent 05a4e8f5a3
commit 7ca428677c
12 changed files with 123 additions and 45 deletions

View File

@@ -1,6 +1,6 @@
import { Command } from "commander";
import { withOutput } from "../../output/index.js";
import { addJsonAndDaemonHostOptions, collectMultiple } from "../../utils/command-options.js";
import { addJsonAndDaemonHostOptions } from "../../utils/command-options.js";
import { runCreateCommand } from "./create.js";
import { runLsCommand } from "./ls.js";
import { runInspectCommand } from "./inspect.js";
@@ -44,13 +44,7 @@ export function createChatCommand(): Command {
.description("Post a chat message")
.argument("<name-or-id>", "Room name or ID")
.argument("<message>", "Message body")
.option("--reply-to <msg-id>", "Reply to a specific message ID")
.option(
"--mention <agent-id>",
"Mention an agent ID (repeatable)",
collectMultiple,
[],
),
.option("--reply-to <msg-id>", "Reply to a specific message ID"),
).action(withOutput(runPostCommand));
addJsonAndDaemonHostOptions(

View File

@@ -9,7 +9,6 @@ import { chatMessageSchema, type ChatMessageRow, toChatMessageRow } from "./sche
export interface ChatPostOptions extends ChatCommandOptions {
replyTo?: string;
mention?: string[];
}
export async function runPostCommand(
@@ -24,7 +23,6 @@ export async function runPostCommand(
room,
body,
replyToMessageId: options.replyTo,
mentionAgentIds: options.mention ?? [],
});
return {
type: "single",