41 lines
1.3 KiB
Go
41 lines
1.3 KiB
Go
package agents
|
|
|
|
type CompactorAgent struct{}
|
|
|
|
func ContextCompactorSystemMessage() string {
|
|
return `You are the context compactor assistant.
|
|
Your job is to produce a concise durable memory summary of the conversation.
|
|
Preserve user goals, decisions, constraints, file paths, commands, test results, errors, and unresolved questions.
|
|
Drop greetings, repetition, filler, and low-value chatter.
|
|
Write plain text with short bullets or short sections.
|
|
Do not invent details.`
|
|
}
|
|
|
|
func (a *CompactorAgent) Type() string {
|
|
return "compactor"
|
|
}
|
|
|
|
func (a *CompactorAgent) DisplayName() string {
|
|
return "Compactor"
|
|
}
|
|
|
|
func (a *CompactorAgent) Description() string {
|
|
return "Summarizes conversation history into durable memory"
|
|
}
|
|
|
|
func (a *CompactorAgent) Icon() string {
|
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16"/><path d="M6 7v12h12V7"/><path d="M9 11h6"/><path d="M9 15h6"/></svg>`
|
|
}
|
|
|
|
func (a *CompactorAgent) SystemMessage() string {
|
|
return ContextCompactorSystemMessage()
|
|
}
|
|
|
|
func (a *CompactorAgent) ShouldRespond(message string) bool {
|
|
return true
|
|
}
|
|
|
|
func (a *CompactorAgent) RequiresWorkspace() bool {
|
|
return false
|
|
}
|