Repository navigation
feat(agent-companion): 权限等待提醒改读客户端状态行,修会话生命周期与音效 - #121
Open
Demons12341 wants to merge 2 commits into
Open
Demons12341 wants to merge 2 commits into
Demons12341 wants to merge 2 commits into
Conversation
新增 log_watch.rs 读插件宿主 agent 日志状态行 running -> waiting_user_input 精确进出待确认;新增 workspace_history.rs 按会话 id 反查工程目录;SessionEnd 不再误 abort 多会话;hub 增加 STALE_IDLE/WAIT_EXPIRY 兜底;宿主按类型播系统 wav;Windows hook 引号形态改为双引号+正斜杠。
Windows 上 open_session_target 用裸 Command::new 拉起 powershell.exe / code.cmd(批处理),未加 CREATE_NO_WINDOW,每次悬浮窗跳转都会闪一个 cmd 窗口。新增 spawn_command() 统一加 0x0800_0000,并替换该文件全部 Command::new 调用点(macOS/Linux 透传)。
This branch has not been deployed
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.
范围是
vendor/agent-companion/(Agent Studio)。权限等待提醒(核心)
客户端弹「需要你允许 / 是否仍要运行?」时不发 hook(
Notification/permission_prompt那条链路在客户端里是死代码),以前只能靠「工具开始后长时间没有反馈」去猜。log_watch.rs:读插件宿主 agent 日志的状态行running → waiting_user_input(弹窗那一刻写、带会话 id)精确进出「待确认」;waiting_user_input → running解除[SafetyRule] Dangerous command detected+ 匹配刚收到的 PreToolUse」通路:实测那行是点完确认之后才落盘,按它触发只会「确认后提示、随即一闪而过」roundId),否则 hub 的permission_resolve定位不到那条 pendingpermission-check.ts90s → 45s,来源纳入codebuddy-ide)会话生命周期
SessionEnd不再把会话置为aborted:新建/切换会话、finalize 都会发它,且 payload 用的是全局唯一的 sessionId,不代表后台任务真结束(实测「新建对话」会让仍在后台跑的旧会话收到 SessionEnd)。改为由Stop(回合结束 → done)收敛,hub 加STALE_IDLE = 5min兜底(Codex 仍用 45min)WAIT_EXPIRY = 15min:未被解决的权限等待不会永远挂着workspace_history.rs:按会话 id 从genie-history桶名反查真实工程目录(hook 的cwd在 IDE 未打开目录时给的是安装目录,会顶掉用户原有窗口)音效与其它
monitor-alert事件;snd模块按告警类型播系统 wav(WindowsPlaySoundW(零新依赖)、macOSafplay),需要确认 / 完成用感叹音、失败用错误音(系统音色别名在多数主题里会指向同一个文件,用户反馈过两者听感一样)quote_path改为双引号 + 正斜杠:cmd.exe不认 POSIX 单引号,而 MSYS bash 里反斜杠又是转义雷区;保留hook_command_legacy仅用于识别旧安装并在重装时清理rail-controller.ts:待确认卡片点 ✕ 改为结束本轮监听(closePendingRound)而非只静音,否则卡片会一直挂着「待确认」再也消不掉desktop/session.rs(Windows):vscode_history_roots/activate_app/open_vscode_folder,用code <folder>而非-r,避免顶掉已打开该目录的窗口.gitignore:忽略vendor/agent-companion/dist-embed2/