u1s1-cli 1.8.0 → 1.8.1

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.
@@ -70,7 +70,7 @@ export declare function writeAttributionExtension(): void;
70
70
  * - 每轮回复结束追加一条汇总行,如 ⚙ 9 tools · bash×4 · read×3 · ✗ 1
71
71
  * - 思考块折叠标签设为空,配合 pi 补丁(见 patches/)消除多余空行
72
72
  */
73
- export declare function writeCompactUiExtension(): void;
73
+ export declare function writeCompactUiExtension(outputDir?: string): void;
74
74
  /**
75
75
  * pi-web-ui 的就绪检测只认 <agentDir>/auth.json 里有没有凭据条目(models.json
76
76
  * 的 apiKey 它不看),空 {} 会在网页里弹「未检测到 pi agent 配置」引导装 pi。
@@ -388,8 +388,8 @@ export function writeAttributionExtension() {
388
388
  * - 每轮回复结束追加一条汇总行,如 ⚙ 9 tools · bash×4 · read×3 · ✗ 1
389
389
  * - 思考块折叠标签设为空,配合 pi 补丁(见 patches/)消除多余空行
390
390
  */
391
- export function writeCompactUiExtension() {
392
- const dir = join(agentDir, "extensions");
391
+ export function writeCompactUiExtension(outputDir) {
392
+ const dir = outputDir ?? join(agentDir, "extensions");
393
393
  mkdirSync(dir, { recursive: true });
394
394
  writeFileSync(join(dir, "u1s1-compact-ui.js"), `// 由 u1s1 每次启动自动生成,请勿手改
395
395
  function oneLine(text, max = 160) {
@@ -407,7 +407,7 @@ export default async function (pi) {
407
407
  let counts = {};
408
408
  let errors = 0;
409
409
  // 工具调用被折叠后,这一行摘要是新手了解「AI 刚才做了什么」的唯一入口,内置工具名给人话
410
- const TOOL_SUMMARY_LABELS: Record<string, string> = {
410
+ const TOOL_SUMMARY_LABELS = {
411
411
  read: "读文件", write: "写文件", edit: "改文件", bash: "跑命令", grep: "搜内容", find: "找文件", ls: "列目录",
412
412
  };
413
413
  pi.on("agent_start", async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "u1s1-cli",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "u1s1 — 有一说一,最省心的 AI 编程搭子。终端里用中文说需求,AI 帮你读文件、改代码、跑命令。",
5
5
  "type": "module",
6
6
  "bin": {