@ghyper9023/pi-dev-workflow 0.3.1 → 0.4.0

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.
@@ -13,6 +13,7 @@
13
13
 
14
14
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
15
15
  import { discoverAgents, spawnSubagent, extractFinalOutput, type AgentDef } from "./sub-agents";
16
+ import { uiInput } from "./ui-helpers";
16
17
 
17
18
  // ── Helpers ──────────────────────────────────────────────────
18
19
 
@@ -165,18 +166,13 @@ export default function (pi: ExtensionAPI) {
165
166
 
166
167
  let message = args.trim();
167
168
  if (!message) {
168
- const input = await ctx.ui.input("Commit message", {
169
- placeholder: "直接回车让 AI 自动生成,或输入信息后提交...",
170
- required: false,
171
- });
169
+ const input = await uiInput(ctx, "Commit message", "直接回车让 AI 自动生成,或输入信息后提交...");
172
170
  if (input === undefined) {
173
- ctx.ui.notify("Commit cancelled", "warning");
174
171
  return;
175
172
  }
176
173
  message = input.trim();
177
174
  }
178
175
 
179
- ctx.ui.notify("🤖 正在委派 git-sub-agent 处理...", "info");
180
176
 
181
177
  const task = message
182
178
  ? `Stage all changes with git add -A, then commit with message: "${message}". Do NOT ask for confirmation.`
@@ -193,7 +189,6 @@ export default function (pi: ExtensionAPI) {
193
189
  const agent = getAgent(ctx, gitAgent, "git-agent");
194
190
  if (!agent) return;
195
191
 
196
- ctx.ui.notify("🤖 正在委派 git-sub-agent 处理...", "info");
197
192
  await runSubAgent(
198
193
  agent,
199
194
  "Push commits to remote with git push. Do NOT ask for confirmation.",
@@ -211,18 +206,13 @@ export default function (pi: ExtensionAPI) {
211
206
 
212
207
  let message = args.trim();
213
208
  if (!message) {
214
- const input = await ctx.ui.input("Commit message", {
215
- placeholder: "直接回车让 AI 自动生成,或输入信息后提交并推送...",
216
- required: false,
217
- });
209
+ const input = await uiInput(ctx, "Commit message", "直接回车让 AI 自动生成,或输入信息后提交并推送...");
218
210
  if (input === undefined) {
219
- ctx.ui.notify("Commit & push cancelled", "warning");
220
211
  return;
221
212
  }
222
213
  message = input.trim();
223
214
  }
224
215
 
225
- ctx.ui.notify("🤖 正在委派 git-sub-agent 处理...", "info");
226
216
 
227
217
  const task = message
228
218
  ? `Stage all changes with git add -A, commit with message: "${message}", then push. Do NOT ask for confirmation.`