feat(app): answer registered chat channels in chat
- chatChannels[].answer: wakeWord (default) or everything. Chat uses call.chatWakeWords (else the voice wake words) with the shared designated-people switches. - The brain's answer (reply via chat, not spoken) is posted as a Discord reply to the message, pinging nobody; failed or empty answers post nothing. Bots, channels with sending off and stops are not answered. - Chat runs beside the voice conversation and never takes its turn. - Core: send_chat_reply, chat_answer and the ReplyText event; the worker client's reply takes via. - Specs (conversation, discord core) and the roadmap updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,10 +56,12 @@ pub async fn start_services(data_dir: &Path) -> Result<Services, Box<dyn std::er
|
||||
});
|
||||
|
||||
let (calls, response) = (settings.call.clone(), settings.response.clone());
|
||||
let chat_calls = conversation::ChatCalls::from_settings(&settings);
|
||||
let (core, core_events) = DiscordCore::new(settings, token, worker.clone(), worker_events);
|
||||
// Call detection and the response policy answer what is heard; every event still reaches `events`.
|
||||
let (out, events) = mpsc::unbounded_channel();
|
||||
tokio::spawn(conversation::run(Conversation::new(core.clone(), calls, response), core_events, out));
|
||||
let conv = Conversation::new(core.clone(), calls, response).with_chat(chat_calls);
|
||||
tokio::spawn(conversation::run(conv, core_events, out));
|
||||
if let Err(e) = core.start().await {
|
||||
worker.close();
|
||||
worker_process.stop().await;
|
||||
|
||||
Reference in New Issue
Block a user