pi-one-ui 0.2.1 → 0.3.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.
@@ -61,7 +61,6 @@ export type Config = {
61
61
  enableSubagentAutocomplete: boolean;
62
62
  enableContextCommand: boolean;
63
63
  enableAgentSummary: boolean;
64
- enableWorkingMessage: boolean;
65
64
  enableAliases: boolean;
66
65
  };
67
66
 
@@ -69,7 +68,7 @@ function rendererConfigFrom(record: ConfigRecord): ConfigRecord {
69
68
  const renderer = record.renderer;
70
69
  return renderer && typeof renderer === "object" && !Array.isArray(renderer)
71
70
  ? (renderer as ConfigRecord)
72
- : record;
71
+ : {};
73
72
  }
74
73
 
75
74
  export const DIFF_VIEW_MODES: DiffViewMode[] = ["auto", "split", "unified"];
@@ -166,8 +165,6 @@ export const DEFAULT_CONFIG: Config = {
166
165
  enableSubagentAutocomplete: true,
167
166
  enableContextCommand: true,
168
167
  enableAgentSummary: true,
169
- // Zentui is the sole owner of Pi's unkeyed working row in pi-one-ui.
170
- enableWorkingMessage: false,
171
168
  enableAliases: true,
172
169
  };
173
170
 
@@ -218,15 +215,8 @@ export function normalizeConfig(input: unknown): Config {
218
215
  unknown
219
216
  >;
220
217
  const mode = source.mode;
221
- // 旧 `enabled: boolean` 配置迁移;compact 已恢复为受支持模式,不再回退 on。
222
- const migratedMode: CompactStyleMode =
223
- mode === "on" || mode === "compact" || mode === "off"
224
- ? mode
225
- : typeof source.enabled === "boolean"
226
- ? source.enabled
227
- ? "on"
228
- : "off"
229
- : "on";
218
+ const normalizedMode: CompactStyleMode =
219
+ mode === "on" || mode === "compact" || mode === "off" ? mode : "on";
230
220
  const excludeRenderers = Array.isArray(source.excludeRenderers)
231
221
  ? [
232
222
  ...new Set(
@@ -238,7 +228,7 @@ export function normalizeConfig(input: unknown): Config {
238
228
  ]
239
229
  : [];
240
230
  return {
241
- mode: migratedMode,
231
+ mode: normalizedMode,
242
232
  excludeRenderers,
243
233
  diffViewMode: pickEnum(
244
234
  source.diffViewMode,
@@ -257,7 +247,7 @@ export function normalizeConfig(input: unknown): Config {
257
247
  300,
258
248
  ),
259
249
  editDiffCollapsedLines: pickPositiveInt(
260
- source.editDiffCollapsedLines ?? source.diffCollapsedLines,
250
+ source.editDiffCollapsedLines,
261
251
  DEFAULT_CONFIG.editDiffCollapsedLines,
262
252
  1,
263
253
  500,
@@ -305,7 +295,6 @@ export function normalizeConfig(input: unknown): Config {
305
295
  enableSubagentAutocomplete: source.enableSubagentAutocomplete !== false,
306
296
  enableContextCommand: source.enableContextCommand !== false,
307
297
  enableAgentSummary: source.enableAgentSummary !== false,
308
- enableWorkingMessage: source.enableWorkingMessage === true,
309
298
  enableAliases: source.enableAliases !== false,
310
299
  };
311
300
  }
@@ -360,7 +349,6 @@ export function formatConfigStatus(source: Config = config): string {
360
349
  `subagentAuto=${source.enableSubagentAutocomplete ? "on" : "off"}`,
361
350
  `context=${source.enableContextCommand ? "on" : "off"}`,
362
351
  `agentSummary=${source.enableAgentSummary ? "on" : "off"}`,
363
- `workingMsg=${source.enableWorkingMessage ? "on" : "off"}`,
364
352
  `aliases=${source.enableAliases ? "on" : "off"}`,
365
353
  ].join(" · ");
366
354
  }