初始化提示流程

This commit is contained in:
2026-04-21 17:08:42 +08:00
commit fc8557f2a9
36 changed files with 2934 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# session-init.ps1 — 会话启动时检测 composer_mode非 agent 模式设置跳过标志
#
# sessionStart input 包含 composer_mode 字段("agent" / "ask" / "edit" / "debug" 等)
# 通过 env 输出的环境变量会传递给同会话内所有后续 hook
$input = [Console]::In.ReadToEnd()
try {
$data = $input | ConvertFrom-Json
$mode = $data.composer_mode
} catch {
$mode = $null
}
Remove-Item ".cursor\changelog\.changelog-ack" -ErrorAction SilentlyContinue
if ($mode -and $mode -ne "agent") {
$json = '{"env":{"CURSOR_SKIP_CHANGELOG":"1","CURSOR_COMPOSER_MODE":"' + $mode + '"}}'
Write-Output $json
} else {
Write-Output '{}'
}
exit 0