Commit Graph
1948 Commits
Author SHA1 Message Date
acaicai 677f0cf608 chore(design): relax implementation flow 2026-09-01 19:57:21 +08:00
acaicai 002ee2bf95 fix(design): route preview edits to safe sources 2026-09-01 19:57:11 +08:00
acaicai c6b1c80d77 chore(design): sync tiered flow changes 2026-09-01 17:09:53 +08:00
acaicai 1be09a3a4a fix(design): persist preview element edits safely 2026-09-01 11:08:14 +08:00
acaicai bf4d9cf55b feat(design): optimize design flow routing 2026-08-31 19:36:35 +08:00
acaicai 41ec635666 fix(design): honor template-free requests 2026-08-31 15:20:15 +08:00
xiaomakuaiz 1bedfaa7c2 Merge pull request #1186 from xiaomakuaiz/feat/mobile-math-rendering
Feat/mobile math rendering
2026-08-30 20:13:43 +08:00
xiaomakuaiz c070f50f5f fix(mobile): trim history overlapping the live round at the boundary
Re-entering a running task can surface the current round twice around
the attach window: REST backfill / locally archived messages and the
attach replay both carry the round's opening (decoded ids are freshly
generated, so key-based dedupe is impossible), which visually wedges the
round's user input into the middle of the streaming output. Cut history
at the live stream's first timestamped message - the active round is
sourced from the live stream only.
2026-08-30 20:08:23 +08:00
xiaomakuaiz f2fc4e43c0 fix(mobile): render tall delimiters and long block derivations
- fontCache 'none': MathJax's 'local' cache emits <defs>/<use> glyph refs,
  and assembled tall delimiters (S4 segments) reference outer templates
  from inside nested <svg> viewports - react-native-svg's template scope
  breaks across nested svg, so brackets lost segments and the native side
  spammed 'template not defined' warnings every streaming frame (which
  also kept dirtying React's passive-update counter via LogBox updates,
  resurfacing the Maximum update depth warning). Inlining every glyph
  path removes cross-scope references entirely; the LRU caches absorb
  the larger output.
- Separate block-math source budget (4096 chars vs 512 inline): multi-row
  aligned derivations routinely exceed 512 and fell back to raw source;
  the 60ex output-height clamp still bounds the rendered result.
2026-08-30 19:50:24 +08:00
xiaomakuaiz 4864d420a7 Merge pull request #1185 from xiaomakuaiz/chore-update-plugin
update plugins
2026-08-30 19:18:08 +08:00
xiaomakuaiz fbc00891b6 fix(mobile): make long formulas fully visible and touchable
- Promote whole-line single-line $$…$$ / \[…\] to block math (desktop
  promotes display math via CSS; inline views clip at screen edge with
  no way to scroll). Lines mixing text keep inline parsing.
- Scale inline math down to the available width; block math scales to
  fit one screen (no in-list horizontal scrolling - the vertical list
  always wins the gesture arbitration).
- Over-shrunk block formulas open a fullscreen viewer on tap: backdrop
  and ScrollView are siblings (a Pressable ancestor steals the drag on
  Android and closes the modal on release), wide hit strip, back-key
  close.
- pointerEvents:none on all math SVGs: react-native-svg's Android
  SvgView.interceptsTouchEvent() unconditionally claims touches, which
  blocked scrolling, tap-to-expand and long-press copy over formulas.
- Raise the output height clamp to 60ex so multi-line aligned
  derivations survive while \rule bombs (100ex) stay rejected.
2026-08-30 19:11:28 +08:00
xiaomakuaiz 446b8744ac fix(mobile): stop duplicate rounds when loading earlier history
Two probabilistic duplication vectors (decoded message ids are freshly
generated per decode, so duplicates cannot be deduped by key):

- loadEarlier guarded re-entry with async React state; the auto-prefill
  effect and the inverted list's initial onEndReached could both pass the
  guard in the same frame and fetch the same cursor page twice. Guard
  with a ref (synchronous).
