continue re-design

This commit is contained in:
Developers Digest
2025-09-05 13:06:17 -04:00
parent b96d048dbd
commit 836b085f75
270 changed files with 32269 additions and 5182 deletions
+19 -3
View File
@@ -59,10 +59,26 @@ export async function POST(request: NextRequest) {
case 'clear-old':
// Clear old conversation data but keep recent context
if (!global.conversationState) {
// Initialize conversation state if it doesn't exist
global.conversationState = {
conversationId: `conv-${Date.now()}`,
startedAt: Date.now(),
lastUpdated: Date.now(),
context: {
messages: [],
edits: [],
projectEvolution: { majorChanges: [] },
userPreferences: {}
}
};
console.log('[conversation-state] Initialized new conversation state for clear-old');
return NextResponse.json({
success: false,
error: 'No active conversation to clear'
}, { status: 400 });
success: true,
message: 'New conversation state initialized',
state: global.conversationState
});
}
// Keep only recent data