Промты согласованы и установлены всем менеджерам: recap, Control todo (миграция 023, ControlWatcher), fallback на английском; tasks.md очищен
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { loadFragment, loadPrompt, type PromptSide } from "../agents/prompts.js"
|
||||
import { saveProblems } from "../agents/step2.js";
|
||||
import type { DriveSync } from "./drive.js";
|
||||
import type { SlackApi } from "./api.js";
|
||||
import { parseControlTodos, saveControlTodos } from "./control.js";
|
||||
import { applyRecapOutput, getRecapState, loadChannelDialog, parseReactions, recapBlock } from "./recap.js";
|
||||
import { saveChatTiming, type ChatTiming } from "./timing.js";
|
||||
import { normalizeVoice, speechText, type ReplyMode, type Tts } from "./tts.js";
|
||||
@@ -276,7 +277,7 @@ export async function handleManagerMessages(
|
||||
const listText = isCeo ? "" : await todayList(ctx, manager.personId, today);
|
||||
// проектный канал: диалог за сутки с временем (по Тампе) и накопленное для Daily Log
|
||||
const channelBlocks: string[] = [];
|
||||
const recapOn = !!proj && !!channel && live; // тихий режим и recap - только новая версия агента (промты proposed)
|
||||
const recapOn = !!proj && !!channel; // тихий режим и recap проектных каналов - у всех менеджеров (промты согласованы, approved = proposed)
|
||||
if (recapOn && proj && channel) {
|
||||
const dialogText = await loadChannelDialog(deps.slack, channel, now, deps.timezone);
|
||||
const st = await getRecapState(ctx.pool, channel);
|
||||
@@ -326,7 +327,7 @@ ${recapBlock(st, deps.timezone)}`);
|
||||
await saveChatTiming(ctx.pool, tm, ctx.log);
|
||||
ctx.log.error({ manager: manager.personId, err }, "шаг 4 не удался");
|
||||
await ctx.notifyIt(`:warning: khbuild_assistant_prep: шаг 4 (общение) для ${manager.name} не выполнен: ${err.slice(0, 500)}`);
|
||||
if (!deps.dryPublish && channel) await deps.slack.postMessage(channel, "Не смог обработать сообщение - уже сообщил ИТ-команде, скоро разберёмся.");
|
||||
if (!deps.dryPublish && channel) await deps.slack.postMessage(channel, "Sorry, I could not process your message. The IT team has been notified and will sort it out soon.");
|
||||
throw e;
|
||||
}
|
||||
|
||||
@@ -338,6 +339,9 @@ ${recapBlock(st, deps.timezone)}`);
|
||||
if (!deps.dryPublish && deps.slack.addReaction)
|
||||
for (const r of parseReactions(out.sections.get("реакции"))) await deps.slack.addReaction(channel, r.ts, r.emoji).catch((e) => ctx.log.warn({ err: String(e) }, "реакция не поставлена"));
|
||||
}
|
||||
// "Control:" todo: агент записал пары (todo исполнителя - парное todo контролёра) - дальше за ними следит ControlWatcher
|
||||
const controlPairs = parseControlTodos(out.sections.get("control todo"));
|
||||
if (controlPairs.length) await saveControlTodos(ctx.pool, manager.personId, controlPairs);
|
||||
const replyRaw = out.sections.get(replyKey)!;
|
||||
const reply = /^\(без ответа\)\.?$/i.test(replyRaw) ? null : replyRaw;
|
||||
let published = false;
|
||||
|
||||
Reference in New Issue
Block a user