llm.serve receives the V2 session-title request as a normal request (isTitleRequest misses the current prompt)
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Đọc src/llm/internal.ts và theo dõi cách isTitleRequest nhận diện các prompt tiêu đề cũng như cách llm.serve định tuyến các yêu cầu. So sánh các prompt được nhận diện với prompt V2 trong issue, sau đó chạy tái hiện bằng llm.serve và ui.submit("Run a command"). Hoàn tất khi yêu cầu tiêu đề được xử lý như một yêu cầu tiêu đề và serve nhận prompt thực tế ở chỉ mục 0.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
On a current V2 checkout, llm.serve receives the session-title request as a normal model request. The V2 title prompt is:
You name conversations so the user can find them later in a list of past sessions.
isTitleRequest (src/llm/internal.ts) only matches Generate a title for this conversation: and You are a title generator., so the title request is routed to the serve handler. Its response is discarded by the server, and the next request is the real user prompt.
Scripts that route by index (including the skill's index-based examples) therefore answer the title request with the first turn and the real prompt with the second queued response.
Reproduction
yield* llm.serve((request, index) => {
console.log(index, JSON.stringify((request as any).body.messages[0]).slice(0, 120))
if (index === 0)
return Stream.make(
Llm.toolCall({ index: 0, id: "call_shell", name: "shell", input: { command: "echo hi" } }),
Llm.finish("tool-calls"),
)
return Stream.make(Llm.text("this becomes the real reply"))
})
yield* ui.submit("Run a command")
Observed: index 0 is {"role":"system","text":"You name conversations so the user can find them later..."} with tools: []; index 1 is the real prompt with the full tool list. The tool never runs and the real prompt gets the fallback text.
Expected
The title request is routed to the title handler (or recognized by isTitleRequest), and serve index 0 is the real prompt.
Environment
- opencode-drive 2.4.0
- OpenCode
b032f90634(PR #62977 worktree) andd22bc1d1b6(origin/dev); title prompt is identical on both - Run log:
/tmp/opencode-drive/run-1af20744-431a-45e0-b993-c3d43340f503/logs/opencode/log/opencode-local.log
Workaround
Route on the serialized body: if (body.includes("You name conversations so the user can find them later")) return Stream.make(Llm.text("Title")).
- Ngôn ngữ chính
- TypeScript
- Star
- 41
- Fork
- 9
- Merge trung bình
- 39 phút
- Pull request đã merge (30 ngày)
- 9
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 anomalyco/opencode-drive
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
anomalyco/opencode-drive#142 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode-drive#107 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
anomalyco/opencode-drive#102 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
llm settlement waits on a reply whose request an interrupt already abortedCó thể đã có người làm @mikemikimike đã nhận 4 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
anomalyco/opencode-drive#135 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
anomalyco/opencode-drive#132 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode-drive
Issue tương tự
-
area:tooling good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
interledger/publisher-tools#1007 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
databrickslabs/ontos#1420 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
vercel-labs/just-bash#756 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ci good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
interledger/web-monetization-extension#1555 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[t-dialog] 弹窗组件和抽屉组件的文档说明不够详细清楚Đang mở🐞 bug 🧐 unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Tencent/tdesign-vue-next#7056 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày