@ljoukov/llm 4.0.3 → 4.0.4

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/dist/index.d.cts CHANGED
@@ -582,6 +582,7 @@ type AgentLogLineSink = {
582
582
  };
583
583
  type AgentLoggingConfig = {
584
584
  readonly workspaceDir?: string;
585
+ readonly callLogsDir?: string;
585
586
  readonly mirrorToConsole?: boolean;
586
587
  readonly sink?: AgentLogLineSink;
587
588
  };
package/dist/index.d.ts CHANGED
@@ -582,6 +582,7 @@ type AgentLogLineSink = {
582
582
  };
583
583
  type AgentLoggingConfig = {
584
584
  readonly workspaceDir?: string;
585
+ readonly callLogsDir?: string;
585
586
  readonly mirrorToConsole?: boolean;
586
587
  readonly sink?: AgentLogLineSink;
587
588
  };
package/dist/index.js CHANGED
@@ -2857,7 +2857,8 @@ var AgentLoggingSessionImpl = class {
2857
2857
  callCounter = 0;
2858
2858
  constructor(config) {
2859
2859
  this.workspaceDir = path3.resolve(config.workspaceDir ?? process.cwd());
2860
- this.logsRootDir = path3.join(path3.dirname(this.workspaceDir), "logs");
2860
+ const configuredCallLogsDir = typeof config.callLogsDir === "string" ? config.callLogsDir.trim() : "";
2861
+ this.logsRootDir = configuredCallLogsDir.length > 0 ? path3.resolve(this.workspaceDir, configuredCallLogsDir) : path3.join(this.workspaceDir, "llm_calls");
2861
2862
  this.mirrorToConsole = config.mirrorToConsole !== false;
2862
2863
  this.sink = config.sink;
2863
2864
  this.agentLogPath = path3.join(this.workspaceDir, "agent.log");
@@ -10302,9 +10303,10 @@ function createRootAgentLoggingSession(request) {
10302
10303
  if (!selected) {
10303
10304
  return void 0;
10304
10305
  }
10306
+ const workspaceDir = typeof selected.workspaceDir === "string" && selected.workspaceDir.trim().length > 0 ? path7.resolve(selected.workspaceDir) : resolveWorkspaceDirForLogging(request);
10305
10307
  return createAgentLoggingSession({
10306
10308
  ...selected,
10307
- workspaceDir: typeof selected.workspaceDir === "string" && selected.workspaceDir.trim().length > 0 ? path7.resolve(selected.workspaceDir) : resolveWorkspaceDirForLogging(request),
10309
+ workspaceDir,
10308
10310
  mirrorToConsole: selected.mirrorToConsole !== false
10309
10311
  });
10310
10312
  }