Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- run: node node_modules/electron/install.js
- run: npm run check
- run: npm run check:public
- run: npm test
- run: node --test --test-concurrency=2 tests/*.test.js
- run: npm run build:release
- run: node scripts/verify-artifact.js dist/portable-marketplace/plugins/codex-continuer
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 本对话的版本约定

- 用户于 2026-11-05 更新约定:当前及后续更改统一记录为 `0.7.0`,在独立目录及本地分支 `codex/0.7.0` 开发;不要递增版本号或添加 preview 序号。保留 `0.6.0` 源码、构建和安装,不覆盖、不安装、不推送、不发布,除非收到新的明确指令。

- 用户于 2026-10-31 更新约定:当前及后续版本固定为 `0.6.0`,本地开发分支为 `codex/0.6.0`;不要自动递增或添加 preview 序号。下方旧版本约定仅作历史记录。
- 用户于 2026-10-31 明确授权本轮将最新源码及用户 README 同步到本地脱敏发布仓库后推送并合入公开 `main`。通过独立公开仓库和正常 PR 检查完成,不推送私有开发历史;此次不安装或发布 Release,之后默认仍只保存本地。
- assessment 和临时 `.review` 审查材料统一保存在被忽略的 `.cache/assessments/`;不要加入 Git 暂存区、提交或公开源码包。用户明确仅移走现有 `.review` 审查目录,`docs` 中的项目评估等正式文档保留。使用明确文件列表暂存,提交前检查列表。
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# 更新记录

## 0.7.0 — 本地开发

- 自动启动期间手动打开或点击托盘,窗口就绪后会显示到前台;启动期间退出会取消迟到的窗口创建和显示,并等待后台清理完成。
- 修复启动与恢复:中文及 Windows 短路径下正确停止监听器;自启动改用支持长参数的用户启动快捷方式,显式重新启用会清除退出标记;启动失败允许重试,手动打开恢复可见,旧监听器 PID 不再阻止恢复。
- 修复交互状态:旧保存响应不关闭新草稿,语言切换保留提交锁,详情刷新保留阅读位置与选择,设置连接状态和错误提示及时更新;服务重启后重新读取详情,延迟响应不覆盖较新的状态。
- 修复任务和显示:首次排队的一次性工作在额度恢复后执行一次;新建/导入保存失败可安全重试;详情未加载时明确提示,较早聊天可继续分页访问,重置位置立即生效,小挂件按实际额度周期显示。

- 回答续作可选择是否重复和本轮最多发送次数(1–100,包含首次);新记录默认只发一次,达到次数仅关闭回答监测。暂停、重启和编辑保留计数,明确重新开启回答监测开始新一轮且不重发旧回复。
- 回答监测与额度监测改为独立开关,卡片与监测设置均可操作;监测总开关保留用于总暂停。关闭一种不会停止另一种,全部发送仍受原聊天累计发送总上限约束。
- 独立开关与次数设置验证:独立副本 411 项完整回归通过,0 失败、0 跳过;包含两种界面真实 DOM、HTTP 保存、单次/重复、独立取消、重启、去重、次数耗尽和旧数据迁移。语法及公开源码检查通过。

- 第三轮自审修复:连续缩放中后续 IPC 请求失败时保留最新原生状态,避免旧结果使视图或尺寸回退;无新事件时保留最近确认结果,失败后可继续调整。新增失败复现与恢复回归,独立副本 401 项完整回归全部通过,语法及公开源码检查通过。

- 第二轮自审修复:小屏幕下调整卡片大小时保持窗口为正方形;展开/收起时取消上一视图排队中的拖动缩放,保留独立滑块设置。新增失败复现后完成修复,独立副本 400 项完整回归全部通过,语法及公开源码检查通过。

- 卡片和面板新增右下角拖动调整手柄及键盘微调;面板增加独立宽高滑块,尺寸分别保存,跟随、收起/展开和重启后保留,并按屏幕可用范围限制实际尺寸。
- 自审修复:分页读取历史后复查运行状态,避免读取期间开始的新回答被忽略;完整回答续作发送结果不明、重启恢复及保存重试时清除过时等待原因和重试时间。
- 尺寸调整与自审修复验证:独立源码副本 398 项完整回归全部通过,0 失败、0 跳过,包含真实隐藏 Electron 窗口尺寸、界面加载、跟随与切换;语法及公开源码检查通过。

- 监测新增「完整回答后继续」开关,默认关闭。根据最新轮次正常结束且形成完整最终回复判断本次指令结束,发送单独保存、可编辑的继续消息,留空使用当前语言的“继续”。
- 完整回答续作与额度恢复续作使用独立消息,同一完整回答只触发一次;两者共用累计发送上限,暂停、重新启用及重启均保留计数和去重记录。
- 发送前再次核对最新回答;暂停、调度关闭、断线、额度过期或新指令到来时取消尚未发送的消息。发送结果不明时停止自动重试。
- 新版本固定记录为 0.7.0,在独立本地分支与目录开发,保留 0.6.0 源码、构建及安装;本轮不安装、不推送、不发布。
- 验证:388 项完整回归全部通过(0 失败、0 跳过),包含真实隐藏 Electron 表单、独立数据持久化与重启、模拟发送竞态;语法与公开源码检查通过。

## 0.6.0 — 2026-10-31

- 汇总 0.5.1 发布后的数据目录、首次额度监测、演示窗口隔离、备份恢复及表单修复。
Expand Down
29 changes: 24 additions & 5 deletions Enable-Autostart.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,47 @@ New-Item -ItemType Directory -Path $continuerData -Force | Out-Null
$continuerRegistryKey = Get-Item -LiteralPath $continuerRegistry -ErrorAction SilentlyContinue
$continuerExisting = if ($continuerRegistryKey) { $continuerRegistryKey.GetValue($continuerName, $null) } else { $null }
if ($continuerExisting -and $continuerExisting -notmatch 'desktop[\\/]watch-codex\.ps1') { throw 'An unrelated startup item already uses the CodexContinuer name.' }
$continuerShell = New-Object -ComObject WScript.Shell
$continuerStartup = $continuerShell.SpecialFolders.Item('Startup')
$continuerShortcutPath = Join-Path $continuerStartup 'CodexContinuer.lnk'
$continuerShortcut = $continuerShell.CreateShortcut($continuerShortcutPath)
if ((Test-Path -LiteralPath $continuerShortcutPath) -and $continuerShortcut.Description -ne 'Codex Continuer startup') { throw 'An unrelated startup shortcut already uses the CodexContinuer name.' }
# Stop only the previous watcher identified by its saved PID and executable/script.
$continuerStatusPath = Join-Path $continuerData 'autostart-status.json'
if (Test-Path -LiteralPath $continuerStatusPath) {
try {
$continuerSaved = Get-Content -LiteralPath $continuerStatusPath -Raw | ConvertFrom-Json
$continuerSaved = Get-Content -LiteralPath $continuerStatusPath -Raw -Encoding UTF8 | ConvertFrom-Json
$continuerProcess = Get-CimInstance Win32_Process -Filter "ProcessId=$([int]$continuerSaved.pid)"
$continuerLegacy = $continuerProcess -and $continuerProcess.Name -eq 'powershell.exe' -and $continuerProcess.CommandLine.Contains((Join-Path $continuerSaved.pluginRoot 'desktop/watch-codex.ps1'))
$continuerNative = $continuerProcess -and $continuerProcess.Name -eq 'continuer-monitor.exe' -and $continuerProcess.ExecutablePath -eq (Join-Path $continuerSaved.pluginRoot 'desktop/continuer-monitor.exe') -and $continuerProcess.CommandLine -match '(?:^|\s)"?--watch"?(?:\s|$)'
$continuerNative = $continuerProcess -and $continuerProcess.Name -eq 'continuer-monitor.exe' -and $continuerProcess.ExecutablePath -and [IO.Path]::GetFullPath($continuerProcess.ExecutablePath) -eq (Join-Path ([IO.Path]::GetFullPath($continuerSaved.pluginRoot)) 'desktop/continuer-monitor.exe') -and $continuerProcess.CommandLine -match '(?:^|\s)"?--watch"?(?:\s|$)'
if ($continuerLegacy -or $continuerNative) { Stop-Process -Id $continuerProcess.ProcessId }
} catch { Write-Warning 'Could not stop the previous watcher. Its single-instance lock prevents duplicate watchers.' }
}
if ($Disable) {
if ($continuerExisting) { Remove-ItemProperty -Path $continuerRegistry -Name $continuerName }
if (Test-Path -LiteralPath $continuerShortcutPath) { Remove-Item -LiteralPath $continuerShortcutPath -Force }
@{ enabled = $false; updatedAt = (Get-Date).ToString('o') } | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $continuerData 'autostart-preferences.json') -Encoding UTF8
Write-Host 'Continuer startup disabled. Existing project work is unchanged.'
exit 0
}
if (-not (Test-Path -LiteralPath $continuerWatcher)) { throw 'Build/install the plugin before enabling startup.' }
$continuerPowerShell = Join-Path $env:SystemRoot 'System32\WindowsPowerShell\v1.0\powershell.exe'
$continuerArguments = '-NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File "{0}" -NodePath "{1}" -PluginRoot "{2}" -DataDir "{3}"' -f $continuerWatcher,$continuerNode,$continuerRoot,$continuerData
if (-not (Test-Path -LiteralPath $continuerRegistry)) { New-Item -Path $continuerRegistry -Force | Out-Null }
New-ItemProperty -Path $continuerRegistry -Name $continuerName -Value ('"' + $continuerPowerShell + '" ' + $continuerArguments) -PropertyType String -Force | Out-Null
# Startup shortcuts support the full argument list; Run values have a short
# command-line limit that long plugin/data paths exceed.
New-Item -ItemType Directory -Path $continuerStartup -Force | Out-Null
$continuerShortcut.TargetPath = $continuerPowerShell
$continuerShortcut.Arguments = $continuerArguments
$continuerShortcut.WorkingDirectory = $continuerRoot
$continuerShortcut.Description = 'Codex Continuer startup'
$continuerShortcut.WindowStyle = 7
$continuerShortcut.Save()
if (-not (Test-Path -LiteralPath $continuerShortcutPath)) { throw 'Could not save the startup shortcut.' }
if ($continuerExisting) { Remove-ItemProperty -Path $continuerRegistry -Name $continuerName }
# Explicit enable is a new user request; passive Codex launches still leave the
# exit latch intact until the user enables startup or opens Continuer manually.
$continuerQuit = Join-Path $continuerData 'quit.request'
if (Test-Path -LiteralPath $continuerQuit) { Remove-Item -LiteralPath $continuerQuit -Force }
@{ enabled = $true; updatedAt = (Get-Date).ToString('o') } | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $continuerData 'autostart-preferences.json') -Encoding UTF8
Start-Process -FilePath $continuerPowerShell -ArgumentList $continuerArguments -WindowStyle Hidden | Out-Null
Write-Host 'Enabled for the current user: Continuer opens whenever Codex desktop starts.'
Write-Host 'Startup registered for the current user. Watcher launch requested; open Continuer to check its status.'
9 changes: 8 additions & 1 deletion desktop/geometry.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ function expandFromCard(card, workArea, size) {
return { x: align(card.x, card.width, workArea.x, workArea.width, width), y: align(card.y, card.height, workArea.y, workArea.height, height), width, height };
}
function compactSize(value) { return Number.isFinite(value) ? Math.min(420,Math.max(160,Math.round(value))) : 256; }
function expandedSize(value) {
return {
width: Number.isFinite(value?.width) ? Math.min(960,Math.max(360,Math.round(value.width))) : 432,
height: Number.isFinite(value?.height) ? Math.min(1200,Math.max(400,Math.round(value.height))) : 720,
};
}
function samePlacementContext(a,b) {
return !!a && a.mode===b.mode && a.follow===b.follow && a.compactSize===b.compactSize &&
a.panelWidth===b.panelWidth && a.panelHeight===b.panelHeight &&
(!a.follow || ['x','y','width','height'].every(key=>a.anchor?.[key]===b.anchor?.[key]));
}
function restoreModePosition(fallback,saved,workArea) {
Expand All @@ -43,4 +50,4 @@ function restoreModePosition(fallback,saved,workArea) {
? {...fallback,x,y} : fallback;
}
const sizes = { compact: { width: 256, height: 256 }, expanded: { width: 432, height: 720 } };
module.exports = { place, placeIndependent, expandFromCard, offsetFrom, sizes, compactSize, samePlacementContext, restoreModePosition };
module.exports = { place, placeIndependent, expandFromCard, offsetFrom, sizes, compactSize, expandedSize, samePlacementContext, restoreModePosition };
Loading
Loading