iT邦幫忙

2025 iThome 鐵人賽

DAY 20
0

今天終於可以花較多的時間在game部份進行調整,包含像是UI的收納,場景的呈現等。大致上來說都符合預期,但有碰到一個問題,換了好幾個agent都沒有辧法解決。

在web裡按下方向鍵移動時只能進行往上和往左的移動,不管怎麼按往下和往右都沒有反應。只好請openai的codex提供的gpt-5進行處理,此為agent的稍早的意見

I traced the input path end to end. In the game app’s logs (ConsoleDungeonApp), KeyDown events only show CursorUp and CursorLeft; there are no entries for CursorDown or CursorRight. That means the app never receives those two keys from the terminal driver.
This is consistent with a TERM/terminfo mismatch: in some macOS setups, curses/terminfo for xterm-256color can partially decode arrows (A/D) but fail to resolve B/C (down/right) in a PTY, so Terminal.Gui v2 never translates them into KeyCode events.

幾番嘗試後,agent提出這樣的看法

Browser Xterm onKey preview:
Down: "\u001bOB" [1b 4f 42]
Right: "\u001bOC" [1b 4f 43]
That’s the “application cursor” form (ESC O B/C), not the normal CSI form (ESC [ B/C). Some environments/apps flip cursor-key mode, which can confuse terminfo/key decoding for certain keys.

但每次agent回報應該是修繕好的訊息,待親自去測時還是沒有辧法做往下和往右的移動。經過多個不同的agent依然沒有辦法修復,看樣子這會是個很麻煩的問題。且為了解決這個問題,已經用爆了很多agent今日的quota,特別是claude code的claude sonnet 4.5,為了這個問題,出現了其它agent才會有的循環,所以不到50分鐘就用爆了5小時的token量,平常都可以用1.5小時左右。
連我最看好的openai codex都沒能順利解決這個問題,看樣子今天不會有下文了。只好先停在此,再想想看有沒有什麼方法可以測試或是繞過去。
另外,我真的覺得context是現今agent最大的硬傷,如果context可以達到一定量的話,利用agent解決問題的效率一定能大幅增加,這應該加是接下來幾年會不停追求的吧。從200k到1M再往上,就如同硬碟容量的增長一般。


上一篇
Manage doc and build
下一篇
One up, one down
系列文
Before AI dominate the world, AI dominate my world21
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言