@dyyz1993/pi-coding-agent 0.74.43 → 0.74.44
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/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +4 -3
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/system-prompt.d.ts +2 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +3 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/package.json +1 -1
|
@@ -769,8 +769,8 @@ export class AgentSession {
|
|
|
769
769
|
this.setActiveToolsByName(agent.tools);
|
|
770
770
|
}
|
|
771
771
|
if (agent.systemPrompt) {
|
|
772
|
-
// Rebuild
|
|
773
|
-
this._baseSystemPrompt = this._rebuildSystemPrompt(this.getActiveToolNames()
|
|
772
|
+
// Rebuild prompt with agent system prompt inserted between base and tools
|
|
773
|
+
this._baseSystemPrompt = this._rebuildSystemPrompt(this.getActiveToolNames(), agent.systemPrompt);
|
|
774
774
|
this.agent.state.systemPrompt = this._baseSystemPrompt;
|
|
775
775
|
}
|
|
776
776
|
}
|
|
@@ -841,7 +841,7 @@ export class AgentSession {
|
|
|
841
841
|
}
|
|
842
842
|
return Array.from(unique);
|
|
843
843
|
}
|
|
844
|
-
_rebuildSystemPrompt(toolNames) {
|
|
844
|
+
_rebuildSystemPrompt(toolNames, agentSystemPrompt) {
|
|
845
845
|
const validToolNames = toolNames.filter((name) => this._toolRegistry.has(name));
|
|
846
846
|
const toolSnippets = {};
|
|
847
847
|
const promptGuidelines = [];
|
|
@@ -866,6 +866,7 @@ export class AgentSession {
|
|
|
866
866
|
contextFiles: loadedContextFiles,
|
|
867
867
|
customPrompt: loaderSystemPrompt,
|
|
868
868
|
appendSystemPrompt,
|
|
869
|
+
agentSystemPrompt,
|
|
869
870
|
selectedTools: validToolNames,
|
|
870
871
|
toolSnippets,
|
|
871
872
|
promptGuidelines,
|