feat: write to context.md by default

This commit is contained in:
adamdottv
2025-05-02 13:22:59 -05:00
committed by Adam
parent b2f24e38ed
commit 364cf5b429
5 changed files with 31 additions and 5 deletions

View File

@@ -707,14 +707,14 @@ func New(app *app.App) tea.Model {
model.RegisterCommand(dialog.Command{
ID: "init",
Title: "Initialize Project",
Description: "Create/Update the OpenCode.md memory file",
Description: "Create/Update the CONTEXT.md memory file",
Handler: func(cmd dialog.Command) tea.Cmd {
prompt := `Please analyze this codebase and create a OpenCode.md file containing:
prompt := `Please analyze this codebase and create a CONTEXT.md file containing:
1. Build/lint/test commands - especially for running a single test
2. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc.
The file you create will be given to agentic coding agents (such as yourself) that operate in this repository. Make it about 20 lines long.
If there's already a opencode.md, improve it.
If there's already a CONTEXT.md, improve it.
If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.`
return tea.Batch(
util.CmdHandler(chat.SendMsg{