fix(ga): retry metadata-only responses#690
Open
Fwind43 wants to merge 1145 commits into
Open
Conversation
- 卡片头部新增向下箭头,可折叠/展开,状态记忆到 localStorage - DeepSeek / 通义千问 图标替换为官方 logo(品牌色 + 浅色徽底) - 添加模型弹窗指引横幅同步使用官方 logo Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 外层卡片改为白色(--card)+ 中性描边(--line-base) - 内层按钮改为浅灰(--bg-base),去除原 --line-soft 的主题绿色调 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
启动引导是 async IIFE,首行 await loadSessions() 会让出事件循环; 此期间 WS 一连上 bridge 即推送 bridge-ready(desktop_bridge ws_handler), onBridgeReady 已把 state.bridgeReady 置 true 并刷成「就绪」。但随后引导 无条件执行 chatStatus.setConnecting() 又覆盖回「连接中」,且此后 WS 已连、 不再触发 bridge-ready,状态便一直卡住,直到发消息触发 refreshStatusLabel 才恢复。 改为:若 await 期间 bridge 已就绪(state.bridgeReady=true)则按真实状态 渲染,否则才显示「连接中」,由 onBridgeReady 后续翻转。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Feat/official api quickstart
修复个人微信前端在 headless 容器内无法登录
* feat(tui): workspace 项目模式 + @ 文件引用补全(v2/v3) - workspace: /workspace 设/off/picker、junction 复用 project_mode 记忆、 per-session(v2)/进程级(v3)、/continue 恢复、session map 持久化绑定状态 - @ 补全(completion-only): 子序列模糊 + path-like 目录补全(~/ / ./ C:\)、 提交期 @路径作为普通文本交 agent - v3 filterable 焦点链 picker(输入框作焦点环对象、free_input) - 新增共享模块 at_complete.py / workspace_cmd.py;核心零改动 * feat(tui): @ 路径绝对化 + 默认根=temp + 未绑显示完整路径 - 默认根 os.getcwd() → agent 工作目录 <GA根>/temp(与 file_read/code_run 一致、不随启动 cwd 飘) - 提交期 @相对 → @绝对(display 保留相对短路径),让 agent file_read(相对自身 cwd)找得到 - 未绑 workspace 时候选显示完整路径(根不直观);索引忽略 model_responses 会话日志噪音 - 启动预热 temp 索引 + candidates_for 惰性兜底(任何根首次访问自动建)
…lsdefine#606) - macljqCtrl.py: macOS implementation of mouse/keyboard/screenshot/window enumeration mirroring ljqCtrl API, plus AX accessibility control tree (AXElements/AXFind/AXPress) as the macOS equivalent of UIA - computer_use.md: add section 3 documenting the macOS platform branch - .gitignore: whitelist memory/macljqCtrl.py
… prevent UI freeze ESC cancel sent session/cancel RPC but never cleared the busy flag, leaving the UI stuck if the server-side cancelled event never arrived. Also clear busy on all sessions when the bridge closes so pending poll loops exit cleanly. Co-authored-by: dilong888 <dilong888@users.noreply.github.com>
v3 的 _do_restore 此前只把历史载入内存 backend.history,不碰当前进程日志。native 后端逐轮只把新增消息 append 到 model_responses_{pid}.txt,恢复出的旧历史从不写入当前日志——续聊只追加增量,下次 /continue 扫到的本进程文件就只剩续聊部分,旧历史丢失。
对齐 v2 _do_continue_restore:恢复前 reset_conversation(快照+清空当前日志),恢复后 copyfile(源日志 → 当前日志),续聊便接在完整历史之后。
…d, AXClick)Feat/macos ax enhancements (lsdefine#611) * feat(memory): enhance macOS AX control (resolve_pid fix, enabled field, AXClick) - _resolve_pid: fix bundle_id branch (used un-imported AppKit), 3-tier match (bundle id > app name exact > substring) - AXElements: collect 'enabled' field (SOP: check disabled before click) - AXClick: AXPress-first then fallback to physical-coord Click, honest success判定 via pixel diff - AXFind: add enabled_only filter, refactor if-forest into _hit helper * docs(ljqCtrl): tighten macOS AX guidance, drop boilerplate & app-specific detail - collapse 5-line cross-platform import boilerplate to one line - generalize control-identifier tip (remove app-specific identifiers)
Annotate config block to guide new GA instances: enumerate candidate mykey.py variable names and experimentally probe which config works; only print var/field names, model, apibase host/path, status codes and error types (never full dict or apikey/token); include a config format example. Also flag that apibase/endpoint may differ per provider/proxy at the two request-building sites.
…conflict) (lsdefine#617) /continue N 默认改为「原地续」:接管原会话日志、后续轮次写回同一文件,取代旧的 镜像复制(supersedes b4356c7 的 mirror 方案),不再每次续接都 fork 新会话、日志增殖。 - 空闲会话 → 直接原地接管;被活进程占用 → 弹窗确认后才复制一份续。 - 每会话出生持锁(temp/model_responses/.locks/<logid>.lock),整进程共用一个心跳 线程每 5s touch mtime、30s 无心跳判死可接管;atexit 干净释放,崩溃/强杀靠超时兜底。 - 切走/新对话不再「快照+清空」(原 _snapshot_current_log 因 logid≠pid 实为死代码, 从未生成过快照),旧日志原样留作空闲会话,新对话铸新 logid。 - list_sessions 新增 exclude_log,修正 exclude_pid=getpid 失效导致当前会话出现在 自己列表里的问题。 - continue_cmd 仅新增函数,reset_conversation/restore/handle 未改动 → 其他前端 (IM/qt/streamlit 等)行为完全不变。 - 改动仅限 continue_cmd.py + tui_v3.py + tuiapp_v2.py;rewind/worldline 逻辑不在本 PR。
Update WeChat group 21 QR code image. Co-authored-by: AspasZhang <AspasZhang@users.noreply.github.com>
…ne#621) In-place /continue retargets agent.log_path to the restored file, so the reset bind `_bind_workspace(None)` ran during restore was persisting session_ws_set(path, "") — erasing that session's own workspace mapping to "" (read back as "explicitly off") before we read it, which also short- circuited the log-scan fallback. The continued session never re-entered its workspace. Add a `persist` flag to `_bind_workspace`; the restore-time reset passes persist=False so it only refreshes in-memory state. The session→workspace map is now written solely by explicit /workspace, /workspace off, and a successful restore.
This reverts commit 82442ce.
…ompt The /update prompt reconciles the working tree "upstream-first" file by file. That silently drops fork-local additions to files BOTH sides edit — most painfully .gitignore, whose local ignore rules vanish, so a fork's private dirs resurface as untracked noise (and can get committed by accident). Treat files carrying a `Fork-only local overlay` marker (e.g. .gitignore) as a MERGE: take upstream as the base, then re-append everything under the marker verbatim, and verify the marker survived. Along the way, tighten both the EN and ZH prompts (75 -> 58 lines) without dropping any operative step.
…erlay-merge fix(slash_cmds): merge additive-overlay files (e.g. .gitignore) on /update
…OP); ga.py: file_patch/file_write 保持原文件换行符, 修复LF文件被污染成CRLF; _arg 类型强转修复字符串false等
Add maxlen_multiplier derived from context_win (capped 3x); drives per-tool truncation caps and history compression interval. WebScan uses half-increment growth to avoid saturating its 35000 base. Docs updated for the new coupling.
Hard-delete path can preserve the first K history messages, insert a "..." gap, and strip dangling tool_use at the cut. Default 0 keeps previous behavior.
Ignore assets/glm52_instruction.txt and assets/gpt55_instruction.txt so local customizations stay out of the repo.
…#681) The agent's default cwd is the temp/ subdirectory, where git resolves '-- <file>' pathspecs relative to cwd. Fed the root-relative paths that 'git diff --name-only' prints, 'git checkout upstream/main -- <file>' fails with "pathspec did not match", breaking the working-tree reconcile steps of /update. The prompt now tells the agent to run every git command from the repo root (_ROOT), in both EN and ZH. Co-authored-by: Shen Hao <shenhao-stu@users.noreply.github.com>
…sdefine#673) When OS revokes master stdout, bare print() raises BrokenPipeError and aborts WS handle before tab registration, causing stale web_scan data and extension reconnect loops. Mirror ga.py safe_print across TMWebDriver log sites. Closes lsdefine#672
Merge desktop fork updates into upstream main
c921bad tightened blank-turn detection by stripping <thinking>/<summary> and treating meta-only replies as empty. That is too aggressive for the main agent loop (summary-only / thinking-only turns get forced retries). Keep desktop_bridge behavior; only revert ga.py core path.
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.
Summary
Treat responses containing only
<thinking>/<summary>metadata as incomplete instead of accepting them as final user-visible output.Why
A real run ended after the model returned only:
There was no tool call and no user-visible answer.
do_no_toolaccepted it as a normal final result, leaving GA Admin with an empty terminal turn rendered as “正在等待该轮输出…”.The metadata-only path now reuses the existing incomplete-response retry and exit policy.
Testing
response.thinking-only, and mixed metadata responsespy_compilegit diff --checkReview principles
ga.py