@dyyz1993/pi-coding-agent 0.74.39 → 0.74.40

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.
@@ -769,12 +769,9 @@ export class AgentSession {
769
769
  this.setActiveToolsByName(agent.tools);
770
770
  }
771
771
  if (agent.systemPrompt) {
772
- const appendParts = [];
773
- if (this._resourceLoader.getAppendSystemPrompt().length > 0) {
774
- appendParts.push(...this._resourceLoader.getAppendSystemPrompt());
775
- }
776
- appendParts.push(agent.systemPrompt);
777
- this._baseSystemPrompt = this._rebuildSystemPrompt(this.getActiveToolNames());
772
+ // Rebuild base prompt with filtered tools, then append agent-specific prompt
773
+ this._baseSystemPrompt = this._rebuildSystemPrompt(this.getActiveToolNames()) + "\n\n" + agent.systemPrompt;
774
+ this.agent.state.systemPrompt = this._baseSystemPrompt;
778
775
  }
779
776
  }
780
777
  getCurrentAgent() {