@gonzih/cc-discord 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bot.js CHANGED
@@ -421,10 +421,11 @@ export class CcDiscordBot {
421
421
  const caption = msg.content.trim().replace(/<@!?\d+>/g, "").trim();
422
422
  const fullText = caption ? `${caption}\n\n${transcript}` : transcript;
423
423
  const voiceUsername = msg.member?.displayName ?? msg.author.username;
424
- const prompt = stampPrompt(fullText, voiceUsername, msg.createdAt);
425
424
  // Meta-agent routing
426
425
  const mappedNs = this.channelNamespaceMap.get(channelId);
427
426
  if (mappedNs && this.redis) {
427
+ const labeledText = `[voice note — transcription may contain typos]: ${fullText}`;
428
+ const prompt = stampPrompt(labeledText, voiceUsername, msg.createdAt);
428
429
  this.writeChatMessage("user", "discord", fullText, channelId, mappedNs.namespace);
429
430
  this.opts.registerRoutedChannelId?.(mappedNs.namespace, channelId);
430
431
  this.persistChannelMapping(channelId, mappedNs.namespace, mappedNs.repoUrl);
@@ -439,7 +440,7 @@ export class CcDiscordBot {
439
440
  }
440
441
  const session = this.getOrCreateSession(channelId, channel);
441
442
  session.currentPrompt = fullText;
442
- session.claude.sendPrompt(prompt);
443
+ session.claude.sendPrompt(stampPrompt(fullText, voiceUsername, msg.createdAt));
443
444
  this.startTyping(channelId, channel, session);
444
445
  this.writeChatMessage("user", "discord", fullText, channelId);
445
446
  }
package/dist/notifier.js CHANGED
@@ -203,9 +203,11 @@ export function startNotifier(bot, notifyChannelId, namespace, redis, handleUser
203
203
  const content = parsed.content;
204
204
  if (!content)
205
205
  return;
206
- // Only forward to Discord for explicitly routed namespaces.
207
- // Primary namespace (money-brain) chat output belongs to Telegram cc-tg handles that.
208
- const targetChannelId = routedChannelIds.get(ns);
206
+ // For the primary namespace: deliver to the primary Discord channel (DISCORD_NOTIFY_CHANNEL_ID
207
+ // or the last-active channel). Responses go to BOTH Telegram (via cc-tg) AND Discord.
208
+ // For other (routed) namespaces: only deliver to explicitly registered channelIds.
209
+ const targetChannelId = routedChannelIds.get(ns) ??
210
+ (ns === namespace ? (notifyChannelId ?? getActiveChannelId?.()) : undefined);
209
211
  if (targetChannelId == null) {
210
212
  log("warn", `meta-agent output: no channelId for namespace=${ns}, dropping line`);
211
213
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonzih/cc-discord",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Claude Code Discord bot — chat with Claude Code via Discord",
5
5
  "type": "module",
6
6
  "bin": {