@dyyz1993/pi-coding-agent 0.74.21 → 0.74.23

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.
@@ -139,6 +139,7 @@ export class AgentSession {
139
139
  this.agent = config.agent;
140
140
  this.sessionManager = config.sessionManager;
141
141
  this.settingsManager = config.settingsManager;
142
+ this._tierModels = this.settingsManager.getTierModels();
142
143
  this._scopedModels = config.scopedModels ?? [];
143
144
  this._resourceLoader = config.resourceLoader;
144
145
  this._customTools = config.customTools ?? [];
@@ -652,6 +653,7 @@ export class AgentSession {
652
653
  setTierModels(mapping) {
653
654
  this._tierModels = { ...mapping };
654
655
  this.sessionManager.appendTierModelsChange(mapping);
656
+ this.settingsManager.setTierModels(mapping);
655
657
  }
656
658
  /** Current thinking level */
657
659
  get thinkingLevel() {
@@ -728,6 +730,9 @@ export class AgentSession {
728
730
  if (agent.tools && agent.tools.length > 0) {
729
731
  this._currentAgentVariables["allowedTools"] = agent.tools.join(",");
730
732
  }
733
+ if (agent.hooks && Object.keys(agent.hooks).length > 0) {
734
+ this._currentAgentVariables["agentHooks"] = JSON.stringify(agent.hooks);
735
+ }
731
736
  if (agent.thinkingLevel) {
732
737
  this.setThinkingLevel(agent.thinkingLevel);
733
738
  }
@@ -1900,6 +1905,7 @@ export class AgentSession {
1900
1905
  appendEntry: (customType, data, options) => {
1901
1906
  const id = this.sessionManager.appendCustomEntry(customType, data, options);
1902
1907
  this._emit({ type: "custom_entry", customType, data, id, display: options?.display });
1908
+ return id;
1903
1909
  },
1904
1910
  foldEntry: (entryId, summary, originalTokens) => {
1905
1911
  this.sessionManager.appendFold(entryId, summary, originalTokens);