llm.serve receives the V2 session-title request as a normal request (isTitleRequest misses the current prompt)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend
Línea de trabajo
Lee src/llm/internal.ts y sigue cómo isTitleRequest identifica los prompts de título y cómo llm.serve enruta las solicitudes. Compara los prompts que reconoce con el prompt V2 del issue y luego ejecuta la reproducción con llm.serve y ui.submit("Run a command"). Se considera terminado cuando la solicitud de título se trata como tal y serve recibe el prompt real en el índice 0.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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")).
- Lenguaje dominante
- TypeScript
- Estrellas
- 41
- Forks
- 9
- Merge medio
- 39 min
- PR fusionados (30 d)
- 9
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 anomalyco/opencode-drive
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
anomalyco/opencode-drive#142 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode-drive#107 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
anomalyco/opencode-drive#102 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
llm settlement waits on a reply whose request an interrupt already abortedPosiblemente ocupada @mikemikimike la tomó hace 4 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
anomalyco/opencode-drive#135 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
anomalyco/opencode-drive#132 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode-drive
Issues similares
-
area:tooling good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
interledger/publisher-tools#1007 ·
Los mantenedores suelen responder en 1 día
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
databrickslabs/ontos#1420 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
vercel-labs/just-bash#756 ·
Los mantenedores suelen responder en 1 día
-
area: ci good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
interledger/web-monetization-extension#1555 ·
Los mantenedores suelen responder en 1 día
-
[t-dialog] 弹窗组件和抽屉组件的文档说明不够详细清楚Abierto🐞 bug 🧐 unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Tencent/tdesign-vue-next#7056 · 1 comentario ·
Los mantenedores suelen responder en 1 día