ui.submit resolves before the TUI snapshots the composer, so back-to-back submits merge into one prompt
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with the ui.submit and ui.enter implementation in the driver, then submitInner in packages/tui/src/component/prompt/index.tsx, where the deferred handler reads input.plainText. Reproduce by running two ui.submit calls in a row and checking that the server gets two separate messages. Done means /undo runs as its own command, or the driver waits for the composer snapshot before resolving and a test covers that. If the fix is not practical, the docs should say a wait is needed between submits.
索引モデルが issue の本文から書いたものです。
説明
Drive 2.1.3 (source checkout at 8feac04). OpenCode V2 at 5cfe3b4271, run from source with opencode: { dev }.
What happens
Two ui.submit calls in a row are admitted as one prompt:
yield* ui.submit("ALPHA first prompt")
yield* ui.submit("/undo")
The server received a single user message with text ALPHA first prompt/undo. /undo never ran as a command. This happened on the home screen and also in a session that had already finished a turn.
Why
ui.submit returns once ui.enter is dispatched. The TUI handles Enter through a deferred submit (submitInner in packages/tui/src/component/prompt/index.tsx reads input.plainText when the deferred handler runs). The next ui.type reaches the composer before that handler runs, so the snapshot holds both texts.
Expected
Either ui.submit resolves after the composer has been snapshotted and cleared, or the docs say that a second ui.submit needs a wait first.
Workaround
Wait until the focused editor no longer contains the first text before the next ui.submit:
yield* ui.waitFor(() => Effect.map(editorText, (text) => !text.includes("ALPHA")), { interval: 10 })
editorText slices the focused editor element's rows from ui.capture().
- 主要言語
- TypeScript
- スター
- 40
- フォーク
- 8
- 平均マージ
- 4時間 24分
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode-drive のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode-drive#107 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode-drive#102 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
anomalyco/opencode-drive#135 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
anomalyco/opencode-drive#132 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 半日 初心者へのやさしさ 58/100
anomalyco/opencode-drive#120 ·
メンテナーはふだん 1 日以内に返信
anomalyco/opencode-drive の issue をすべて見る
似ている issue
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
S: triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
iot client
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Open-Locker/Open-Locker#365 ·
メンテナーはふだん 1 日以内に返信
-
bug enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
inmanta/web-console#7787 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
shoelace-style/webawesome#2979 ·
メンテナーはふだん 1 日以内に返信