Highlights
- Web frontend rebuilt with a multi-session concurrent architecture: each session has its own engine, so you can create or switch sessions and run tasks in parallel while one is still running
- Sidebar session state visuals: active sessions get a soft primary background with a thin border; running sessions get a cyan beam flowing along the border, with clear layering in both light and dark themes
- Rewind enhancement: the rewound user message is restored into the input box (the Nth-from-last message as the recovery point), supported in both terminal and web
- Tool result rendering: ANSI colors display correctly, and the transcript refreshes immediately after compact
New Features
- Web multi-session concurrency — session line tasks run concurrently and isolated per session; switching sessions is instant and local; stop only affects the target session
- Sidebar session state styles — visual distinction for active / running sessions (BorderBeam-style beam border, degrades gracefully with prefers-reduced-motion)
- Rewind restores input — the rewound user message is filled back into the input box for re-editing
- ANSI color rendering in tool results — colored output from bash and other tools displays correctly
- CamelCase tool display names — grep/glob show as Grep/Glob, web_fetch shows as WebFetch
Important Fixes
- Stop mechanism race — the session tracker is cleared after stopping, preventing auto-resume from reviving the conversation (the occasional "cannot stop" issue)
- Checkpoint cross-process race — context.jsonl appends are protected by a cross-process file lock; multiple instances / tabs no longer corrupt lines
- Compact data loss — rebuild is now atomic (temp file + os.replace), fixing the severe bug where context files became 0 bytes after compact
- Compact transcript refresh — web transcript is replaced immediately after compaction, aligned with the backend engine state
- Question card interactions — single-select no longer submits on click, multi-select gets a confirm button, and blur double-submit is guarded
- Restore / switch robustness — frontend 10s restore timeout fallback, evicted sessions auto re-materialize, failed restores close the engine
- Settings broadcast — permission mode / model / effort changes propagate to all session engines (plan mode can no longer be bypassed)
Refactoring
- Background tasks track their owning session (ContextVar stamp); completion notifications route by ownership
- Global state snapshots no longer carry session-scoped fields; usage data is pushed per session
- Sidebar todo icons drop the scale animation; scrollbars hidden to avoid layout shifts
Installation
pip install --upgrade illusion-agent
重点更新
- Web 端重构为多会话并发架构:每个会话独立引擎,运行任务时可随时新建/切换会话并行处理,互不阻塞
- 侧栏会话状态视觉优化:活跃会话主色淡背景+细边框,运行中会话青蓝光束流动边框,深浅主题层次分明
- rewind 回退增强:被回退的 user 消息自动回填输入框(返回倒数第 N 轮的恢复点消息),terminal 与 web 同步支持
- 工具结果显示增强:ANSI 颜色正常渲染,compact 压缩后转录即时刷新
新功能
- Web 多会话并发 — 会话行任务按会话隔离并发执行,切换会话纯本地瞬时,停止任务只作用于目标会话
- 侧栏会话状态样式 — 活跃/运行中会话的视觉区分(BorderBeam 光束边框,prefers-reduced-motion 降级)
- rewind 回填输入框 — 回退后被回退轮次的 user 消息回填输入框,支持重新编辑续写
- 工具结果 ANSI 渲染 — bash 等彩色输出正常显示颜色
- 工具名驼峰显示 — grep/glob 显示 Grep/Glob,web_fetch 显示 WebFetch
重要修复
- 停止机制竞态 — 停止任务后清空会话 tracker,杜绝 auto_resume 复活对话(无法终止的偶发问题)
- checkpoint 跨进程竞态 — context.jsonl 追加加跨进程文件锁,多实例/多标签页不再交错损坏
- compact 数据丢失 — 重建改为原子写入(临时文件+os.replace),修复压缩后 0 字节丢数据的严重问题
- compact 转录刷新 — web 端压缩后前端转录即时替换,与后端引擎状态对齐
- 问答卡片交互 — 单选防误触、多选确认按钮、失焦双提交守卫
- 恢复/切换健壮性 — 前端恢复 10s 超时兜底、淘汰会话自动重新物化、恢复失败关闭引擎
- 设置广播 — 权限模式/模型/effort 变更同步到所有会话引擎(计划模式不再被绕过)
重构
- 后台任务归属会话追踪(ContextVar stamp),完成通知按归属路由
- 全局状态快照剔除会话字段,用量数据按会话推送
- 右栏待办图标去除放大缩小动画,滚动条隐藏避免布局微动
安装
pip install --upgrade illusion-agent