Files
paseo/packages/voice-assistant/scripts/process-conversation.ts
T
Mohamed BoudraandClaude 7d0a587619 refactor: enhance artifact system, security, and terminal command handling
- Add basic HTTP authentication (express-basic-auth)
- Improve artifact tool with better source type handling (command_output, file, text)
- Update agent prompt with clearer artifact usage patterns
- Refactor tmux command execution to use execFile for safer argument handling
- Add UI cancellation capability for in-progress operations
- Switch session dumps to use util.inspect for better formatting
- Update artifact tool schema to require title parameter first

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 21:04:29 +02:00

33 lines
909 B
TypeScript

import { readFileSync } from "fs";
import { inspect } from "util";
import { standardizePrompt } from "ai/internal";
async function processConversation() {
try {
const conversationPath =
".conversations/ce44c79a-0689-4210-8e00-72c0a627406d-2.json";
console.log("Loading conversation from:", conversationPath);
const conversationData: any = JSON.parse(
readFileSync(conversationPath, "utf-8")
);
console.log(
`\nLoaded conversation ${conversationData.conversationId} with ${conversationData.messages.length} messages\n`
);
const result = await standardizePrompt({
prompt: conversationData.messages,
});
console.log("Standardized prompt result:");
console.log(inspect(result, { depth: null, colors: true }));
} catch (error) {
console.error("Error processing conversation:", error);
process.exit(1);
}
}
processConversation();