Skip to content

Fix/agents repl readline unicode#84

Open
strawberry-swing wants to merge 4 commits intoshareAI-lab:mainfrom
strawberry-swing:fix/agents-repl-readline-unicode
Open

Fix/agents repl readline unicode#84
strawberry-swing wants to merge 4 commits intoshareAI-lab:mainfrom
strawberry-swing:fix/agents-repl-readline-unicode

Conversation

@strawberry-swing
Copy link

Changes
Per file: optional readline import at top (try/except, readline = None on failure e.g. Windows).
Files: all agents with an interactive REPL: s01_agent_loop.py through s12_worktree_task_isolation.py and s_full.py.

现在的版本打错中文后删掉再发送就会触发UnicodeDecodeError,且不支持左右移动光标,每次打错字或者想补充都得重新启动程序,体验有点差。用readline包装了一下,体验好很多,且不会影响Windows系统。

另外在s06加入了两行print代码以便用户更好地理解compact的过程:一行打印当前token数,一行打印了手动compact前模型的“focus”,把这个TOOLS中的参数利用了起来,以便用户更好理解模型的思路。

…ror)

- Add optional readline import with fallback for Windows
- Bind arrow keys when using libedit (e.g. Cursor terminal)
- Catch UnicodeDecodeError on input and re-prompt (e.g. when deleting CJK)

Made-with: Cursor
@vercel
Copy link

vercel bot commented Mar 15, 2026

@plum-lizimu is attempting to deploy a commit to the crazyboym's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant