Question about incremental editing configuration & merge logic for OpenUI Lang

Aperta
#619 4 commenti 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@zahlekhan ci sta già lavorando.

Dal 11/6/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

question

I'm referring to the incremental editing section in the documentation: https://www.openui.com/docs/openui-lang/incremental-editing.

Could you please clarify if enabling editMode: true and inlineMode: true is sufficient to use incremental editing? Or do I still need to implement custom merge logic? Cursor generated a large amount of extra code for me, so I'd like to confirm the actual requirements.

Here is the related implementation guidance I got from Cursor:
Create a file named mergeOpenUiPatch.ts with around 20 lines of code, which simply calls mergeStatements internally.

We need to pass existing_lang to the orchestrator. Since the /api/vis/render endpoint (Approach 2) is stateless and runs in a single round, the LLM cannot access previous code. We have to inject the existing code into the user message; otherwise, editMode will not work for patching.

The minimal integration consists of three key points:

  1. Enable editMode and inlineMode in the prompt (already done).
  2. Pass the previous lang content as existing_lang to the LLM when available.
  3. Call mergeStatements after receiving the patch, then perform rendering.

Please let me know if any additional logic is required. Thank you!

Lingua principale
TypeScript
Stelle
10k
Fork
698
Merge medio
1g 2h
PR unite (30g)
138

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di thesysdev/openui

Tutte le issue di thesysdev/openui

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.