refactor(cli): purge short hose alias and standardize on hose-use across docs, scripts, and prompts

This commit is contained in:
gitea committed 2026-09-06 22:26:04 +08:00
1 parent 304a8c0d98
commit 2f8bcb90c9
31 files changed
+190 -191

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@ function renderItems(items: MessageItem[]): string {
export async function handleMessageCommand(parsed: CliParsedArgs, runtime: CliRuntime): Promise<CliResult> {
const corp = runtime.selectedCorp;
if (!corp) throw new Error("未指定或未找到有效企业。请运行 hose corps list 或指定 --corp=<id>");
if (!corp) throw new Error("未指定或未找到有效企业。请运行 hose-use corps list 或指定 --corp=<id>");
const action = parsed.action || parsed.args[0] || "list";
const client = await createEkbClient(corp);
const corpId = corp.corpId || corp.id;
@@ -37,7 +37,7 @@ export async function handleMessageCommand(parsed: CliParsedArgs, runtime: CliRu
if (action === "read" || action === "mark-read") {
const messageId = parsed.args[0] || stringOption(parsed.options, ["id", "message-id"]);
if (!messageId) return { stdout: "", stderr: "用法: hose message read <messageId>\n", exitCode: 1 };
if (!messageId) return { stdout: "", stderr: "用法: hose-use message read <messageId>\n", exitCode: 1 };
await readMessage(client, corpId, messageId);
if (runtime.jsonMode) return { stdout: printJson({ corpId, id: messageId, read: true }, runtime.outputOptions), stderr: "", exitCode: 0 };
return { stdout: `已标记消息为已读: ${messageId}\n`, stderr: "", exitCode: 0 };