- In cursorless sessions, handleSend archives the previous live round
  locally, then the REST fallback seeded a cursor that still covered the
  archived rounds, so paging up re-fetched them. Track archived round
  count, skip that many when seeding, drop stale seeds, and stop hc
  re-seeding once local archives exist.
2026-08-30 19:10:47 +08:00
xiaomakuaiz b2cf106790 update plugins 2026-08-30 18:25:51 +08:00
xiaomakuaiz ec75eeddc5 Merge pull request #1184 from chaitin/feat/design-preview-workbench
Feat/design preview workbench
2026-08-30 18:21:57 +08:00
xiaomakuaiz eef60f2c36 chore(desktop): 删除已退役的旧 UI 工程 desktop/ui
- 旧工程自 ui-next 出货后仅冻结保活,已不参与打包(tauri.conf.json
  beforeBuildCommand 指向 ui-next);按既定 P9 计划 git rm
- CI 连同 ui-legacy job 一起删除;命令契约扫描收敛为 UI_ROOTS=(ui-next,)
- main.rs/检查脚本注释同步更正指向
2026-08-30 18:20:41 +08:00
xiaomakuaiz ab326c8dab feat(desktop): 会话右侧统一侧边栏与本地终端
- 文件/变更/终端/预览收进统一右侧侧边栏(SidePanel):顶部扁平 tab、左缘
  拖宽,header 只留一颗开合钮;FilesDrawer 浮层退役,FilesPanel 改为左树
  右预览(树列可拖宽,树/变更共用刷新钮——已加载目录全量重拉且展开保留)
- 本地终端:壳侧 term.rs(portable-pty,term_open/write/resize/title/close,
  输出走 term-data:{id} 事件,监听先于命令);UI 侧 termStore 模块级持久化
  ——收侧边栏/切会话不杀 shell,多实例页签,标题跟随前台进程(shell 自发
  OSC 则以 OSC 为准),会话删除整组清场;不自动启动,由用户显式新建
- 云端任务同构:CloudFiles/终端收进侧边栏 tab,终端移出 composer 上方
- 设计预览工作台嵌入「预览」tab(原「浏览器」改名):宽度/关闭上收侧边栏,
  轮末自动预览与 markdown localhost 链接自动拉开侧边栏并切 tab
- 另含同分支并行进行中的 composer/attLine/LogList 改动(WIP)
2026-08-30 18:11:56 +08:00
xiaomakuaiz 71dcacc325 update agent 2026-08-30 18:09:15 +08:00
xiaomakuaiz 7c943b1994 fix(mobile): address review findings for math rendering and stream lifecycle
Review-driven batch on top of the math feature:

- Ask-card custom answer: scroll the card above the keyboard on input
  focus (inverted-list scrollToIndex, viewPosition 0).
- Inline math boundaries: closing-$ guard switched to a negated class so
  bold-wrapped/operator-adjacent formulas (**$E=mc^2$**, $a$-$b$) and
  han-adjacent Chinese phrasing render; CJK/full-width punctuation
  excluded from $-content to kill currency false positives.
- Clamp MathJax output size (rule-bomb guard), reject empty $$ blocks,
  clamp throttle elapsed against clock steps, and gate O(n^2) slicing in
  the inline tokenizer behind a first-char check.
- Streaming perf: stable body root key + content-hash node keys keep
  top-level formulas mounted across re-parses; TeX->SVG and parsed-AST
  LRU caches; memoized markdown style object.
- Android: scale inline formulas into the fixed line box and drop the
  baseline shift (CustomLineHeightSpan overlaps oversized inline views).
- handleSend snapshots the disconnect() return so throttled tail chunks
  are archived; effect cleanup also disconnects the newRound client;
  failPendingToolCalls replaces message objects so memoized tool cards
  observe the status flip.
- Swap @babel/plugin-transform-dynamic-import to the ^7 line (the ^8
  line is Babel-8/ESM-only and breaks installs and jest on older Node).
