[FEATURE]: TUI plugin API for inline prompt suggestions
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 15/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- developer-experience, tooling
Rechercherichtung
Start from the plugin host's context.ui.prompt surface and the existing prompt/textarea renderer that the external opencode-autosuggestions plugin currently patches through renderer internals; read the prior art in #51209 (draft and cursor access) and #54197 (empty-composer suggestions) before designing the API. The proposal spans keybind handling (Tab, Ctrl+Right, Escape), trimming on typed prefix, and suppression rules for shell mode, open autocomplete/dialogs and non-end cursors, so it needs agreement on the contract first and tests against opencode-autosuggestions to be considered done. The author has stated they intend to implement it in a single PR, so coordinate before starting.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
TUI plugins have no supported way to show an inline suggestion in the prompt. opencode-autosuggestions already completes drafts while typing and suggests follow-ups after each turn, but it finds the prompt textarea through renderer internals and draws the ghost text in an absolutely positioned overlay at the cursor's screen coordinates. Its source notes that an OpenCode update can break this.
Proposal: add a suggestion API to context.ui.prompt, next to the draft access requested in #51209.
context.ui.prompt.suggest({ sessionID, text }): () => void
- The host draws
textas muted ghost text right after the cursor, in an empty or non-empty draft, and handles wrapping. - Tab accepts the whole suggestion, Ctrl+Right accepts the next word, and Escape dismisses it. All three are configurable keybinds. Accepting inserts text into the draft and never submits.
- When the user types characters that match the start of the suggestion, the host trims it. Any other edit, cursor move or session switch clears it.
- Suggestions are ignored in shell mode, while autocomplete or a dialog is open, and when the cursor is not at the end of the draft.
- Plugins also need to read the draft and cursor (#51209) and get a change event, so they can debounce their own requests.
This covers what #54197 did for the empty composer and extends it to drafts in progress. Model calls stay in plugins, so core sends no extra model requests.
I plan to implement this in a single PR and test it against opencode-autosuggestions.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 227k
- Forks
- 30.7k
- Ø Merge
- 3 Std. 57 Min.
- Gemergte PRs (30 T.)
- 484
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus anomalyco/opencode
-
[Site] Active section detection should respect scroll-margin-topEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenarea/web reproduced type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
anomalyco/opencode#65384 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/cli type/feature version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
anomalyco/opencode#65379 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Shell tool: no upper bound on the timeout a model can ask for, so one call can hold a turn for hoursOffenarea/core platform/linux type/feature version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
anomalyco/opencode#65254 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
inference/go type/feature
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 72/100
anomalyco/opencode#65148 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/providers type/feature version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
anomalyco/opencode#64845 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in anomalyco/opencode
Ähnliche Issues
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offersEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offencatalog provider provider-compatibility
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
lidge-jun/opencodex#9037 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 62/100
slavakurilyak/awesome-ai-agents#1005 ·
-
kind/bug triage/unresolved
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 60/100
Maintainer antworten meist innerhalb von 1 Tag
-
effort:S P3 refactor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
nightscout/nocturne#3735 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
wpilibsuite/systemcore-blocks-interface#641 ·
Maintainer antworten meist innerhalb von 2 Tagen