feat(mom): reduce tool verbosity in main Slack messages

- During execution: show tool labels, thinking, and text in main message
- After completion: replace main message with only final assistant text
- Post thinking (italic) and text to thread for full audit trail
- Add promise queue to ensure ctx.respond calls execute sequentially
- Add log.logThinking() and log.logResponse() for console output
- Get final text from agent.state.messages instead of tracking

Closes #65
This commit is contained in:
Mario Zechner 2025-11-27 14:07:21 +01:00
parent 318254bff4
commit effb4d0b7c
2 changed files with 75 additions and 14 deletions

View file

@ -118,10 +118,24 @@ export function logResponseStart(ctx: LogContext): void {
console.log(chalk.yellow(`${timestamp()} ${formatContext(ctx)} → Streaming response...`));
}
export function logResponseComplete(ctx: LogContext, charCount: number): void {
console.log(
chalk.yellow(`${timestamp()} ${formatContext(ctx)} ✓ Response sent (${charCount.toLocaleString()} chars)`),
);
export function logThinking(ctx: LogContext, thinking: string): void {
console.log(chalk.yellow(`${timestamp()} ${formatContext(ctx)} 💭 Thinking`));
const truncated = truncate(thinking, 1000);
const indented = truncated
.split("\n")
.map((line) => ` ${line}`)
.join("\n");
console.log(chalk.dim(indented));
}
export function logResponse(ctx: LogContext, text: string): void {
console.log(chalk.yellow(`${timestamp()} ${formatContext(ctx)} 💬 Response`));
const truncated = truncate(text, 1000);
const indented = truncated
.split("\n")
.map((line) => ` ${line}`)
.join("\n");
console.log(chalk.dim(indented));
}
// Attachments