2026-08-30 17:52:36 +08:00
acaicai cb8e92966e fix(design): clear stale selection before marking 2026-08-30 13:51:15 +08:00
acaicai 3e1193f35f feat(design): add design preview workbench 2026-08-30 13:51:15 +08:00
xiaomakuaiz 340ef5b73e Merge pull request #1182 from xiaomakuaiz/feat-agent-session
Feat agent session
2026-08-30 13:48:36 +08:00
xiaomakuaiz a114de9f93 chore(desktop): 版本号 26083001 2026-08-30 13:36:55 +08:00
xiaomakuaiz ddfd73f6f3 feat(desktop): 后台状态条多代理展开与用户词汇归一
- 状态条取材改为全部 run+background 派发卡:单代理摘要内联;多代理收起
  为计数,可展开逐代理一行(摘要/耗时/各自查看子会话入口),对齐工具卡组
  「×N 展开」形态;签名 useMemo 稳定引用不击穿 Composer memo
- 用户词汇按「代理=执行者,任务=清单项」正交归一:SendMessage 卡改
  「唤醒后台代理」,结果卡「后台代理结果」,状态条「N 个后台代理运行中」,
  轮末/中断文案与 driver 对账帧正文同步;TaskStop 改「停止后台代理」;
  「任务」让位给清单域(TaskCreate 一族不动);en 侧同步 background agent
- spec 三份文档词汇同步;新增多代理展开/递减集成用例
2026-08-30 13:36:55 +08:00
xiaomakuaiz c6d3498ed8 update agent 2026-08-30 12:48:35 +08:00
xiaomakuaiz cd7de02eb7 feat(desktop): 后台任务三态在场感知与孤儿对账
主 agent 轮次结束但后台子代理未回完成通知时,会话不再被呈现为"对话已结束":

- 会话第三态 background:轮末 pending 非空时 sidecar/session-event 不回 idle,
  通知清理后收敛;driver 从 SubagentState 派生,引擎无需改动
- composer 空闲态常驻后台状态条(任务数/摘要/耗时进位/查看子会话入口,
  输入保持可用,受断连门控);轮末分隔线换 turnEndBg 语义变体;
  后台运行卡从 runningTools 拆出,修复 runningLabel 被钉卡误报
- 派发回执/对账终态携带结构化标记(backgroundLaunch/backgroundInterrupted),
  reducer 优先认标记,回执中文嗅探降级为存量 journal 回放兜底
- sidecar 持久化 pending 条目;会话打开时双来源对账孤儿派发卡
  (sidecar 条目 + 回放窗口帧考古,对表 reducer 关卡语义),
  补「已中断」终态并归一遗留状态,杜绝永久转圈的僵尸卡/状态条
- spec: .monkeycode/specs/desktop-background-agent-presence
  (P1 完成;P2 侧栏徽标+系统通知、P3 publishEvent 停止待做)
2026-08-30 12:47:53 +08:00
xiaomakuaiz e864edb8b6 Merge pull request #1178 from xiaomakuaiz/feat/desktop-skill-import
Feat/desktop skill import
2026-08-29 16:57:17 +08:00
xiaomakuaiz 7150f70a23 fix(desktop): make source identity backfill symmetric on Windows
上一提交只在 open_root/open_archive 单侧回填 volume/file-index,后续
复核路径重新计算的身份仍是 0,一比对必然报"来源(句柄)在检查后发生
变化",Windows 上选文件夹/ZIP 导入直接不可用。

