feature: send prompt in a new session
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/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ệ
- lua
- Lĩnh vực
- api, developer-experience
Hướng nghiên cứu
Start at the ask(default, opts) entry point and read the session API documentation for session.create, session.switchModel, and model.list. Trace how the latest session and model are currently obtained. Done means ask can either append to the latest session or create a new one, using the latest model or opening a picker when no session exists.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Prerequisites
- I searched the docs
- I searched existing issues
Is your feature request related to a problem? Please describe.
One of the most common usecase that I have with this plugin is creating a little session to tweak. Something like a Ctrl+k feature from Cursor (not sure if it still has it). Previously on opencode v1, I was using new_session tui command, before sending the prompt. Unfortunately, opencode v2 removed the tui API, so we kinda have to target the session API.
Describe the solution you'd like
Add an option to the ask(default, opts) on whether to append the prompt to the latest session (like the current behaviour), or create a new session with that prompt.
I tested this on a local fork, but by default the create new session API will use a model from opencode go (even if you're using other providers and don't have subscription from opencode go). So, from our side, we have to know what model on that session. I'm proposing the following heuristic:
- Use the model from the latest session
- If there's no session, open a picker popup to let the user pick the model
Describe alternatives you've considered
None, the solution space is quite limited.
Additional context
https://opencode.ai/v2/docs/api#session.create
https://opencode.ai/v2/docs/api#session.switchModel
https://opencode.ai/v2/docs/api#model.list
- Ngôn ngữ chính
- Lua
- Star
- 3.9k
- Fork
- 159
- Merge trung bình
- 16 giờ 31 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay 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 nickjvandyke/opencode.nvim
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nickjvandyke/opencode.nvim#336 ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
nickjvandyke/opencode.nvim#321 · 2 bình luận · 1 reaction ·
-
feature: doc/opencode.txtĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
nickjvandyke/opencode.nvim#41 · 1 bình luận · 9 reaction ·
Tất cả issue của nickjvandyke/opencode.nvim
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/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 78/100
Facepunch/garrysmod-issues#7077 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
AstroNvim/astrotheme#184 ·
-
[Minetest] IssueĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
pterodactyl/game-eggs#639 ·