aigroup-workflow 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,13 +88,13 @@ export async function multiSelect(message, choices) {
88
88
  return ` ${C.dim}↑↓ 移动${C.reset} ${C.dim}空格 选择${C.reset} ${C.dim}a 全选/取消${C.reset} ${C.dim}回车 确认${C.reset}`
89
89
  }
90
90
 
91
- // 总行数 = 选项行 + 提示行
92
- const totalLines = choices.length + 1
93
-
94
91
  function render(isFirst) {
95
92
  if (!isFirst) {
96
- // 光标在提示行末尾,先回到行首,再回退所有行,清除下方
97
- process.stdout.write(`\r\x1b[${totalLines}A\x1b[0J`)
93
+ // 光标在提示行末尾(无换行),清除当前行,再逐行回退并清除
94
+ process.stdout.write('\r\x1b[2K')
95
+ for (let n = 0; n < choices.length; n++) {
96
+ process.stdout.write('\x1b[1A\x1b[2K')
97
+ }
98
98
  }
99
99
  for (const [i, c] of choices.entries()) {
100
100
  process.stdout.write(renderLine(c, i) + '\n')
@@ -188,11 +188,12 @@ export async function select(message, choices) {
188
188
  return ` ${C.dim}↑↓ 移动${C.reset} ${C.dim}回车 选择${C.reset}`
189
189
  }
190
190
 
191
- const totalLines = choices.length + 1
192
-
193
191
  function render(isFirst) {
194
192
  if (!isFirst) {
195
- process.stdout.write(`\r\x1b[${totalLines}A\x1b[0J`)
193
+ process.stdout.write('\r\x1b[2K')
194
+ for (let n = 0; n < choices.length; n++) {
195
+ process.stdout.write('\x1b[1A\x1b[2K')
196
+ }
196
197
  }
197
198
  for (const [i, c] of choices.entries()) {
198
199
  process.stdout.write(renderLine(c, i) + '\n')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aigroup-workflow",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "AI 团队协作框架 — 通过角色派遣、工作流管道和 Harness 传感器驱动 AI 协作开发",
5
5
  "type": "module",
6
6
  "bin": {