现在身份补查下沉到 stable_from_metadata/source_identity 本身:所有
构造点(枚举、打开前 lstat、打开后句柄复核、根校验)一律经同源的
file_identity/open_file_identity 回填,路径侧与句柄侧取到的
volume/file-index 可直接比对;查询失败统一退化为 0,比对仍一致。
verify_root_path 因此恢复为全平台按对象身份比对。
2026-08-29 00:06:44 +08:00
xiaomakuaiz 1d6628b488 fix(mobile): coalesce stream emits to stop update-depth warnings
Replaying long conversations emits hundreds of per-chunk state updates,
driving back-to-back commits whose passive-effect flushes keep React's
nested-update counter climbing (Maximum update depth exceeded warning).
Throttle TaskStreamClient.emit with a leading+trailing 50ms window
(flushed on disconnect so terminal states still land), and key the
context-usage effect on primitive values instead of the per-emit
contextUsage object identity.
2026-08-28 23:37:06 +08:00
xiaomakuaiz 980600235d feat(mobile): render math formulas in AI replies
Tokenize $...$, $$...$$, \(...\) and \[...\] via a markdown-it plugin
(delimiter semantics aligned with desktop), render TeX to SVG with a
lazily-loaded MathJax pipeline (LRU-cached, budget-guarded) and draw it
natively through react-native-svg; inline math flows with text baseline,
block math centers and scrolls horizontally. Falls back to source text
until MathJax is ready or when conversion fails.
2026-08-28 23:36:48 +08:00
xiaomakuaiz b3a1350f1e refactor(desktop): unify staging platform backends on std fs
- folder.rs (2326→1618 行): 来源根三套平台句柄机(unix openat 链/
  Windows NtCreateFile 组件链/fallback)统一为一套 std 实现;不再钉
  来源句柄或以受限共享打开用户文件——解压工具/网盘持有写句柄时导入
  不再报共享冲突。枚举配额、symlink/特殊对象拒绝、清单前后比对全保留。
- archive.rs: ZIP 来源同样统一为 std 全共享打开;zip-slip/配额/结构
  防线逐项保留并有测试钉住。
- commands.rs secure_tree: 暂存树读取/指纹从 unix-only 句柄相对实现
  (Windows 曾整体 stub 为"不支持")统一为 std 实现,Windows 的导入文
  件预览与指纹复核首次真正可用。
- config.rs: 新增 file_identity(Windows 经全共享句柄开-查-关取
  volume/file-index),回填文件夹/ZIP 来源根身份,非 unix 平台的
  SourceKey 去重不再退化为常量。
- 契约测试改为断言 NT/句柄机不回归;crate 内不再有任何 windows::Wdk
  与导入侧 rustix 相对句柄代码。
2026-08-28 23:30:14 +08:00
xiaomakuaiz 91132b4120 refactor(desktop): collapse skill store locks to a plain fs2 lock
skills.lock 的三套平台锁(unix 父目录锚锁+identity 复核 / Windows 命名
mutex+受限共享+identity 复核 / fallback)统一为一个跨平台 fs2 咨询锁,
锁文件以完全共享模式打开。锁路径替换检测随之废弃:能替换 skills.lock
的程序同样能直接改技能库,该检测换不来防御,受限共享模式反而是
Windows 句柄互斥故障面。同时删除 config.rs 中已无调用者的 NT 层
rename 助手。
2026-08-28 22:55:21 +08:00
xiaomakuaiz 31bd85de89 refactor(desktop): simplify skill import to validate+copy+swap
- skill_import/store.rs: 三套平台实现(unix openat 链/Windows NT 相对
  句柄/fallback)统一为一套 std 路径实现;FixedStagedSkillRoot 不再钉
  句柄,改为前后快照(大小/mtime/内容 hash)比对,API 外形不变。长期
  share-READ 句柄与提交阶段 rename/删除互斥正是 Windows os error 32
  的根因。symlink/特殊对象仍在扫描、复制、读取每层被拒。
- skill_transactions.rs (3373→318 行): 安装改为「校验 → 临时目录完整
  拷贝 → 旧目录挪 trash → rename 就位」,失败自动回摆;事务日志/隔离
  区/多阶段恢复机删除;历史版本残留(.skill-imports/.skill-backups/
  .skill-transactions 与临时 sibling)盘点时 best-effort 清扫。
- skills.rs: read()/导入入口不再做事务盘点与自动恢复;恢复 IPC 保留
  外形(列表恒空,resolve 明确报无待恢复项);revision write-ahead
  失效不变量与注入测试保留。
2026-08-28 22:48:13 +08:00
xiaomakuaiz 16be5a480f refactor(desktop): simplify skill materialization to temp+swap
物化从多阶段事务机(journal/digest/恢复/回滚/崩溃边界/每文件 fsync/
自定义句柄 rename)简化为:建 temp sibling → 旧树挪 trash → std rename
就位 → best-effort 清理。技能目录是可重建缓存,中途崩溃下次整树重建
并清扫残留(含旧版本事务机留下的 sibling 与 journal 文件)。

