pi-zentui 0.3.0 → 0.3.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.
@@ -1,7 +1,7 @@
1
1
  import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
2
2
  import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
3
3
  import type { PolishedTuiConfig } from "./config";
4
- import { type ExtensionStatusSegment, collectExtensionStatusSegments } from "./extension-status";
4
+ import { collectExtensionStatusSegments, type ExtensionStatusSegment } from "./extension-status";
5
5
  import { formatCwdLabel, formatRuntimeSegment } from "./format";
6
6
  import type { FooterState } from "./state";
7
7
  import { renderStyleForSource } from "./style";
@@ -9,29 +9,29 @@ import {
9
9
  type ColorSourcesConfig,
10
10
  type ExtensionStatusColorMode,
11
11
  type ExtensionStatusPlacement,
12
- type FooterSegmentsConfig,
13
- type PolishedTuiConfig,
14
- type UiFeaturesConfig,
15
12
  ensureConfigExists,
13
+ type FooterSegmentsConfig,
16
14
  loadConfig,
15
+ type PolishedTuiConfig,
17
16
  saveColorSourcesPatch,
18
17
  saveExtensionStatusColorMode,
19
18
  saveExtensionStatusPlacement,
20
19
  saveFooterSegmentsPatch,
21
20
  saveUiFeaturesPatch,
21
+ type UiFeaturesConfig,
22
22
  } from "./config";
23
23
  import { installFooter } from "./footer";
24
24
  import { emptyGitStatus, readGitStatus } from "./git";
25
25
  import {
26
+ createProjectRefreshScheduler,
26
27
  type ScheduleProjectRefreshOptions,
27
28
  type StopProjectRefreshInterval,
28
- createProjectRefreshScheduler,
29
29
  startProjectRefreshInterval,
30
30
  } from "./project-refresh";
31
31
  import { readRuntimeInfo } from "./runtime";
32
32
  import { installSelectorBorderStyle } from "./selector-border";
33
33
  import { registerZentuiSettingsCommand } from "./settings-command";
34
- import { type FooterState, createInitialState, syncState } from "./state";
34
+ import { createInitialState, type FooterState, syncState } from "./state";
35
35
  import { PolishedEditor, WrappedPolishedEditor } from "./ui";
36
36
  import { installUserMessageStyle } from "./user-message";
37
37
 
@@ -60,8 +60,12 @@ function getZentuiEditorBaseFactory(factory: EditorFactory | undefined): EditorF
60
60
  }
61
61
 
62
62
  function isTuiContext(ctx: ExtensionContext): boolean {
63
- const mode = (ctx as ExtensionContext & { mode?: string }).mode;
64
- return ctx.hasUI && (mode === undefined || mode === "tui");
63
+ try {
64
+ const mode = (ctx as ExtensionContext & { mode?: string }).mode;
65
+ return ctx.hasUI && (mode === undefined || mode === "tui");
66
+ } catch {
67
+ return false;
68
+ }
65
69
  }
66
70
 
67
71
  export default function (pi: ExtensionAPI) {
@@ -3,10 +3,10 @@ import { getSettingsListTheme } from "@earendil-works/pi-coding-agent";
3
3
  import {
4
4
  type AutocompleteItem,
5
5
  Key,
6
+ matchesKey,
6
7
  type SettingItem,
7
8
  SettingsList,
8
9
  type SettingsListTheme,
9
- matchesKey,
10
10
  truncateToWidth,
11
11
  } from "@earendil-works/pi-tui";
12
12
  import {
@@ -15,12 +15,12 @@ import {
15
15
  type ExtensionStatusColorMode,
16
16
  type ExtensionStatusPlacement,
17
17
  type FooterSegmentsConfig,
18
- type PolishedTuiConfig,
19
- type UiFeaturesConfig,
20
18
  getExtensionStatusColorMode,
21
19
  getExtensionStatusPlacement,
22
20
  isExtensionStatusColorMode,
23
21
  isExtensionStatusPlacement,
22
+ type PolishedTuiConfig,
23
+ type UiFeaturesConfig,
24
24
  } from "./config";
25
25
  import { sanitizeExtensionStatusText } from "./extension-status";
26
26
  import { EDITOR_BORDER_STYLE, renderChromeBorder, safeThemeFg } from "./style";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-zentui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "A Starship-inspired statusline and Opencode-style TUI for Pi.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -12,8 +12,16 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/lmilojevicc/pi-zentui/issues"
14
14
  },
15
- "keywords": ["pi-package", "pi-extension", "pi-theme", "starship", "tui"],
16
- "files": ["extensions"],
15
+ "keywords": [
16
+ "pi-package",
17
+ "pi-extension",
18
+ "pi-theme",
19
+ "starship",
20
+ "tui"
21
+ ],
22
+ "files": [
23
+ "extensions"
24
+ ],
17
25
  "scripts": {
18
26
  "lint": "biome check .",
19
27
  "typecheck": "tsc --noEmit",
@@ -32,18 +40,20 @@
32
40
  "@earendil-works/pi-tui": "*"
33
41
  },
34
42
  "pi": {
35
- "extensions": ["./extensions"],
43
+ "extensions": [
44
+ "./extensions"
45
+ ],
36
46
  "image": "https://raw.githubusercontent.com/lmilojevicc/pi-zentui/main/assets/zentui.png"
37
47
  },
38
48
  "publishConfig": {
39
49
  "access": "public"
40
50
  },
41
51
  "devDependencies": {
42
- "@biomejs/biome": "^1.9.4",
52
+ "@biomejs/biome": "^2.5.0",
43
53
  "@earendil-works/pi-ai": "^0.79.3",
44
54
  "@earendil-works/pi-coding-agent": "^0.79.3",
45
55
  "@earendil-works/pi-tui": "^0.79.3",
46
- "@types/node": "^25.5.2",
56
+ "@types/node": "^26.0.0",
47
57
  "typescript": "^6.0.2",
48
58
  "vitest": "^4.1.8"
49
59
  }