mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 12:04:35 +00:00
Release v0.18.7
This commit is contained in:
parent
c43395bac3
commit
80a04fb1aa
13 changed files with 58 additions and 45 deletions
|
|
@ -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