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 8dd89afea0
commit eb75f9aec7
5 changed files with 31 additions and 5 deletions
+3 -3
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{