@mariozechner/pi-coding-agent 0.40.0 → 0.41.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.41.0] - 2026-01-09
4
+
5
+ ### Added
6
+
7
+ - Anthropic OAuth support is back! Use `/login` to authenticate with your Claude Pro/Max subscription.
8
+
9
+ ## [0.40.1] - 2026-01-09
10
+
11
+ ### Removed
12
+
13
+ - Anthropic OAuth support (`/login`). Use API keys instead.
14
+
3
15
  ## [0.40.0] - 2026-01-08
4
16
 
5
17
  ### Added
@@ -5,16 +5,18 @@
5
5
  * pi -e examples/extensions/mac-system-theme.ts
6
6
  */
7
7
 
8
- import { execSync } from "node:child_process";
8
+ import { exec } from "node:child_process";
9
+ import { promisify } from "node:util";
9
10
  import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
10
11
 
11
- function isDarkMode(): boolean {
12
+ const execAsync = promisify(exec);
13
+
14
+ async function isDarkMode(): Promise<boolean> {
12
15
  try {
13
- const result = execSync(
16
+ const { stdout } = await execAsync(
14
17
  "osascript -e 'tell application \"System Events\" to tell appearance preferences to return dark mode'",
15
- { encoding: "utf-8" },
16
18
  );
17
- return result.trim() === "true";
19
+ return stdout.trim() === "true";
18
20
  } catch {
19
21
  return false;
20
22
  }
@@ -23,12 +25,12 @@ function isDarkMode(): boolean {
23
25
  export default function (pi: ExtensionAPI) {
24
26
  let intervalId: ReturnType<typeof setInterval> | null = null;
25
27
 
26
- pi.on("session_start", (_event, ctx) => {
27
- let currentTheme = isDarkMode() ? "dark" : "light";
28
+ pi.on("session_start", async (_event, ctx) => {
29
+ let currentTheme = (await isDarkMode()) ? "dark" : "light";
28
30
  ctx.ui.setTheme(currentTheme);
29
31
 
30
- intervalId = setInterval(() => {
31
- const newTheme = isDarkMode() ? "dark" : "light";
32
+ intervalId = setInterval(async () => {
33
+ const newTheme = (await isDarkMode()) ? "dark" : "light";
32
34
  if (newTheme !== currentTheme) {
33
35
  currentTheme = newTheme;
34
36
  ctx.ui.setTheme(currentTheme);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-with-deps",
9
- "version": "1.4.0",
9
+ "version": "1.5.0",
10
10
  "dependencies": {
11
11
  "ms": "^2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
3
  "private": true,
4
- "version": "1.4.0",
4
+ "version": "1.5.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mariozechner/pi-coding-agent",
3
- "version": "0.40.0",
3
+ "version": "0.41.0",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@mariozechner/clipboard": "^0.3.0",
42
- "@mariozechner/pi-agent-core": "^0.40.0",
43
- "@mariozechner/pi-ai": "^0.40.0",
44
- "@mariozechner/pi-tui": "^0.40.0",
42
+ "@mariozechner/pi-agent-core": "^0.41.0",
43
+ "@mariozechner/pi-ai": "^0.41.0",
44
+ "@mariozechner/pi-tui": "^0.41.0",
45
45
  "chalk": "^5.5.0",
46
46
  "cli-highlight": "^2.1.11",
47
47
  "diff": "^8.0.2",