@dyyz1993/pi-coding-agent 0.74.14 → 0.74.16

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.
@@ -36,6 +36,7 @@ import { InternalGit } from "./file-store/internal-git.js";
36
36
  import { McpManager } from "./mcp/mcp-manager.js";
37
37
  import { createMcpToolDefinition } from "./mcp/tool-converter.js";
38
38
  import { resolveModelAlias } from "./model-resolver.js";
39
+ import { getCwdDataDir, getGlobalDataDir, getProjectDataDir, getSessionDataDir, resolveProjectIdentity } from "./storage.js";
39
40
  import { expandPromptTemplate } from "./prompt-templates.js";
40
41
  import { CURRENT_SESSION_VERSION, getLatestCompactionEntry } from "./session-manager.js";
41
42
  import { createSyntheticSourceInfo } from "./source-info.js";
@@ -1871,7 +1872,7 @@ export class AgentSession {
1871
1872
  if (oldName === trimmed)
1872
1873
  return;
1873
1874
  this.sessionManager.appendSessionInfo(name);
1874
- this._emit({ type: "session_rename", oldName, newName: trimmed });
1875
+ this._emit({ type: "session_info_changed", name: trimmed });
1875
1876
  runner.emit({ type: "session_rename", oldName, newName: trimmed }).catch((err) => {
1876
1877
  runner.emitError({
1877
1878
  extensionPath: "<runtime>",
@@ -2046,6 +2047,14 @@ export class AgentSession {
2046
2047
  }
2047
2048
  }
2048
2049
  this._extensionRunner = new ExtensionRunner(extensionsResult.extensions, extensionsResult.runtime, this._cwd, this.sessionManager, this._modelRegistry);
2050
+ const projectRoot = resolveProjectIdentity(this._cwd);
2051
+ this._extensionRunner.setContextDirFns({
2052
+ getProjectRoot: () => projectRoot,
2053
+ getSessionDataDir: (extName) => getSessionDataDir(this.sessionManager.getSessionDir(), this.sessionManager.getSessionId(), extName),
2054
+ getProjectDataDir: (extName) => getProjectDataDir(projectRoot, extName),
2055
+ getCwdDataDir: (extName) => getCwdDataDir(this._cwd, extName),
2056
+ getGlobalDataDir: (extName) => getGlobalDataDir(extName),
2057
+ });
2049
2058
  if (this._extensionRunnerRef) {
2050
2059
  this._extensionRunnerRef.current = this._extensionRunner;
2051
2060
  }