mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 22:01:41 +00:00
mom: remove last_prompt.txt debug file (context.jsonl is source of truth)
This commit is contained in:
parent
ca23ade9f8
commit
5a231abe4c
1 changed files with 1 additions and 8 deletions
|
|
@ -2,7 +2,7 @@ import { Agent, type AgentEvent, ProviderTransport } from "@mariozechner/pi-agen
|
||||||
import { getModel } from "@mariozechner/pi-ai";
|
import { getModel } from "@mariozechner/pi-ai";
|
||||||
import { AgentSession, messageTransformer } from "@mariozechner/pi-coding-agent";
|
import { AgentSession, messageTransformer } from "@mariozechner/pi-coding-agent";
|
||||||
import { existsSync, readFileSync } from "fs";
|
import { existsSync, readFileSync } from "fs";
|
||||||
import { mkdir, writeFile } from "fs/promises";
|
import { mkdir } from "fs/promises";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import { MomSessionManager, MomSettingsManager } from "./context.js";
|
import { MomSessionManager, MomSettingsManager } from "./context.js";
|
||||||
import * as log from "./log.js";
|
import * as log from "./log.js";
|
||||||
|
|
@ -553,13 +553,6 @@ export function createAgentRunner(sandboxConfig: SandboxConfig): AgentRunner {
|
||||||
// Build user message from Slack context
|
// Build user message from Slack context
|
||||||
const userMessage = ctx.message.text;
|
const userMessage = ctx.message.text;
|
||||||
|
|
||||||
// Debug: write context to file
|
|
||||||
const debugPrompt =
|
|
||||||
`=== SYSTEM PROMPT (${systemPrompt.length} chars) ===\n\n${systemPrompt}\n\n` +
|
|
||||||
`=== USER MESSAGE ===\n\n${userMessage}\n\n` +
|
|
||||||
`=== EXISTING CONTEXT ===\n\n${session.messages.length} messages in context`;
|
|
||||||
await writeFile(join(channelDir, "last_prompt.txt"), debugPrompt, "utf-8");
|
|
||||||
|
|
||||||
// Log user message to log.jsonl (human-readable history)
|
// Log user message to log.jsonl (human-readable history)
|
||||||
await store.logMessage(ctx.message.channel, {
|
await store.logMessage(ctx.message.channel, {
|
||||||
date: new Date().toISOString(),
|
date: new Date().toISOString(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue