feature: send prompt in a new session
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- lua
- Área
- api, developer-experience
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Lua
- Estrellas
- 3.8k
- Forks
- 161
- Merge medio
- 16 h 31 min
- PR fusionados (30 d)
- 4
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nickjvandyke/opencode.nvim
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nickjvandyke/opencode.nvim#336 ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
nickjvandyke/opencode.nvim#321 · 2 comentarios · 1 reacción ·
-
feature: doc/opencode.txtAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 52/100
nickjvandyke/opencode.nvim#41 · 1 comentario · 9 reacciones ·
Todos los issues de nickjvandyke/opencode.nvim
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
AstroNvim/astrotheme#184 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
objectionary/eolang.sty#184 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Add c++23 mapping to nvccAbiertofeature request
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días