Chat: add model-aware history budgets and safe compaction for replay/recovery
Maintainer thường phản hồi trong vòng 1 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
- 12/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- ai-infra-agents
Hướng nghiên cứu
This is design work spanning chat prompt construction, transcript persistence, branch/edit invalidation and native-session recovery, and the payload names no specific files or tests. Start by locating where the chat prompt and history are assembled for the selected model, and read the related transport fix in #429. Done would need a settled budget/compaction design and the listed acceptance tests (oversized draft, pending confirmations, branch invalidation, missing native transcript, multibyte UTF-8) passing against a fixture provider.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Related transport fix: #429.
Moving a chat prompt from argv to stdin avoids the operating system's per-argument limit, but does not enforce the selected model's context window. Long authoritative transcripts, including saved operation drafts, can still grow indefinitely. Branches, edited histories, executor changes and missing native sessions require full-history reconstruction, which may exceed the model budget even when normal incremental continuation works.
Please consider a separate context-management change:
- Define provider/model-aware input budgets with room for system instructions, tool schemas and expected output. Track serialized UTF-8 bytes separately from estimated/model token counts; do not treat a 128 KiB OS argument threshold as a model context limit.
- Build a bounded model-facing projection while preserving the authoritative user-visible transcript. Summaries should retain user constraints, pending approvals and operation receipts, and must not turn historical instructions into current authorization.
- Use a persisted, revision-bound summary/checkpoint plus recent turns; invalidate it correctly when editing or branching. Keep the current question intact and expose a clear diagnostic when even the current turn cannot fit.
- Ensure initial chat, long-history branches and native-session recovery use the same budget/compaction policy. Coordinate with provider-native compaction instead of replaying unbounded history after a cache miss.
- Return structured, redacted failure codes for input budget/context overflow, distinct from process-launch E2BIG, provider quota failures and malformed tool JSON. Log byte/token counts and correlation IDs rather than complete prompts or credentials.
Acceptance tests should cover an oversized historical draft, preservation of pending confirmations, edited/branched history invalidation, missing native transcript recovery, and multibyte UTF-8 budgeting. These tests should use synthetic transcripts and a local fixture provider.
No deployment-specific transcripts, addresses or credentials are needed to reproduce or test this behavior.
- Ngôn ngữ chính
- Go
- Star
- 141
- Fork
- 28
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 113
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 Tencent/LoopForge
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: 官方镜像未安装 wecom-cli,企业微信通知报「通知服务未安装 wecom-cli」Có thể đã có người làm @newexploreor đã 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 76/100
Tencent/LoopForge#156 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
【架构优化】合并 gitwork/workbranch.go 中 push/pull 重复的默认提交身份注入为 withFallbackIdentityCó thể đã có người làm @fx-kurumi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 40/100
Maintainer thường phản hồi trong vòng 1 ngày
-
【架构优化】从 runtime.installNPMCLI 中拆出 npm 参数拼装 npmCLIInstallArgs 与安装结果启用 activateNPMStageCó thể đã có người làm @fx-kurumi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Tencent/LoopForge
Issue tương tự
-
team:library-maintainers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
padok-team/burrito#1208 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
bazel-contrib/rules_go#4784 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Уязвимые компоненты в GoĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
POSIdev-community/aictl#40 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
prime-radiant-inc/evener#6306 ·
Maintainer thường phản hồi trong vòng 1 ngày