保留:祖先链/普通目录校验、技能名校验、Windows 瞬态占用退避重试。
删除约 700 行事务机与对应机制测试;行为测试(子集物化、会话隔离、
symlink 拒绝、幂等重物化)保留或改写。
2026-08-28 22:14:02 +08:00
xiaomakuaiz ce44b38b60 fix(desktop): retry transient Windows file locks in skill pipelines
- 实时防护/索引器会短暂持有刚写入的文件,按路径重开报共享冲突或拒绝
  访问(os error 32/5);把固定 5x60ms 的 rename 重试推广为约 1.4s 退避
  的通用原语,覆盖 sync_file 写打开、物化/事务 rename、replace_file
  与两处递归删除
- open_nofollow_file 放开 FILE_SHARE_WRITE:指纹校验句柄不再把同一
  文件的 sync_file 写打开挡成共享冲突,写竞态由双指纹复核兜底
- MoveFileExW 错误经 HRESULT 还原 raw os error,重试分类与报错文案
  都能拿到 "(os error N)"
2026-08-28 21:11:04 +08:00
xiaomakuaiz bde2e61099 fix(desktop): switch skill renames to NT level and fix rollback ambiguity
- kernelbase 的 SetFileInformationByHandle 拒绝非 NULL RootDirectory
  (线上 0x80070057),固定父句柄 rename 改走 NtSetInformationFile
  (FileRenameInformation);网络重定向器不支持该形态时降级为复核后的
  路径式 rename,NTSTATUS 经 RtlNtStatusToDosError 还原 os error
- 回滚判定 target_is_old 优先:技能集未变时新旧树指纹相同,不再误判
  "新树已安装"去找不存在的 backup(线上"缺少完整旧备份"报错根因)
- 新旧树内容一致时物化短路,不做备份/安装,升级/重开会话不再搬动 target
- 目录 rename 对瞬态占用(拒绝访问/共享冲突)退避重试
2026-08-28 20:16:39 +08:00
xiaomakuaiz a7262bfad0 fix(desktop): allow Windows skill directory rotation 2026-08-28 19:07:56 +08:00
xiaomakuaiz 0a6ff6fb76 fix(desktop): harden cross-platform skill materialization 2026-08-28 17:54:01 +08:00
xiaomakuaiz 9519923777 update agent 2026-08-28 16:53:43 +08:00
xiaomakuaiz 8fde598148 fix(desktop): disable running skill picker 2026-08-28 16:50:17 +08:00
xiaomakuaiz 627a1d93b2 refactor(desktop): remove legacy skill compatibility 2026-08-28 16:12:41 +08:00
Yoko 8520432801 Merge pull request #1176 from chaitin/fix-email-case-insensitive-login
修复账号密码登录邮箱大小写敏感问题
2026-08-28 14:57:52 +08:00
yokowu 132c87487c 修复密码登录邮箱大小写敏感问题 2026-08-28 14:49:48 +08:00
xiaomakuaiz 3f47c668c5 fix(desktop): refine skills settings copy 2026-08-28 13:56:56 +08:00
xiaomakuaiz 778b9d050b fix(desktop): contain send queue actions 2026-08-28 12:20:00 +08:00
xiaomakuaiz 421dad1e11 fix(desktop): harden skill import and recovery 2026-08-28 11:38:19 +08:00
xiaomakuaiz c08a8d0b55 fix(desktop): remove send queue action gap 2026-08-28 00:08:12 +08:00
xiaomakuaiz bf0a97b931 feat(desktop): add response copy action 2026-08-27 23:52:16 +08:00
xiaomakuaiz 874d54d996 fix(desktop): keep history available during skill recovery 2026-08-27 23:22:32 +08:00
xiaomakuaiz d1603c250a fix(desktop): enforce single instance on Windows and Linux 2026-08-27 21:51:13 +08:00
xiaomakuaiz 3f15cfb20b fix(desktop): silence test-only skill warning 2026-08-27 21:50:28 +08:00