Request for system prompt / complete context in `preRequest` hook
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- clojure
- Lĩnh vực
- ai-infra-agents
Hướng nghiên cứu
The issue does not name relevant files or tests. Start by tracing how preRequest hooks are invoked and what context is available to them; then assess how conversation or injected-context data could be exposed safely. Done means the hook can inspect context that the model will receive, including changes caused by compaction, without relying on external state.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
I've been building a persistent memory system that hooks into ECA via chatStart + preRequest to inject recalled memories into the prompt. It works well, but I've run into a limitation with the preRequest hook that makes deduplication harder than it needs to be.
Each preRequest invocation is a fresh process - it only gets { hook_type, prompt }. I want to avoid re-injecting memories the agent has already seen, but I have no way to know what's currently in the conversation context. Right now I'm working around this with a statefile that tracks what I've surfaced, but it's blind to context compaction; if ECA truncates older context, those memories should be re-surfaced, but my statefile still thinks they're present.
The opencode plugin doesn't have this problem because its hook receives the full system prompt state, so it can scan for what's already there.
What would help: If the preRequest payload included the current conversation messages (or at least the system prompt / injected context entries), the hook could inspect what's actually present and make smarter decisions. Something like:
{
"hook_type": "preRequest",
"prompt": "...",
"messages": [
{ "role": "system", "content": "..." },
{ "role": "user", "content": "..." },
{ "role": "assistant", "content": "..." }
]
}
Even a lighter version would work, just the system/injected context entries, not the full message history. The key thing is being able to see what the model will actually receive, so hooks can avoid redundancy and respond to compaction. Any hook that wants to inject contextual information (RAG, memory, project state, etc.) benefits from knowing what's already in the context. Without it, you either accept duplicates (wasting tokens) or maintain fragile external state that can't account for compaction.
- Ngôn ngữ chính
- Clojure
- Star
- 1k
- Fork
- 82
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của editor-code-assistant/eca
-
Models doesn't work when fetchModels: false is usedCó thể đã có người làm @zikajk đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
editor-code-assistant/eca#661 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
editor-code-assistant/eca#662 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
editor-code-assistant/eca#652 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
editor-code-assistant/eca#648 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
editor-code-assistant/eca#644 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của editor-code-assistant/eca
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
nrepl/piggieback#163 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
clojure-emacs/orchard#436 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Priority:P3
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
metabase/metabase#85025 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolvedCó thể đã có người làm @RaphaelFakhri đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100