fix(stapp): use Streamlit-min height for compact text_area#694
Open
Solaris-star wants to merge 1149 commits into
Open
fix(stapp): use Streamlit-min height for compact text_area#694Solaris-star wants to merge 1149 commits into
Solaris-star wants to merge 1149 commits into
Conversation
修复个人微信前端在 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.
Trend chart fix:
- SVG had preserveAspectRatio="none" which stretched the viewBox 600x260
non-uniformly to the container (max-width 760 x height 280), making text
~15% wider than tall ("扁").
- Switch to preserveAspectRatio="xMidYMid meet" so text renders at correct
aspect, and replace fixed container height with aspect-ratio:600/260 +
min-height:280px so chart fills naturally without distortion.
Color theme cleanup (user-requested):
- Drop 8-color mac-style palette, keep only a single gray light theme.
- --accent now hard-coded gray (#8e8e93); removed --swatch-2..8 and all
html[data-theme="N"] / .swatch[data-theme="N"] CSS rules.
- Remove the entire "颜色" (set.theme) block from settings page.
- applyTheme() stubbed: still callable for backward compat with stored
ga_theme values, but always normalizes to theme '1'.
- Drop set.theme i18n entries (zh + en).
Cache busters: styles.css 136→137, app.js 181→182.
Sidebar: - 快速接入官方模型 header restyled to match 配置 button (foot-row style: transparent bg, padding, hover state, lightning icon on left, caretRight chevron on right that rotates 90deg when expanded). - Drop the "填好 API Key 即可使用" subtitle for single-line consistency. - Drop the "展开/折叠" tooltip on the head. - Bump both .pq-head and .foot-row padding to 14px so the buttons look substantial. - Set .sidebar-foot margin-top:6px to match .provider-quickstart's internal gap:6px — uniform 6px rhythm between pq-head→DeepSeek→Qwen→配置. Services page: - Remove the "IM 消息通道与后台进程,集中查看、启停与日志" subtitle. - Align .svc-tabs margin with .tok-tabs (margin:10px 0 0) so the title position and tab bar position match the Token usage page. Token page (i18n): - zh: "Conductor" → "指挥家" on tab label, total/current row labels, tooltip, and the new tok.condOffline string (replaces hard-coded text). - en remains "Conductor" (English UI keeps the English name). Token table column widths: - Switch to table-layout:fixed. Number columns 80px each, cache-rate 85px. - First column (session name) gets the rest of the width; overflow truncates with ellipsis. JS adds title="<full name>" so hover shows the complete session title as a tooltip. No more column-width jitter when switching Chat/指挥家 tabs. Color tweaks (no hardcoded values): - .pq-btn background var(--bg-base) → var(--field-bg) (lighter). - .model-guide border var(--accent) → var(--line-base); background var(--accent-bg) → var(--field-bg) (lighter, neutral).
…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.
fix(desktop): restore permissive empty-turn handling
Newer Streamlit rejects height=1 (min 68px). Keep the existing CSS that visually compresses the control, but pass a legal height value. Fixes lsdefine#680 Signed-off-by: Solaris-star <solaris@users.noreply.github.com>
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
Fixes #680
frontends/stapp.pyusedst.text_area(..., height=1), which crashes Streamlit 1.29+ with:StreamlitAPIException: Invalid height 1px for st.text_area - must be at least 68 pixels.
Change
Nearby CSS still compresses the visual height; this only satisfies Streamlit API minimum.
Testing