feat: keep typing during scheduled tasks and tell waiting users

A group-context scheduled task occupies the room queue, so a human message
sent meanwhile waited silently (up to the whole task run) with no typing
indicator; the room looked unresponsive.

- Scheduled tasks (not CI watchers) hold the room's typing indicator for
  their whole run (DiscordChannel.setTypingHold: typing stays on while any
  hold is active, independent of message-turn setTyping(false)).
- A human message that has to wait behind a running scheduled task gets a
  one-time notice per wait: "지금 예약 작업을 진행하고 있습니다. 이 작업을
  마친 뒤 바로 답변드리겠습니다." (GroupQueue.claimScheduledTaskWaitNotice,
  reset when the waiting messages run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-10-27 23:12:00 +09:00
parent fdfdd384bf
commit fdd98e9eb8
14 changed files with 323 additions and 1 deletions

View File

@@ -238,6 +238,8 @@ export async function processLoopGroupMessages(args: {
sendQueuedMessage: (chatJid: string, text: string) => boolean;
closeStdin: (reason: string) => void;
isRunningMessageTurn: (chatJid: string) => boolean;
/** Tells the room once that its message waits behind a running scheduled task. */
notifyScheduledTaskWait?: (chatJid: string) => Promise<void>;
roomStopControls: RoomStopControls;
labelPairedSenders: (chatJid: string, messages: NewMessage[]) => NewMessage[];
formatMessages: (messages: NewMessage[], timezone: string) => string;
@@ -313,6 +315,7 @@ export async function processLoopGroupMessages(args: {
},
'Queued human message for a fresh turn instead of piping into active agent',
);
await args.notifyScheduledTaskWait?.(chatJid);
return;
}