Context Window Warning (#152)
* context window warning & compact command * auto compact * fix permissions * update readme * fix 3.5 context window * small update * remove unused interface * remove unused msg
This commit is contained in:
parent
9345830c8a
commit
90084ce43d
12 changed files with 537 additions and 98 deletions
|
|
@ -21,6 +21,8 @@ func GetAgentPrompt(agentName config.AgentName, provider models.ModelProvider) s
|
|||
basePrompt = TitlePrompt(provider)
|
||||
case config.AgentTask:
|
||||
basePrompt = TaskPrompt(provider)
|
||||
case config.AgentSummarizer:
|
||||
basePrompt = SummarizerPrompt(provider)
|
||||
default:
|
||||
basePrompt = "You are a helpful assistant"
|
||||
}
|
||||
|
|
|
|||
16
internal/llm/prompt/summarizer.go
Normal file
16
internal/llm/prompt/summarizer.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package prompt
|
||||
|
||||
import "github.com/opencode-ai/opencode/internal/llm/models"
|
||||
|
||||
func SummarizerPrompt(_ models.ModelProvider) string {
|
||||
return `You are a helpful AI assistant tasked with summarizing conversations.
|
||||
|
||||
When asked to summarize, provide a detailed but concise summary of the conversation.
|
||||
Focus on information that would be helpful for continuing the conversation, including:
|
||||
- What was done
|
||||
- What is currently being worked on
|
||||
- Which files are being modified
|
||||
- What needs to be done next
|
||||
|
||||
Your summary should be comprehensive enough to provide context but concise enough to be quickly understood.`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue