pi-langfuse 1.2.0 → 1.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.
package/index.ts CHANGED
@@ -11,7 +11,7 @@ import { basename } from "node:path";
11
11
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
12
12
 
13
13
  import { state, resetRunState } from "./src/state.js";
14
- import { ensureConfig, promptForConfig } from "./src/config.js";
14
+ import { ensureConfig, promptForConfig, loadConfigFromEnv, loadConfigFromFile } from "./src/config.js";
15
15
  import { shutdownRuntime } from "./src/langfuse.js";
16
16
  import { getMessageFromEvent, extractAssistantOutput } from "./src/utils.js";
17
17
  import { startAgentRun, finishAgentRun } from "./src/handlers/agent.js";
@@ -34,6 +34,10 @@ import {
34
34
  // ============================================
35
35
 
36
36
  export default async function (pi: ExtensionAPI) {
37
+ if (!state.config) {
38
+ state.config = loadConfigFromEnv() || loadConfigFromFile();
39
+ }
40
+
37
41
  if (state.config) {
38
42
  console.log("📊 Langfuse: Tracing enabled →", state.config.host);
39
43
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-langfuse",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Langfuse extension for Pi coding agent",
5
5
  "repository": {
6
6
  "type": "git",
package/src/config.ts CHANGED
@@ -43,6 +43,10 @@ export function saveConfig(config: Config) {
43
43
  }
44
44
 
45
45
  export async function ensureConfig(ctx: any): Promise<boolean> {
46
+ if (!state.config) {
47
+ state.config = loadConfigFromEnv() || loadConfigFromFile();
48
+ }
49
+
46
50
  if (state.config) {
47
51
  return true;
48
52
  }