summaryrefslogtreecommitdiffhomepage
path: root/internal/llm/prompt
diff options
context:
space:
mode:
Diffstat (limited to 'internal/llm/prompt')
-rw-r--r--internal/llm/prompt/prompt.go16
-rw-r--r--internal/llm/prompt/title.go1
2 files changed, 12 insertions, 5 deletions
diff --git a/internal/llm/prompt/prompt.go b/internal/llm/prompt/prompt.go
index cf4d9a7e7..a6b4c03fb 100644
--- a/internal/llm/prompt/prompt.go
+++ b/internal/llm/prompt/prompt.go
@@ -14,8 +14,13 @@ var contextFiles = []string{
".github/copilot-instructions.md",
".cursorrules",
"CLAUDE.md",
+ "CLAUDE.local.md",
"opencode.md",
+ "opencode.local.md",
"OpenCode.md",
+ "OpenCode.local.md",
+ "OPENCODE.md",
+ "OPENCODE.local.md",
}
func GetAgentPrompt(agentName config.AgentName, provider models.ModelProvider) string {
@@ -31,12 +36,13 @@ func GetAgentPrompt(agentName config.AgentName, provider models.ModelProvider) s
basePrompt = "You are a helpful assistant"
}
- // Add context from project-specific instruction files if they exist
- contextContent := getContextFromFiles()
- if contextContent != "" {
- return fmt.Sprintf("%s\n\n# Project-Specific Context\n%s", basePrompt, contextContent)
+ if agentName == config.AgentCoder || agentName == config.AgentTask {
+ // Add context from project-specific instruction files if they exist
+ contextContent := getContextFromFiles()
+ if contextContent != "" {
+ return fmt.Sprintf("%s\n\n# Project-Specific Context\n%s", basePrompt, contextContent)
+ }
}
-
return basePrompt
}
diff --git a/internal/llm/prompt/title.go b/internal/llm/prompt/title.go
index 6e5289b24..5656360da 100644
--- a/internal/llm/prompt/title.go
+++ b/internal/llm/prompt/title.go
@@ -6,6 +6,7 @@ func TitlePrompt(_ models.ModelProvider) string {
return `you will generate a short title based on the first message a user begins a conversation with
- ensure it is not more than 50 characters long
- the title should be a summary of the user's message
+- it should be one line long
- do not use quotes or colons
- the entire text you return will be used as the title`
}