feat: self-heal continuation + auto-proceed session advancement#117
Open
aEgoist wants to merge 3 commits into
Open
feat: self-heal continuation + auto-proceed session advancement#117aEgoist wants to merge 3 commits into
aEgoist wants to merge 3 commits into
Conversation
- Add selfHealContinue setting that auto-sends '继续' when assistant produces no real text output (empty/too-short reply) - Detect stall by checking last assistant text message < 20 chars - 10s cooldown to prevent rapid re-fire - Add toggle in Settings → Permissions page - Add i18n strings (en + zh-CN) - Also includes ongoing AgentLoop improvements Closes #self-heal
- Per-session auto-proceed toggle via sidebar dot (green=on, gray=off) - Global autoProceedOn setting (default true) controls new sessions - Customizable autoProceedPrompt in Settings - After each assistant reply, auto-injects prompt for re-check unless reply contains '无需自动推进' - Sidebar dot: clickable 6x6px area, toggles between emerald/gray - Settings UI: toggle + textarea for prompt Closes #auto-proceed
- Fix dot invisibility: use <span role='button'> instead of <button> - Fix state leak: store '0' in localStorage instead of removing key - Fix color: use bg-emerald-700 for deeper/darker green - Add keyboard accessibility (Enter/Space) for the dot toggle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch 1: Self-heal continuation (go-on)
Problem
When a model API disconnects, returns empty content, or the AgentLoop exits a tool-call-only turn without producing a text reply, the session permanently stalls. The user must manually type "继续" (continue) to unblock.
Solution
completeevent, check the last assistant text message. If its trimmed content is < 20 characters, we consider the turn stalled.startSessionCommandto resume the session.selfHealContinue(defaultfalse), toggled in Settings → Permissions.Patch 2: Auto-proceed session advancement
Problem
Users need a way to keep sessions moving forward without manual re-prompting. After each assistant reply, the user must manually check whether the work is complete and type a follow-up instruction.
Solution
Auto-proceed — a per-session toggle that, when active, automatically sends a configurable follow-up prompt after each assistant reply, re-checking completeness and correctness. The session self-terminates when the assistant says "无需自动推进" (no auto-advance needed).
autoProceedOnsetting (defaulttrue) controls whether new sessions start with auto-proceed enabled.autoProceedPromptsetting — the follow-up prompt injected after each reply.Files changed
self-heal (commit 1)
ui/src/components/chat/types/types.tsselfHealContinue?: booleanui/src/components/chat/utils/chatStorage.tsselfHealContinueui/src/components/chat/hooks/useChatRealtimeHandlers.tsui/src/components/chat-v2/ChatInterfaceV2.tsxsendMessagepropui/src/components/settings/view/tabs/PermissionsSettingsTab.tsxui/src/i18n/locales/en/settings.jsonui/src/i18n/locales/zh-CN/settings.jsonauto-proceed (commit 2)
ui/src/components/chat/utils/autoProceedStorage.tsui/src/components/chat/types/types.tsautoProceedOn,autoProceedPrompt,AUTO_PROCEED_DEFAULT_PROMPTui/src/components/chat/utils/chatStorage.tsui/src/components/app-shell/SidebarV2.tsxui/src/components/chat/hooks/useChatRealtimeHandlers.tsui/src/components/settings/view/tabs/PermissionsSettingsTab.tsxui/src/i18n/locales/en/settings.jsonui/src/i18n/locales/zh-CN/settings.json