Skip to content

4项功能更新: Session修复 • Firefox CDP兼容 • /todo命令 • ga sync#532

Open
GiftedScout wants to merge 4 commits into
lsdefine:mainfrom
GiftedScout:main
Open

4项功能更新: Session修复 • Firefox CDP兼容 • /todo命令 • ga sync#532
GiftedScout wants to merge 4 commits into
lsdefine:mainfrom
GiftedScout:main

Conversation

@GiftedScout
Copy link
Copy Markdown

变更概览

1. 🐛 Session.is_active() 递归修复

  • 修复 is_active()mark_disconnected()is_active() 无限递归
  • TMWebDriver.py

2. 🦊 Firefox CDP Bridge 兼容

  • chrome.debugger API 不存在时优雅降级(Firefox 兼容)
  • 拆分 Chrome/Firefox 独立 manifest(manifest.chrome.json / manifest.firefox.json)
  • 修复 Firefox 扩展 CSP、service_worker → scripts、gecko id

3. 📋 /todo 命令 (TUI v2 & v3)

  • 共享 frontends/todo_cmd.py 模块
  • todo add | ls | run | del 完整工作流
  • 数据持久化到 temp/user_todo.json

4. 🔄 ga sync 安全更新 + 剪贴板复制

  • ga sync: stash → pull → pip install → stash pop 自动化
  • 冲突自动合并(保留双方代码)
  • Ctrl+Shift+C 复制选中文本
  • ga tui 默认启动 tuiapp_v2.py

提交记录

ea62e79 feat: ga sync command with auto-merge + clipboard copy
429fca4 feat: /todo command for TUI v2 & v3 with persistent storage
4635997 feat: Firefox CDP Bridge compatibility + split browser manifests
eba8f11 fix: prevent infinite recursion in Session.is_active() / mark_disconnected()

pushuai added 4 commits May 29, 2026 17:57
…ected()

- is_active(): directly set disconnect_at instead of calling mark_disconnected()
  which would call is_active() again → infinite recursion
- mark_disconnected(): check self.disconnect_at directly instead of is_active()
- connected(): fix dead string literal (no-op) to actual print
- background.js: guard chrome.debugger API (not available in Firefox)
  with graceful fallback instead of crash
- manifest.json: adapted for Firefox (no debugger permission, scripts
  instead of service_worker, explicit CSP for ws://, added gecko id)
- manifest.chrome.json: standalone Chrome manifest with full permissions
- manifest.firefox.json: standalone Firefox manifest (gecko-specific)
New /todo command (frontends/todo_cmd.py) shared by both TUI versions:
  /todo add <text>  → 添加
  /todo ls           → 列表
  /todo run          → 选择执行(执行后自动消除)
  /todo del          → 选择删除
- Data persisted to temp/user_todo.json
- v2: tuiapp_v2.py with _cmd_todo, _do_todo_*, and COMMANDS entry
- v3: tui_v3.py with /todo dispatch and full i18n support
ga sync: safe update workflow
  - git stash local changes → git pull → pip install -e . → stash pop
  - Auto-resolve merge conflicts using keep-both strategy
  - Graceful rollback on unresolvable conflicts
  - 'ga tui' now defaults to tuiapp_v2.py

tuiapp_v2.py UX improvements:
  - Ctrl+Shift+C copies selected text to clipboard
  - Middle-click (button=2) also triggers paste (like right-click)
  - Explicit ctrl+enter/shift+enter newline handling
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