feat: add /chat summary command

This commit is contained in:
pomelo-nwu
2025-09-08 20:43:38 +08:00
parent 57c6b25e61
commit c33e709802
3 changed files with 208 additions and 3 deletions

View File

@@ -540,3 +540,33 @@ The structure MUST be as follows:
</state_snapshot>
`.trim();
}
/**
* Provides the system prompt for generating project summaries in markdown format.
* This prompt instructs the model to create a structured markdown summary
* that can be saved to a file for future reference.
*/
export function getProjectSummaryPrompt(): string {
return `Please analyze the conversation history above and generate a comprehensive project summary in markdown format. Focus on extracting the most important context, decisions, and progress that would be valuable for future sessions. Generate the summary directly without using any tools.
You are a specialized context summarizer that creates a comprehensive markdown summary from chat history for future reference. The markdown format is as follows:
# Project Summary
## Overall Goal
<!-- A single, concise sentence describing the user's high-level objective -->
## Key Knowledge
<!-- Crucial facts, conventions, and constraints the agent must remember -->
<!-- Include: technology choices, architecture decisions, user preferences, build commands, testing procedures -->
## Recent Actions
<!-- Summary of significant recent work and outcomes -->
<!-- Include: accomplishments, discoveries, recent changes -->
## Current Plan
<!-- The current development roadmap and next steps -->
<!-- Use status markers: [DONE], [IN PROGRESS], [TODO] -->
<!-- Example: 1. [DONE] Set up WebSocket server -->
`.trim();
}