mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 17:00:45 +00:00
Release v0.18.7
This commit is contained in:
parent
c43395bac3
commit
80a04fb1aa
13 changed files with 58 additions and 45 deletions
|
|
@ -1,6 +1,14 @@
|
|||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
## [0.18.7] - 2025-12-12
|
||||
|
||||
### Added
|
||||
|
||||
- Timestamp prefix on user messages (`[YYYY-MM-DD HH:MM:SS]`) so mom knows current date/time
|
||||
|
||||
### Fixed
|
||||
|
||||
- Sync deduplication now strips timestamp prefix before comparing
|
||||
|
||||
## [0.18.6] - 2025-12-12
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-mom",
|
||||
"version": "0.18.6",
|
||||
"version": "0.18.7",
|
||||
"description": "Slack bot that delegates messages to the pi coding agent",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
|
@ -21,9 +21,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sandbox-runtime": "^0.0.16",
|
||||
"@mariozechner/pi-agent-core": "^0.18.6",
|
||||
"@mariozechner/pi-ai": "^0.18.6",
|
||||
"@mariozechner/pi-coding-agent": "^0.18.6",
|
||||
"@mariozechner/pi-agent-core": "^0.18.7",
|
||||
"@mariozechner/pi-ai": "^0.18.7",
|
||||
"@mariozechner/pi-coding-agent": "^0.18.7",
|
||||
"@sinclair/typebox": "^0.34.0",
|
||||
"@slack/socket-mode": "^2.0.0",
|
||||
"@slack/web-api": "^7.0.0",
|
||||
|
|
|
|||
|
|
@ -581,9 +581,11 @@ function createRunner(sandboxConfig: SandboxConfig, channelId: string, channelDi
|
|||
log.logInfo(`Context sizes - system: ${systemPrompt.length} chars, memory: ${memory.length} chars`);
|
||||
log.logInfo(`Channels: ${ctx.channels.length}, Users: ${ctx.users.length}`);
|
||||
|
||||
// Build user message with username prefix
|
||||
// Format: "[username]: message" so LLM knows who's talking
|
||||
let userMessage = `[${ctx.message.userName || "unknown"}]: ${ctx.message.text}`;
|
||||
// Build user message with timestamp and username prefix
|
||||
// Format: "[YYYY-MM-DD HH:MM:SS] [username]: message" so LLM knows when and who
|
||||
const now = new Date();
|
||||
const timestamp = now.toISOString().slice(0, 19).replace("T", " ");
|
||||
let userMessage = `[${timestamp}] [${ctx.message.userName || "unknown"}]: ${ctx.message.text}`;
|
||||
|
||||
// Add attachment paths if any (convert to absolute paths in execution environment)
|
||||
if (ctx.message.attachments && ctx.message.attachments.length > 0) {
|
||||
|
|
|
|||
|
|
@ -615,8 +615,11 @@ export function syncLogToContext(channelDir: string, excludeAfterTs?: string): n
|
|||
if (entry.type === "message" && entry.message?.role === "user") {
|
||||
let content =
|
||||
typeof entry.message.content === "string" ? entry.message.content : entry.message.content?.[0]?.text;
|
||||
// Strip attachments section for comparison (live messages have it, log messages don't)
|
||||
if (content) {
|
||||
// Strip timestamp prefix for comparison (live messages have it, log messages don't)
|
||||
// Format: [YYYY-MM-DD HH:MM:SS] [username]: text
|
||||
content = content.replace(/^\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] /, "");
|
||||
// Strip attachments section for comparison (live messages have it, log messages don't)
|
||||
const attachmentsIdx = content.indexOf("\n\n<slack_attachments>\n");
|
||||
if (attachmentsIdx !== -1) {
|
||||
content = content.substring(0, attachmentsIdx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue